code-423n4 / 2024-07-traitforge-findings

2 stars 1 forks source link

Upgraded Q -> 2 from #107 [1724083523856] #1049

Closed c4-judge closed 3 months ago

c4-judge commented 3 months ago

Judge has assessed an item in Issue #107 as 2 risk. The relevant finding follows:

[06] maxGeneration check included for forging a new NFT but not included when minting a new NFT TraitForgeNft::forge includes the following check to ensure that maxGeneration is not exceeded:

require(newGeneration <= maxGeneration, "can't be over max generation"); However, this check is not explicitly included in the TraitForgeNft::mintToken , TraitForgeNft::mintWithBudget and TraitForgeNft::_mintInternal functions. Without the explicit checks, the maxGeneration could be exceed for mints.

Recommended Mitigation Steps Consider including the maxGeneration check explicitly for mint functions.

c4-judge commented 3 months ago

koolexcrypto marked the issue as duplicate of #217