The idea of this Voting dApp was to create a game on Ethereum, based on Voting. Although it could use the Open Vote Protocol, it needed to be simplified, so that we had the goods, without the heavy cost associated with the execution of the protocol on Ethereum Blockchain. With certain limitations we were able to achieve a scenario wherein each user’s vote for a single question is stored in the blockchain, and yet hidden from others, until the Commit phase. In the commit phase of a question, every user releases their pledged answer for result generation and it now becomes open for all to see on the blockchain.
An Administrative panel serves as a frontend for the owner of the game to enter the question bank into the Ethereum blockchain through the Smart Contract. Once entered, each question serves its own life-cycle. A question cycle is executed on the blockchain and repeats after its pre-decided pause phase is over.
The dApp’s frontend web interface shows the User the question served by the smart contract as per its pre-defined life-cycle. The user is free to submit or skip the question. Submitting an answer means voting for one of its options, and requires a payment of a pre-specified amount of Ether. Once a question is attempted, the next available question is shown. Users can submit multiple questions.
The Commit tab of the dApp allows users to commit and open their vote to the network.
The Summary tab declares the user’s winning questions, if any and a Claim Reward button allows users to receive the pre-defined reward Ethers into his/her own wallet.