The commit-reveal mechanism lacks game-specific nonces, allowing players to potentially reuse commits across different games.
Location:
commitMove()
function
revealMove()
function
Issue:
Current commit hash: keccak256(abi.encodePacked(move, salt))
No game-specific identifier in the hash
Players could reuse the same (move + salt) combination in multiple games
Particularly dangerous if a player discovers a winning combination
Players could "replay" winning moves across multiple games
Potential for cheating by reusing known favorable commitments
Breaks the randomness and fairness guarantee of the game
Especially problematic in high-stakes games
Manual code review
Include game ID in the commit hash: keccak256(abi.encodePacked(move, salt, gameId))
Consider adding player address to the hash for additional uniqueness
Alternatively, implement a player-specific nonce system
Add validation in revealMove to ensure the revealed gameId matches
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.