The RockPaperScissors contract utilizes a commit-reveal scheme where players submit a hash of their move combined with a salt. However, there is no mechanism to ensure the uniqueness of each commitment. This opens the possibility for replay attacks, where the same commit hash can be reused across multiple games, potentially undermining the fairness and integrity of the system.
The contract generates a commitment hash using:
This hash can be reused in multiple games or by multiple users, especially if the salt is weak, reused, or predictable. Since the contract does not bind the commitment to the sender's address or the game context (e.g., game ID), this allows:
A player to reuse a commitment from a past game.
A malicious actor to observe a previously revealed move
and salt
pair, recreate the commitment hash, and reuse it in another game.
Replayability: Commitments can be copied and reused across games.
Predictability: Weak or reused salts make it easier to reverse-engineer moves.
Fairness Violation: The contract allows replayed commitments, enabling strategic manipulation or exploitation of the game.
This degrades the integrity of the commit-reveal scheme and may allow malicious actors to gain an unfair advantage.
Bind Commitment to Sender Include the player’s address when generating the commitment:
The contract does not enforce salt uniqueness
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.