You are on page 1of 4

IEEE - 45670

Decentralized E-Voting Portal Using Blockchain


Kriti Patidar Dr. Swapnil Jain
Department of Electronics Department of Electronics
SVVV SVVV
Indore, India Indore, India
kriti.ekta@gmail.com swapniljain76@gmail.com

Abstract-Online voting is an alternative to age old paper public ledger records all the votes casted and is permanent
ballot system and the currently popular electronic voting and immutable. It ensures that no vote can be changed once
machines (EVM). An electronic voting portal should offer casted. If someone tries to manipulate the ledger, they need
security and integrity along with the transparency of votes to first hack all previous blocks before adding new block,
and privacy of voters. This paper proposes an e-voting system which is nearly impossible because of consensus
based on blockchain that eliminates some of the limitations in mechanism. To comprise the network hacker should
existing voting systems. The paper also presents state of art of compromise at least one-third or sometimes half of the
some blockchain frameworks for e-voting. The presented network depending on the consensus employed [5]. This
implementation is suitable for small scale elections like inside
paper further discusses some blockchain based e-voting
corporate houses, board rooms etc. The implementation uses
system implementations, its challenges and benefits.
smart contract from Ethereum. Truffle framework is used in
this paper for development, testing and deploying smart
contracts. Ganache is used as Ethereum client for testing. II. MOTIVATION FOR BLOCKCHAIN TECHNOLOGY
Here Meta-mask is used as browser wallet. Traditionally, the database is maintained by a central
Keywords—Blockchain, Smart Contracts, Electronic voting,
authority or a single organization that has then complete
Privacy, Ethereum. control of the database. It has the ability to tamper with the
database and manipulate the data. Usually the authority
maintaining the database is the same that has created it and
I. INTRODUCTION will be using it. In such cases the organization has no
This paper discusses a completely decentralized and motive of manipulating or falsifying its own data. But in
open, online voting system based on blockchain. other cases involving financial matters or sensitive data like
Blockchain is a decentralized peer-to-peer network (P2P). voting, it’s not wise to give total control of database to a
Aim of using blockchain is to remove centralized control single authority or organization.
and mediators from the process. Blockchain is being studied
Even if the organization is guaranteed as to not make
and research are going on to apply this disruptive
any fraudulent changes to the database, it is easier for
technology to different domains other than the financial
hackers to manipulate a central database. To avoid such
sector such as Internet of Things [1], medical or healthcare,
situations, blockchain makes the database public, so that
e-voting, logistics, e-commerce, real-estate, security and
anyone can store an individual copy of database that can
privacy [2].
always be compared to check for manipulations. However,
The idea behind an e-voting system based on blockchain the individual copies must always be updated to maintain
is similar to digital wallets. The system or authority can consistency. To maintain a consistent decentralized
issue a digital wallet to each participant after verifying its database, blockchain utilizes consensus mechanism.
identity. The wallet issued must contain the user credentials
and a single coin representing a single chance to vote [3]. III. RELATED WORK
When a user selects a candidate and casts its vote, the coin
in the user’s wallet is transferred to candidate’s account or This section presents some state-of-the-art of e-voting
wallet. At the end the number of coins in each candidate’s systems that uses blockchain. Reviewing the literature
wallet represents the number of votes cast to him. shows that blockchain based solutions have been proposed
for voting in organizations, communities and states.
Electronic and online voting system can provide more
security and integrity than EVM [4]. It also provides In 2014, in Russia, the city of Moscow’s Active Citizen
privacy to the users; as the eligible voters can cast their program was launched [6]. Many polls had been conducted
votes using their computers or even smartphones, thus since then on diverse subjects like what should be the colour
maintaining anonymity. It also builds trust on the system as of seats in a new sports arena, etc [7]. In 2017, in South
it is online and completely an open system. It can also Korea a smart contract based blockchain enabled voting
increase the number of participants’ involvement. system was used [8]. All the important data like votes and
results was stored on a blockchain. There was no
Blockchain eliminates the need of a central server to involvement of any central authority or management in the
manage network and a centralized database thus ensuring process.
trust. It is a complete decentralized open ledger system. The

10th ICCCNT 2019


