Rock Paper Scissors

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

Potential Reentrancy in Token Transfers

Description: The contract uses RockPaperScissors::transferFrom for token transfers without following the checks-effects-interactions pattern.

Impact: While unlikely due to the simple nature of the transfers, there's a theoretical risk of reentrancy attacks.

Proof of Concept:

function joinGameWithToken(uint256 _gameId) external {
// ... existing code ...
winningToken.transferFrom(msg.sender, address(this), 1);
game.playerB = msg.sender;
emit PlayerJoined(_gameId, msg.sender);
}

Recommended Mitigation: Follow the checks-effects-interactions pattern by updating state before making external calls.

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.