The commit-reveal scheme uses keccak256(abi.encodePacked(move, salt))
to create a commitment. If the salt used is weak (e.g., short string or common phrase), an attacker can brute-force possible values and break the commitment, allowing front-running or cheating.
Salts like "secret"
or "123"
are predictable and short. This allows the second player and possibly an attacker to brute-force the first player’s move after they’ve committed but before the reveal phase, especially when the salt is a known-length string.
The second player can wait for the first player’s commit, brute-force it, then choose a winning move before committing.
Defeats the purpose of commit-reveal fairness.
Undermines competitive integrity of the game.
Foundry
POC
Ideally use some sort of off-chain randomness e.g Chainlink VRF
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.