Rock Paper Scissors

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

Weak Commit Hash Scheme (Front-Running Risk)

Summary

Commitment does not bind sender identity, making brute-force and front-running possible.

Vulnerability Details

Commit hash is generated using:

keccak256(abi.encodePacked(move, salt));

Impact

  • Player can potentially impersonate another commit

  • Commit reuse across games undermines privacy

Tools Used

Manual review

Recommendations

Change hash to include sender address:

keccak256(abi.encodePacked(msg.sender, move, salt));
Updates

Appeal created

m3dython Lead Judge about 1 month ago
Submission Judgement Published
Validated
Assigned finding tags:

Lack of Salt Uniqueness Enforcement

The contract does not enforce salt uniqueness

Support

FAQs

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