July 6-8, 2019, IIT - Kanpur,
Kanpur, India
IEEE - 45670

In 2007, Estonia became the first country to allow use of A. Design considerations
online voting system. In 2015 parliamentary elections 30% Following points are important and should be
of votes were casted through e-voting system [9]. Estonia considered while implementing e-voting system:
uses the national ID card of citizens for identity verification.
These cards contain the identify information in encrypted x The e-voting system should verify the identity of
manner. This system allows the Estonian citizens to perform voters and authenticate only eligible voters.
many tasks online such as online banking services, access
information on government portals and e-voting. For voting, x The e-voting system should not allow access to
the citizens can enter their card into a card reader for invalid candidates.
verification. After verification the voter gets access to the x Any voter should get only a single chance to vote i.e.
voting website on the connected computer. After verifying system should prevent double voting.
user credentials, a voter has access to the site for four days.
In these four days user can cast its vote and can even change x It should provide complete privacy to voters and the
it several times. After submitting the vote, it passes through votes should not be traceable.
forwarding server and stored in a server in encrypted form. x It should not allow tampering with the votes casted
After the online voting period is completed, these votes are by anyone.
transferred to a counting server which is disconnected from
network. This server is responsible for counting the votes x The system should not allow single authority control
and giving the results. However, this e-voting system has on counting.
some potential risks. There may be malware on client side
machines that monitors and manipulates the vote casted. B. Ethereum
Estonia government also plans to use blockchain for other Blockchains can be classified into two categories:
applications such as online patient monitoring systems and permission-ed and permission-less. Permission-ed
maintain electronic health records. blockchains are private blockchain network with restrictions
In 2018, Agora which is Swiss blockchain startup on participation. Permission-less blockchains are public in
developed a blockchain based voting sytem. It was partially nature. In public blockchains there are no restrictions such
tested in 2018 Sierra Leone’s general elections [10]. Agora that anyone can read or write on blockchain ledger database.
is a complete end-to-end verifiable blockchain. It is Ethereum is a public decentralized blockchain network.
designed to provide an online voting system to corporate, Basically, Ethereum is platform that allows
governments and institutions. This blockchain based e- programmers to build decentralized applications using
voting system provides a token system, where the blockchain technology. It is a permission-less blockchain
institutions or the government purchases tokens for eligible network. This section describes the types of accounts used
voters. in Ethereum. Ethereum has two account types:
There are some other projects going on for blockchain
x External Accounts
based e-voting system implementation from many
organizations such as Abu Dhabi Stock Exchange, x Contract Accounts
FollowMyVote, TIVI, Blockchain Voting Machine [11]
etc. An externally owned account is a user controlled
account. It represents an external agent of network like
In 2017, McCorry et. al. proposed a Boardroom Voting users, miners etc. These accounts are regulated with a
with Maximum Voter Privacy [12]. It utilizes smart contract public-private key cryptography like RSA algorithms.
to provide self-tallying voting protocol. This blockchain Mainly external accounts are used by users as a means to
based decentralized Open Vote Network (OVN) is built interact with the Ethereum blockchain.
upon Ethereum.
A contract account is a smart contract which is a
In 2018, Jonathan et. al. proposed Netvote [13], a collection of code that regulates blockchain. These are
decentralized blockchain based voting system. It is based on stored at a specific address, hence considered as accounts.
Ethereum network and uses decentralized apps (dapps) for Contract accounts are always either invoked by some
user interface. Three dapps are proposed by the authors. external accounts or by other contract accounts. These
One is the Admin dapp, which is for management to set contracts are written in high level scripting languages such
policies and rules etc. Another dapp is Voter dapp used by as Solidity and Serpent.
individual users to register and vote. And then the Tally
dapp is used to tally and declare election results. However, Both of these accounts can store Ether. Ether is the
this system is based on private blockchain. crypto currency of Ethereum, denoted by “ETH” in crypto
currency exchanges. It is used for transactions fee and
services in the Ethereum network. These are used to pay
IV. IMPLEMENTATION DETAILS OF BLOCKCHAIN BASED E- Gas or transactions done. Gas is an intermediary token used
VOTING to make payment for computational work done for
This section discusses the design considerations for executing a smart contract or for some transactions. Gas can
implementing an electronic voting system based on be purchased using Ether.
blockchain. Later, an overview of Ethereum and smart
contract technology is presented.

