FestivalPass::redeemMemorabilia Prevents Redemption of the Last Item in a CollectionIn createMemorabiliaCollection, currentItemId is initialized to 1 for every new collection. The redemption logic checks if collection.currentItemId < collection.maxSupply holds.
This creates an off-by-one error: when currentItemId == maxSupply, the last item cannot be redeemed because the condition currentItemId < maxSupply fails. This effectively causes a denial-of-service (DoS) for the final collectible.
Likelihood:
High – Occurs deterministically for every collection created under the current initialization and redemption logic.
Impact:
Users attempting to redeem the last item will always face a Collection sold out revert.
Causes a denial-of-service (DoS) for the final collectible
Organizer creates a collection with maxSupply = 5.
Redemptions work for 4items (IDs 1 to 4).
Attempting to redeem the 5th item fails due to currentItemId < maxSupply being false (5 < 5 is false).
Start currentItemId at 0 and and increment it on redemption.
Adjust the require condition.
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.