configurePass
Breaks Supply Invariants by Overwriting maxSupply
and Resetting passSupply
The configurePass
function allows a trusted organizer to set the price and maximum supply cap for each pass type.
When configurePass
is called on an already-configured pass, it both overwrites the existing passMaxSupply
and resets the passSupply
counter to zero. This combination breaks the supply accounting, as the contract forgets both the original supply limit and the number of passes that have already been minted and sold.
Likelihood:
The organizer calls configurePass
for a passId
that has already been configured and has had passes sold.
Impact:
This accounting break allows the total number of minted passes to exceed the intended maxSupply
limit, breaking a core protocol invariant. For example, if 50 passes are sold from an initial maxSupply
of 100, and the organizer then re-runs configurePass
with a new maxSupply
of 100, the old limit is forgotten and the counter is reset. This would allow another 100 passes to be sold for a total of 150.
The following test shows the organizer re-configuring the general pass after one has already been sold. This allows the same user to buy a second pass, exceeding the maxSupply
of 1.
Add the new maxSupply
to the existing passMaxSupply
and preserve the current passSupply
to ensure accurate supply tracking.
This is not acceptable as high because any attack vectors related to organizer trying to milk ETH from participants is voided by the fact that the organizer is trusted.
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.