The contract does not properly transition between distinct game states for the commit and reveal phases, overloading the GameState.Committed state. This makes the contract logic less robust and harder to reason about.
The game transitions to GameState.Committed when the first player commits (if player B has joined). It remains in GameState.Committed even after both players have committed and the revealDeadline is set. The revealMove and timeoutReveal functions correctly require that the deadline is active (revealDeadline is set) but incorrectly check for the GameState.Committed state. There should be a distinct state indicating the reveal phase is active.
Reduced Code Clarity: Overloading the Committed state makes the contract's control flow harder to understand and audit.
Potential for Future Bugs: If the contract logic around commits, reveals, or deadlines is modified later, the lack of a distinct reveal state could more easily lead to vulnerabilities or incorrect game behavior.
Fix and Add correct reveal state.
Attack allows a player to reveal their move for the next turn before the opponent commits
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.