configurePass
when buyPass
is on-going will cause current supply to return expected resultsIt seems there exists an assumption that buyPass
should be called only after configurePass
is called, so the configs of the festival pass like price and max supply are set before the sale starts
There is no hard restriction in configurePass
to limit organizer from setting new configs WHILE users are still buying the pass, so the current supply can be reset to 0
in the middle of other users buying the festival pass, which can result in different users buying in different price or max supply, and current supply can be reset even after the same festival pass is already selling to users
Likelihood:
The issue will arise whenever organizer calls configurePass
while any users are still buying the festival pass
Impact:
The max supply and price of the festival pass can be updated any time even other users are still buying it, the current supply will also get reset, so when organizer can configurePass
without hard restirction from the contract will cause the current supply storage for the same passId
won't add up and would hugely affect the accouting of the pass and affects other business logic given the initial assumption of correct price, max supply and current supply for the respective festival pass
The current supply will be reset to 0 if organizer configurePass
after a user buys a pass, but in fact it should be 2 and this could cause a lot of confusions.
Either a require checking can be added to configurePass
to restrict organizer from being able to configure only when a pass hasn't been bought yet, or even adding a enum to the contract to indicate different stages for the sale of the pass to ensure the flow is consistent and no unexpected configurations can happen during the middle of the sale.
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.