Skip to main content

How Is the “Reveal” Transaction Verified by the Smart Contract on the Blockchain?

When the user submits the "reveal" transaction, they send the original, unhashed order details (price, amount, salt) to the smart contract. The contract then independently takes these revealed details, computes the hash of them using the same cryptographic function, and compares this newly computed hash to the original commitment hash stored on-chain.

If the two hashes match, the smart contract verifies the integrity of the order and executes the trade.

Why Is the Inclusion of a “Salt” or “Nonce” Critical in the Commitment Process?
What Is the Cryptographic Primitive Used to Create the “Commitment” in These Schemes?
What Is the ‘Commitment’ Step in a Commit-Reveal Scheme and What Information Does It Contain?
What Cryptographic Principle Underpins the “Commit” Phase of the Scheme?