In the past we discussed advantages of secret contracts over commit-reveal schemes used with smart contracts. Secret contracts saves user time, provide better UX and optimize dApp adoption:
Commit reveal is a scheme that’s often used in role based blockchain games and blockchain governance (voting). Most notably Cheeze Wizards, which is an Ethereum based Rock-Paper-Scissors type game uses commit reveals. At it’s peak, Cheeze Wizards had 200 users and ~110ETH locked in the game contract. Cheeze Wizard’s game play involves the following steps:
- Alice and Bob enter a battle
- Alice chooses her moves and makes an on-chain commitment. Alice has 1 hour to complete this step
- Bob chooses his moves and makes and on-chain commitment. Bob has 1 hour to complete this step
- After observing Bob’s commitment on-chain, Alice reveals her moves. Alice has 1 hour to reveal her moves after Bob’s commitment - in most cases Alice goes offline and never reveals her moves
- After observing Alice’s reveal, Bob reveals his moves. Bob has 1 hour to reveal his moves after Alice - in most cases Bob goes offline and never reveals her moves
As described above the game play can take up to 4 hours and requires 2 interactions by the user.
Replacing commit reveal scheme with secret contracts that can take encrypted inputs, (actually an ETHWaterloo hackathon submission called Fonduels) reduces the requires interactions to 1 and shortens game play by at least 50%. This ensures a more fluid in game experience for the users and allows users to play more.
Commit reveal is also used in decentralized voting and in the context of Token Curated Registery. Commit-reveal doesn’t provide privacy to the users, however it enables the tally to be kept secret while the voting is still on-going. In commit reveal based schemes, users often forget to reveal their votes and do not get to participate in governance due to a UX limitation. Recently @taariq has built a secret voting proof-of-concept using the Secret Network testnet.
As we are getting ready for mainnet, we are really excited about secret contracts and the benefits they will introduce to the decentralized ecosystem