Description: On the first commit (e.g. Player A calls commitMove
), the contract sets 'state = Committed' but does not yet set 'revealDeadline' (it remains zero). Immediately afterward, any player can call timeoutReveal
, since 'block.timestamp > 0' is always true, and neither side "revealed", the contract calls _cancelGame
, aborting the match and refunding both.
Impact: Either player can grief the other by committing first and then cancelling before the opponent even commits. No one loses ETH, but the opponent is forced out of the game.
Recommended Mitigation: Only allow timeoutReveal
after both commits:
Code suggestions or observations that do not pose a direct security risk.
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.