The declareWinner()
function emits the GameEnded
event after resetting the pot
to 0
, causing the emitted prizeAmount
to always be 0
. This is misleading for off-chain systems (e.g., frontends, analytics) that rely on the event to track the actual prize won by the king.
The event should emit the original pot value (before reset) to accurately reflect the prize awarded to the winner.
Impact:
Off-chain monitoring tools cannot track the actual prize distribution.
Cache the pot
value before resetting it:
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.