A user can withdraw tokens that are not in use. In our case, the contract will call a function that updates the outcome of the poll.ġ1.
ENIGMO SOLUTION UPDATE
The result of the computation will be sent back to the Enigma Contract, where it will then update the contract state on Ethereum. The task will be sent out to a random SGX node on the Enigma Network so that it can privately compute our vote-tallying function.ĩ & 10. The Enigma Contract will gather the encrypted votes/weights, the vote tallying function, and other parameters and package them into a bundle called an Enigma Task.Ĩ. They will manually need to end the poll after the poll’s voting period has expired.ħ. Currently, a poll is ended by the poll creator. A user can only vote once in a poll and will specify their vote choice (which is encrypted by the dApp) and their vote weight (which is dependent on their staked token amount).Ħ. Anyone can create a poll so there is no sybil protection in place.ĥ. Create a poll with a specified quorum percentage, poll description, and poll length. These voting credits can be used to weight votes across any active poll.Ĥ.
Stake voting tokens into the contract to receive voting credits. The current arbitrary exchange rate is 10 tokens for 1 Ether.ģ. I have used a “Token Factory” to produce voting tokens which are OpenZeppelin Mintable tokens. The following diagram describes how a voting system would work on Enigma.ġ & 2. In this article, we present a private voting scheme that encrypts underlying votes and protects user privacy. The Enigma Protocol proposes a general decentralized off-chain layer for private computation and allows for a broad set of use cases related to secrecy such as secret voting, secret auctions, and secret TCRs. Furthermore, the two-step process of commit-reveal has drawbacks for user experience. While designs that protect votes during the polling process exist such as partial-lock commit reveal (PLCR), they present limited privacy because votes are public after the vote is concluded. However, due to the public nature of blockchains, current voting implementations expose user information and allow anyone to trace how users have voted. Additionally, voting is a necessary component in cryptoeconomic systems such as TCRs. Please view here:īlockchain-based voting has the potential to disrupt current voting systems and lead to new innovations in decentralized governance.
ENIGMO SOLUTION FULL
NOTE: This post has been updated, including adding a full video walkthrough.