Normal : The redeemMemorabilia
function is expected to allow users to mint memorabilia NFTs one by one until the collection's defined maxSupply
is reached.
Issue : An off-by-one error in the supply check logic causes the sale to end one item too early, preventing the final item of every collection from ever being minted.
Likelihood:High
This bug is guaranteed to occur for every memorabilia collection created by the organizer.
Impact: Medium
Broken Core Logic: The contract fails to fulfill its promise of selling maxSupply
items, as the true available supply is always maxSupply - 1
. This leads to user dissatisfaction when the final advertised item is unobtainable.
Permanently Locked Asset: The final NFT of every collection is locked in the contract forever, becoming inaccessible and unmintable.
testcase to show minting last NFT causes a revert
Change the strict less-than operator (<) to less-than-or-equal-to (<=) to allow the currentItemId to equal the maxSupply for the final mint.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.