Rock Paper Scissors

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

Front-Running in Game Joining

Description: The RockPaperScissors::joinGameWithEth() and RockPaperScissors::joinGameWithToken() functions are vulnerable to front-running attacks where an attacker could monitor the mempool and join games before legitimate players.

Impact: Malicious actors could consistently join games, potentially disrupting the game flow and fairness.

Proof of Concept:

function joinGameWithEth(uint256 _gameId) external payable {
// ... existing code ...
game.playerB = msg.sender;
emit PlayerJoined(_gameId, msg.sender);
}

Recommended Mitigation: Implement a commit-reveal scheme for joining games or use a whitelist system.

Updates

Appeal created

m3dython Lead Judge about 2 months ago
Submission Judgement Published
Invalidated
Reason: Too generic

Support

FAQs

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