hard20 pts · first answer countssmart-contract-securitycryptography
Commit-reveal that can be copied
In a sealed-bid game, players commit keccak256(abi.encode(choice, salt)) and reveal later. An attacker copies a winner's commit hash and reveals the same values after seeing them in the mempool. What is the fix?
Discussion 0
Join free to post in the discussion.
Related questions
- Keys and addressesBlockchain Developer
- What links one block to the nextBlockchain Developer
- Private variables are public dataBlockchain Developer
- Verifying a contract on EtherscanBlockchain Developer
- Sharing a seed phraseBlockchain Developer
- Why use OpenZeppelinBlockchain Developer
- Properties of keccak256Blockchain Developer
- The Merkle root in a blockBlockchain Developer