Description:
Inside declareWinner(), the code zeroes out pot before emitting the GameEnded event, causing the event’s prizeAmount field to always be reported as 0.
Impact: This creates incorrect event logs that could mislead external systems, frontends, or analytics tools about the actual prize amounts won.
Misleading Analytics: Off-chain services and UIs will believe the winner received 0 ETH.
Data Integrity: Historical data on game outcomes is corrupted.
Proof of Concept: Add the following test to the 'Game.t.sol':
Mitigation:
Capture pot in a local variable before resetting:
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.