Closed c4-judge closed 3 months ago
koolexcrypto marked the issue as duplicate of #231
koolexcrypto changed the severity to 3 (High Risk)
koolexcrypto changed the severity to 2 (Med Risk)
koolexcrypto changed the severity to 3 (High Risk)
koolexcrypto marked the issue as satisfactory
Judge has assessed an item in Issue #1014 as 2 risk. The relevant finding follows:
[QA-3] mintWithBudget() has an inadequate check that will be invalid after generation 1 Description:
TraitForgeNft::mintWithBudget() allows minting until the maximum number of tokens per generation is minted (or the funds are spent), meaning that this function can’t be used to mint NFTs of 2 generations.
while (budgetLeft >= mintPrice && _tokenIds < maxTokensPerGen)
However this check is wrong because tokenIds don’t restart after the generation is incremented, meaning this check will be ineffective after generation 1 because _tokenIds will be way higher than maxTokensPerGen = 10_000.