The RockPaperScissors
contract lacks a timeout mechanism for the commit phase after both players have joined a game. While the contract implements timeouts for the join phase (via timeoutJoin()
) and reveal phase (via timeoutReveal()
), there is no equivalent functionality for the commit phase. This critical oversight allows a malicious player to permanently lock games in the Created
state after joining, with no mechanism for the other player to recover their funds.
Player A creates a game with an ETH bet using createGameWithEth()
Player B joins the game using joinGameWithEth()
, matching the bet amount
Player A has committed their move and the game state change to Committed
state
Player B never commits a move
Player A can't use cancelGame()
becuase GameState
is no longer is Created
The game remains in limbo indefinitely as there is no timeout function for this phase
Player A's funds remain locked in the contract with no recovery mechanism
This can be abused at scale by malicious actors to lock substantial amounts of ETH from multiple players
Players can permanently lose access to their funds if opponents refuse to commit moves
Malicious actors can intentionally join games with the purpose of locking funds
In multi-round games, a player who is losing can refuse to commit in subsequent rounds
Implement a commit phase timeout similar to the existing reveal timeout
Protocol does not provide a way for Player B to exit a game and reclaim their stake if Player A stops participating
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.