Normally, the contract allows users to redeem NFTs from memorabilia collections up to the specified maximum supply.
The issue occurs because the currentItemId for each collection is initialized to 1, but the redemption function requires currentItemId < maxSupply to allow minting. When maxSupply is 1, this condition is never true, preventing any NFT from being redeemed for such collections.
Likelihood:
Occurs whenever a memorabilia collection is created with maxSupply equal to 1.
Also applies to collections where maxSupply is low and the redemption logic blocks the last token.
Impact:
Users are unable to redeem any NFTs from collections where the max supply is 1, effectively locking those collections and breaking functionality.
This leads to a poor user experience, potential loss of value, and may reduce trust in the contract's correctness.
Explanation:
The redemption fails immediately because the contract incorrectly assumes an item with ID 1 cannot be redeemed if max supply is 1, due to the strict less-than (<) check.
Explanation:
Changing the strict less-than check to less-than-or-equal (<=) allows the redemption of the last item when currentItemId equals maxSupply. This fixes the logic so collections with max supply 1 (or any other number) can be fully minted without blocking the last token.
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.