Decentralized application for election using blockchain technology

Photo by André François McKenzie on Unsplash

Blockchain, sometimes referred to as Distributed Ledger Technology (DLT), makes the history of any digital asset unalterable and transparent through the use of decentralization and cryptographic hashing. Blockchain creates a decentralized distribution which means that any application has no central server and the transaction are done directly between the customers. This blog aims to demonstrate the use of blockchain technology in safe and transparent voting system.

  1. Introduction:

Decentralized application for election involves voting in a transparent manner and to make sure that no change is made to the data after the process of voting. The application will basically consist of a UI on which a user can cast a vote only if he is an eligible person. Also a user can’t vote more than once. Thus security is maintained. At the end of the process everyone can view the results of the election.

2. Related work:

Use of blockchain has already laid its roots in fields like land registration, cross border payments, cryptocurrency exchange and work is also done for E-voting system. But as we can see that E-voting using blockchain is still not applied in countries because it requires a proper plinth and guranteed security factor. Our work attempts to bring some basic security in E-voting system.

3. Implementation:

The project utilizes Ethereum which is the second largest cryptocurrency platform and a decentralized open source blockchain featuring smart contract functionality. The contracts are developed in solidity language and developed on remix IDE which is an used to develop, test and deploy smart contracts. For personal blockchain, Ganache is used.

The basic flow of the system is given below:

basic flow

The smart contract for election is written in solidity and it manages the state of voters, the list of eligible voters and a list of candidates which are to be voted. It is deployed using remix on the private blockchain ganache. A voter can only vote only if his/her address is in the voters list maintained by the contract and he/she has not already voted.

4. Experimental results:

The results obtained by deploying the smart contract are shown below:

Result of smart contract

The candidates field takes id as an input and shows that how many votes are currently received by that respective candidate. voters field takes the address of a voter as an input and shows if that voter has already voted and finally the vote field takes the id of a candidate as input and adds up to the total vote count of that candidate. The front-end application looks like this:

5. Conclusion:

Hence here an attempt is made to make a Dapp for voting which covers basic security factors and maintains transparency during voting process. Also by seeing the front end part, it seems promising and easy to use application. Blockchain is a rapidly growing field and is will continue to grow as big data thrives in our world. So we can expect to have almost all things making use of blockchain in one or another way.

References:

Co-authors: Amith sreevalsan, Rahul choudhary, Aboli paighan, Priya shanthini