The redeemMemorabilia function in FestivalPass.sol contains a logic error that prevents users from redeeming the last item in a memorabilia collection, even when supply is available.
Likelihood:
The condition is triggered every time someone tries to redeem the last item in any collection
This occurs naturally during normal usage
The bug will always trigger when attempting to redeem the final item
Impact:
Users cannot redeem the final item in any memorabilia collection
Collections effectively have 1 less item than their configured maxSupply
This breaks the expected functionality where all items in a collection should be redeemable
Create a memorabilia collection with maxSupply = 2
Give a user sufficient BEAT tokens
Successfully redeem the first item
Attempt to redeem the second (and final) item
Expected: Success
Actual: Reverts with "Collection sold out"
Users will be able to redeem the final item in any memorabilia collection
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.