Description: When a player joins a game and commits their move, the game state transitions to Committed, but the revealDeadline remains unset (defaulting to 0) until the opponent also commits their move. If the opponent becomes unresponsive and does not commit, the game remains in the Committed state indefinitely with no way to proceed or exit. This results in both players’ funds/tokens being locked in the contract.
Why existing timeout/cancel mechanisms don't work:
RockPaperScissors::timeoutReveal cannot be triggered because revealDeadline == 0, making the requirement require(block.timestamp > game.revealDeadline) always fail.
RockPaperScissors::cancelGame cannot be used because:
The game is no longer in the Created state.
Only the creator (playerA) is allowed to cancel, and they can’t once the state has moved to Committed.
Impact: Players may permanently lose access to their funds/tokens if their opponent abandons the game after one move is committed. There is currently no way to recover from this state.
Proof of Concept: N/A
Recommended Mitigation: Introduce a new field (e.g., commitDeadline) that sets a timeout after the first player commits a move. If the second player fails to commit within this timeframe, the first player should be able to cancel the game and recover their funds. This ensures fairness and prevents griefing through inactivity.
Protocol does not provide a way for Player B to exit a game and reclaim their stake if Player A stops participating
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.