In the declareWinner()
function:
So the emitted event always shows prizeAmount = 0
, even though the winner is being awarded ETH. This breaks frontend dashboards, analytics, and off-chain integrations.
Call declareWinner()
with 5 ETH in the pot:
Pot before call = 5 ETH
Event emits: GameEnded(winner, 0, ...)
← WRONG
Risk
Impact
Trust issue
Incorrect analytics
Subgraph desync
Store the pot in a temp variable before zeroing:
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.