Voting DApp on Ethereum

Voting on Ethereum
Voting on Ethereum
Voting on Ethereum

This is a Voting Game built as a Voting dApp on the Ethereum Blockchain. It consists of a question bank, where each question shows multiple answer-options to select from. The concept is for the user to vote for the answer which s/he thinks would fetch minimum votes. Every question answered has a cost associated with it, which is taken from the user’s Ethereum wallet using Metamask. Finally, all users who voted for the option that received minimum votes, win the question.
Every question has a time cycle which it follows. Only those questions are thrown at users, whose time window is open for answers. Once a question closes, no more users can answer it, and the users who have already faced the question can now “commit” their answers for result-calculation. The smart contract checks number of votes received by each option of the question and marks the minority voters as winners. Winners are notified on their dashboard and are free to claim their reward.

Portfolio Detail

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.



Related Work