Rock Paper Scissors

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

Using unsafe math operation

There is unsafe math add operation

if (game.commitA != bytes32(0) && game.commitB != bytes32(0)) {
game.revealDeadline = block.timestamp + game.timeoutInterval;
}

Vulnerability Details

Potentially integer overflow that can broke logic, if game.revealDeadline could be lower then block.timestamp

Impact

Tools Used

Manually research

Recommendations

Use OpenZeppelin Math add function or use require(block.timestamp + game.timeoutInterval > block.timestamp)

Updates

Appeal created

m3dython Lead Judge 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.