Rock Paper Scissors

First Flight #38
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: medium
Invalid

Strategic Delay Vulnerability in Commit-Reveal Phase of Token-Based Games

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.

// Relevant State Checks:
// revealMove requires: game.state == GameState.Committed
// cancelGame requires: game.state == GameState.Created

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,

Updates

Appeal created

m3dython Lead Judge about 2 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.