Rock Paper Scissors

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

Denial of Service via Gas Limit

Description: The RockPaperScissors::_determineWinner() function could potentially run out of gas if there are too many games in progress.

Impact: Legitimate games could fail to complete due to gas limitations.

Proof of Concept:

// Create many games to fill up storage
for (uint i = 0; i < 1000; i++) {
game.createGameWithEth{value: 0.1 ether}(3, 5 minutes);
}
// Legitimate game now fails due to high gas costs

Recommended Mitigation: Optimize storage usage and consider pagination for game state management.Description: The RockPaperScissors::_determineWinner() function could potentially run out of gas if there are too many games in progress.

Impact: Legitimate games could fail to complete due to gas limitations.

Proof of Concept:

// Create many games to fill up storage
for (uint i = 0; i < 1000; i++) {
game.createGameWithEth{value: 0.1 ether}(3, 5 minutes);
}
// Legitimate game now fails due to high gas costs

Recommended Mitigation: Optimize storage usage and consider pagination for game state management.

Updates

Appeal created

m3dython Lead Judge about 2 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational

Code suggestions or observations that do not pose a direct security risk.

Gas Optimization

Support

FAQs

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