Summary
The commit-reveal scheme allows a player to observe their opponent's reveal transaction in the mempool and strategically withhold their own reveal if the outcome is unfavorable, forcing the opponent to wait for the timeout. The claim that a player can cancel the game during this phase is incorrect due to state checks.
Vulnerability Details
During the reveal phase (game.state == GameState.Committed
), Player B can monitor the mempool for Player A's revealMove
transaction. If Player B sees Player A's revealed move and determines they will lose the turn, Player B can choose not to submit their own revealMove
transaction. This doesn't change the committed move but delays resolution. Player A must then wait for game.revealDeadline
and call timeoutReveal
.
The cancelGame
function requires game.state == GameState.Created
, making it impossible to call during the Committed (reveal) state.
Impact
Griefing/Delay: The primary impact is forcing the revealing player (Player A) to wait for the revealDeadline
and spend additional gas calling timeoutReveal
.
Tools Used
Manual code review,
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.