FestivalPass::createPerformance
Allows Silent BEAT Minting FailureDescription: The FestivalPass::createPerformance
function does not validate that the reward parameter is greater than zero. As a result, a performance can be created with a reward of 0, which leads to a silent failure: holders of any PASS type will not receive BEAT tokens after attending the performance.
This occurs because BEAT rewards are calculated as:
Where baseReward = 0, the result will always be 0 — regardless of the pass type (General, VIP, or Backstage).
Impact: Pass holders receive no BEAT tokens for attending performances with reward = 0, breaking core reward expectations. While the organizer is a trusted role, accidental misconfiguration is possible — especially if the UI does not enforce a minimum value. This results in confusing behavior and erodes user trust in the reward mechanism.
Proof of Concept: Add the following test to FestivalPass.t.sol, and ensure a third user (user3) is initialized in the setUp() function:
Recommended Mitigation: Add the following validation inside the FestivalPass::createPerformance
function:
This ensures that performances must always include a non-zero reward, thereby guaranteeing that all pass holders can benefit from attending.
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.