Commit–Reveal Voting

Opinion markets on Yolomarkets rely on a cryptographic pattern called commit–reveal. This mechanism allows users to submit opinions privately, blocks all forms of early manipulation, and ensures that the resolution of every betting market is derived directly from verified human input rather than any centralized party. It is the foundation that makes the opinion layer both trustless and tamper-proof.

Why Commit–Reveal Exists

Opinion markets need to satisfy a few strict requirements for them to be reliable. Votes must remain hidden while the market is active, so no trader, attacker, or even the Yolomarkets team should be able to detect early trends or see which direction people are leaning before the reveal window. Each human must be able to vote only once, which is enforced through identity gating using World ID or Twitter-verified human proofs. And the final resolution must be trustless, meaning the outcome must be computed entirely from the verified human votes without any admin intervention. Commit–reveal is the cleanest and most battle-tested cryptographic construction that satisfies all of these constraints at once.

How Commit–Reveal Works

Commit–reveal splits the voting process into two separate phases. During the commit phase, the user sends a hash of their vote to the smart contract. This hash conceals the actual choice completely, because it mixes the vote with a secret nonce and the user’s address. Nobody can infer which side the user picked simply by observing the hash on-chain. The system only knows that a commitment was submitted, but learns nothing about the underlying vote.

Later, during the reveal phase, the user—or a relayer acting with the user’s authorization, reveals the actual vote along with the same secret value used previously. The smart contract recomputes the hash and verifies that it matches the stored commitment. If the values align, the vote is accepted; if not, it is ignored. This two-step flow ensures complete privacy during the commit phase, full integrity during the reveal phase, and prevents anyone from detecting early vote direction or manipulating the trend before resolution.

Last updated