Rock Paper Scissors

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

Zero-ETH game join vulnerability

Summary

The contract contains a require(game.bet == 0) check that permits joining a game without sending ETH. This could lead to unexpected behavior or abuse if the system logic assumes players stake value for participation.

Vulnerability Details

Function:

function joinGameWithToken(uint256 _gameId) external

require(game.bet == 0, "This game requires ETH bet");

This allows users to join games with no ETH sent, which may:

  • Bypass expected staking requirements

  • Break game balance

  • Allow payout logic to behave incorrectly if ETH distribution assumes a stake was made

Impact

  • Unexpected reward claiming or division logic

  • Potential DoS or exploits in payout routines

  • Free participation in what may be intended as paid games

Tools Used

Manual review

Recommendations

Add a dual-condition check to ensure value sent matches game expectation:

require(msg.value == game.bet, "ETH sent does not match required bet");
Updates

Appeal created

m3dython Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Design choice
m3dython Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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