Imagine playing a game of Rock-Paper-Scissors with a friend. The fun only works if both of you reveal your choices at the same time. If your opponent could see your hand even a second before playing their own, they’d always win - totally unfair, right?
Unfortunately, this unfair advantage isn’t just hypothetical. In crypto, something similar happens every day.
- On DEXs, bots can see your pending trade before it's confirmed, then race to submit their own transaction first - giving you a worse price while the bot profits.
- In DAO governance, your vote is often visible as soon as it’s cast, meaning others can see and react to it before the voting period ends - opening the door to influence and coercion.
- In Web3 gaming and betting, even when a platform claims your move is hidden, the transparency of the blockchain means you can’t truly be sure someone isn’t peeking behind the scenes and gaining an advantage.
This undermines trust and costs real money.
So, how do we fix it? This is where the commit-reveal scheme comes into play.
Commit-Reveal: Ensuring Everyone Plays Fair
The core idea of the commit-reveal scheme is simple: get everyone to commit to their choice first, those choices are kept secret, and those choices are later revealed at the same time.
Let’s go back to the Rock-Paper-Scissors example - but this time, you’re playing online with a stranger for $100. You both want to make sure it’s a fair game. That means neither of you should be able to see the other’s move before locking in your own.
Here’s how commit-reveal schemes ensure fairness:
- Encrypt Phase: You both secretly choose your move - say, one picks Rock and the other picks Scissors. But instead of revealing it right away, you each encrypt your choice and post that scrambled version to a public space, like a blockchain. Nobody can tell what you chose - it just looks like random data.
- Commit Phase: The encrypted moves are “committed” to, either by you as the players or by the game coordinator/server. This means that there’s no going back now for anyone.
- Reveal Phase: Both moves (or more accurately, the decryption key for those moves) are now automatically revealed and the game result can be deduced.
It’s like both of you locked your choice in a digital safe - and only agreed to open them once you’d both committed.
Commit-reveal schemes offer not only fairness but also transparency. Because everything is public and verifiable, it’s easy to check that everyone played fair.
This approach isn’t just for games. Commit-reveal schemes are used in sealed-bid auctions, private voting, random draws, and anywhere you need people to make honest, secret choices that are revealed later.
However, the issue with traditional commit-reveal systems is that you always need a centralized party to manage the reveal and encryption/decryption. This is where Shutter comes in, decentralizing that centralized component.
Threshold Encryption: Shutter’s Next-Level Improvement on Commit-Reveal
Shutter improves on the classic commit-reveal scheme with a more secure, decentralized, and automated approach using threshold encryption.
Instead of relying on one party to run the commit-reveal scheme, Shutter hands this responsibility to a distributed network on nodes (parties) called Keypers. These Keypers work together to unlock the data - but no single Keyper can do it alone. Only when enough of them (a “threshold”) agree can anything be decrypted.
This ensures that no one party could manipulate the process in their favor and it eliminates human errors which could cause the results from being revealed.
Here’s how it works - let’s stick with the Rock-Paper-Scissors example:
- You and your opponent each choose your moves the same as before.. But now your move is encrypted using a special public key that’s tied to a specific time window (called an epoch).
- Both of your encrypted moves are sent to the blockchain or stored off-chain. At this point, all anyone sees is scrambled data - your choices are completely hidden.
- Then, when the time window ends, the Keypers automatically work together to decrypt and reveal both moves at the same time.
This solves a big problem with traditional commit-reveal: what if someone forgets to reveal? Or one party tries to manipulate the outcomes? With threshold encryption, the reveal doesn’t rely on one party and that they follow the rules. It’s built into the system. Even if a few Keypers are offline or uncooperative, the protocol still works - securely and fairly.
Benefits of Commit-Reveal and Threshold Encryption
- Fairness and Security: Nobody can see or tamper with your data before it's supposed to be revealed.
- Privacy: Keeps sensitive actions, like voting or trading, confidential until the right moment.
- Transparency: Once revealed, data can be verified and audited by anyone.
- Resilience: By involving a group (Keypers) rather than a single entity in the reveal process, Shutter mitigates risks of manipulation or failure.
Trade-Offs
- Complexity: Setting up and coordinating Keypers takes effort.
- Latency: There is a short delay before transactions are revealed and processed.
- Trust Model: Assumes a majority of Keypers will behave honestly.
Looking Ahead
Shutter aligns with Ethereum’s vision of private, censorship-resistant transactions. As new technologies like Fully Homomorphic Encryption (FHE) and Zero-Knowledge Virtual Machines become more practical, Shutter’s approach will grow even stronger - but it’s already delivering value today.
Whether you're voting in a DAO, trading assets, or building a dApp, Shutter protects your actions from being seen or exploited, ensuring that transactions stay private and tamper-proof until the moment they need to be revealed.
Commit-reveal is the foundation, and Shutter enhances it with threshold encryption so you don’t have to rely on trust or timing.
Interested in threshold encryption protection for your dApp?
- Learn more about Shutter API
- Schedule a Shutter API demo with the Shutter team
- Explore the docs for dozens of dApps use cases across trading, gaming, betting, and more
Want to be part of a community that's championing greater fairness and privacy across all dApps? Join the Shutter Telegram.