createPerformance accepts any value for reward, including zero. When an attendee checks into a zero-reward performance, their hasAttended flag is set and their lastCheckIn timestamp is updated, consuming their 1-hour cooldown but they receive zero BEAT tokens.
Likelihood:
Requires the organizer to accidentally or deliberately set a zero reward when creating a performance.
Impact:
Attendees who check in to a zero-reward performance lose their cooldown slot and earn nothing, with no warning.
The following shows the organizer creating a zero-reward performance, an attendee checking in, and the attendee's cooldown being consumed while their BEAT balance remains unchanged.
Add a require(reward > 0) check alongside the existing validations so that zero-reward performances can never be created. This mirrors the pattern already used for price and duration validation elsewhere in the contract.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.