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

2 stars 1 forks source link

Upgraded Q -> 2 from #1014 [1724082614295] #1045

Closed c4-judge closed 3 months ago

c4-judge commented 3 months ago

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.

c4-judge commented 3 months ago

koolexcrypto marked the issue as duplicate of #231

c4-judge commented 3 months ago

koolexcrypto changed the severity to 3 (High Risk)

c4-judge commented 3 months ago

koolexcrypto changed the severity to 2 (Med Risk)

c4-judge commented 3 months ago

koolexcrypto changed the severity to 3 (High Risk)

c4-judge commented 3 months ago

koolexcrypto marked the issue as satisfactory