10th ICCCNT 2019


July 6-8, 2019, IIT - Kanpur,
Kanpur, India
IEEE - 45670

C. Smart Contracts environment for blockchain network. Truffle development


Smart contracts are self executable code written inside framework can be used to build smart contracts, compile
blockchains. These are similar to conventional business built-in contracts; link and deploy those contracts.
contracts that are used for code of conduct agreement Ganache is part of Truffle ecosystem. It provides a
between two parties. The smart contracts execute private blockchain for Ethereum development. It can be
automatically when the defined conditions are met. Smart seen as an Ethereum client. It can be used to test the
contracts help to carry out agreements and transactions in a decentralized application built on truffle. It can be used to
trusted manner among the untrusted or unknown parties deploy contracts while developing decentralized
without the requirement of central authority. applications. It also facilitates to run tests on blockchain and
Smart contracts are written using Solidity language. It is smart contracts. Once the application is tested on ganache, it
an object-oriented language, and its syntax are similar to can be deployed on Ethereum client like Geth. Ganache
JavaScript or Python. Smart contracts have several benefits provides a local and virtual blockchain for testing. It
over conventional contracts like cost saving, and improved provides ten external user accounts. Each account in
efficiency. Smart contracts are popular as they are easily Ganache has been assigned a unique Ethereum address and
verifiable by all users and ensure trust among parties. a private key associated with it. All the accounts come pre-
loaded with 100 ‘fake’ ethers.
D. Working of Blockchain Voting System Ganache comes in two versions, CLI and UI. This
Registration process of voters and candidates is to be implementation has used UI version for simplicity. Running
done in advance. Identity verification should be done before ganache is similar to running an Ethereum node. It is like a
creating accounts. After identity verification, authorized virtual node. Ganache can be connected with wallets for
person should authenticate eligible users by proving a coin transactions. For this implementation, Meta-mask is used.
or token [14]. Using this coin or token each user can vote Meta-mask is a chrome extension, which connects to
only once. Blockchain’s verification process will ensure that Ethereum nodes and reads user wallets. Meta-mask uses
double spending of this token is not possible. So any user RPC to connect with Ethereum nodes.
cannot vote multiple times. The e-voting system based on Migrations are used to update the blockchain whenever
blockchain is decentralized. There is no central authority to a smart contract is deployed. For each smart contract we
conduct the elections. need to create a migration which is a numbered java script
file. Truffle framework automatically calls these files
sequentially. The smart contract is associated in the
migration file as following:

var TempContract = artifacts.require("./TempContract.sol");


module.exports = function(installer) {
installer.deploy(TempContract);
};

Fig. 1. Voting process

E. Implementation in Ethereum
The e-voting decentralized application, or dApp, is built
on the Ethereum blockchain. Ethereum smart contract is
written in Solidity for casting votes. A client-side user
interface is built to use Ethereum accounts to cast votes.
Truffle Framework is used in this implementation to test the Fig. 2. Screenshot of the voting portal welcome screen
smart contracts and deploy them to the blockchain. Truffle
framework facilitates to develop, test and deploy
decentralized applications. It provides a development

10th ICCCNT 2019


July 6-8, 2019, IIT - Kanpur,
Kanpur, India
IEEE - 45670

number of users’ authentication and validation, blockchain


requires much energy. So using blockchain based voting
system for national e-voting require more research on its
consensus.

VI. CONCLUSION AND FUTURE WORK


This paper presents a blockchain based e-voting system
that runs on Ethereum. It shows that blockchain technology
can overcome limitations of centralized voting systems.
This implementation uses Ethereum blockchain as a
network as well as database for storing voter’s accounts,
candidate details and votes. This implementation makes use
of smart contracts. This implementation is tested on virtual
client. In future it can be tested on Ethereum test net with
large number of accounts. In future work, the feasibility of
blockchain based e-voting system for large-scale election
should be analyzed.

