Precondition: Reachable once this Critical [Unreachable gameplay: wrong equality check bricks
claimThrone()
] (https://codehawks.cyfrin.io/c/2025-07-last-man-standing/s/cmdwlle4k0003l404vznah12s) is fixed (==
→!=
).
PoC method: Tests use a minimal harness (GamePatched.sol
) with only that one-line fix to reach the intended game state.
Expected: GameEnded
should log the amount the winner just earned.
Actual: the contract sets pot = 0
before emitting the event, so
prizeAmount
is always logged as 0
.
Likelihood:
Always: every time a winner is declared.
Impact:
Off-chain Events integrations receive wrong data.
What this shows: prizeAmount
is logged as 0
in declareWinner()
Clear the state variable pot
after emitting the event GameEnded
, for coherence.
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.