Skip to main content

What Is the Cryptographic Basis for a ‘Commit-Reveal’ Scheme?

The cryptographic basis for a 'commit-reveal' scheme lies in the use of a collision-resistant cryptographic hash function. In the commit phase, the trader computes a hash of their transaction details concatenated with a secret random number (a salt or nonce).

Because the hash function is collision-resistant, it is computationally infeasible to find another input that produces the same hash, proving the commitment is genuine. In the reveal phase, the original data and the secret number are revealed, and the network verifies the hash, ensuring the transaction was not altered.

Can a DEX Protocol Be Designed to Be Inherently Resistant to Front-Running?
How Does a Commit-Reveal Scheme Protect a Trade from Being Front-Run?
What Is a Commit-Reveal Scheme and How Does It Deter Malicious Transaction Ordering?
Can a Hash Be Used to Prove Ownership of a Derivative Token without Revealing the Underlying Asset?