REFERENCES
Fig. 3. Screenshot of the metamask confirmation notification when a [1] Francesco Restuccia, Salvatore D’Oro, Salil S. Kanhere, Tommaso
voter casts vote Melodia, and Sajal K. Das, "Blockchain for the Internet of Things:
Present and Future," IEEE Internet of Things Journal, vol. 1, no. 1,
pp. 1-8, January 2018.
[2] Yiyun Zhou, Meng Han, Liyuan Liu, and Wang Yan, "Improving
IoT Services in Smart-Home Using Blockchain Smart Contract," in
IEEE Confs. on Internet of Things, Green Computing and
Communications, Cyber, Physical and Social Computing, Smart
Data, Blockchain, Computer and Information Technology, Congress
on Cybermatics, pp. 81-87, 2018.
[3] Nir Kshetri and Jeffrey Voas, "Blockchain-Enabled E-Voting,"
IEEE Software, pp. 95-99, 2018.
[4] Friorik P. Hjalmarsson, Gunnlaugur K. Hreioarsson, Mohammad
Hamdaqa, and Gisli Hjalmtysson, "Blockchain-Based E-Voting
System," in IEEE 11th International Conference on Cloud
Computing, pp. 983-986, 2018.
[5] Bayu Adhi Tama, Bruno Joachim Kweka, Youngho Park, and
Kyung-Hyune Rhee, "A Critical Review of Blockchain and Its
Current Applications," in IEEE International Conference on
Fig. 4. Screenshot of the election result after user casts votes and Electrical Engineering and Computer Science (ICECOS) 2017, pp.
confirms the vote 109-113, 2017.
[6] M. Hochstein, “Moscow’s Blockchain Voting Platform Adds
Service for High-Rise Neighbors,” CoinDesk, 15 Mar. 2018;
V. BENEFITS AND CHALLENGES https://www.coindesk.com/moscows-blockchain-voting-platform-
Blockchain based e-voting system provides following adds-service-for-high-rise-neighbors, 2018.
benefits: [7] M.D. Castillo, “Russia Is Leading the Push for Blockchain
Democracy,” CoinDesk, 2018; https://www .coindesk.com/russias-
x Votes are cryptographically secured. capital -leading-charge-blockchain–democracy, 2018.
[8] “South Korea Uses Blockchain Technology for Elections,”
x Votes once stored are immutable and tamper-proof. KryptoMoney, https://kryptomoney.com/south-korea-uses-
blockchain-technology-for-elections, 2017.
x It preserves voter’s privacy and anonymity. [9] Andrew Barnes, Christopher Brake and Thomas Perry, “Digital
Voting with the use of Blockchain Technology”,
x E-voting system may improve active voter https://www.economist.com/sites/default/files/plymouth.pdf, 2016.
participation.
[10] Agora: Bringing our voting systems into the 21st century Available
x It may improve the efficiency and allow faster at: https://agora.vote/Agora_Whitepaper_v0.1.pdf, 2017.
results. [11] Hiren M Patel, Milin M Patel, Tejas Bhatt, “Election Voting Using
Block Chain Technology”, International Journal of Scientific
x It promotes transparency and clarity to the system. Research and Review, Volume 07, Issue 05, pp 1-4, May 2019.
[12] Patrick McCorry, Siamak F. Shahandashti and Feng Hao, “A Smart
x It eliminates ambiguities arising from wrong/unclear Contract for Boardroom Voting with Maximum Voter Privacy”,
choices made on paper ballots. Published in: Financial Cryptography and Data Security, Springer,
2017.
x Voting results are publically auditable. [13] Jonathan Alexander, Steven Landers and Ben Howerton, “Netvote:
A Decentralized Voting Network”, https://netvote.io/wp-
However, blockchain systems are complex in nature content/uploads/2018/02/Netvote-White-Paper-v7.pdf, 2018.
which may hinder its wide acceptability. For e-voting [14] D. Khader, B. Smyth, P. Y. Ryan, and F. Hao, “A fair and robust
systems continuous broadband access is another concern. voting system by broadcast”, in 5th International Conference on
Another issue can be the digital user skills. For large Electronic Voting, Vol. 205, pp 285-299, 2012.

10th ICCCNT 2019


July 6-8, 2019, IIT - Kanpur,
Kanpur, India

You might also like