0% found this document useful (0 votes)
56 views61 pages

Final Report 2022

This project report describes the development of a decentralized e-voting system using blockchain technology. It aims to address the security issues with current centralized voting systems by leveraging the properties of blockchain such as transparency, security, and immutability. The system was developed by two students as a partial fulfillment of their Bachelor of Engineering degree. The report covers literature review on existing e-voting systems and blockchain technology, design of the proposed system including modules and architecture, implementation details like flowcharts, algorithms, and testing process, results and screenshots of the working system, and conclusions along with future scope.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views61 pages

Final Report 2022

This project report describes the development of a decentralized e-voting system using blockchain technology. It aims to address the security issues with current centralized voting systems by leveraging the properties of blockchain such as transparency, security, and immutability. The system was developed by two students as a partial fulfillment of their Bachelor of Engineering degree. The report covers literature review on existing e-voting systems and blockchain technology, design of the proposed system including modules and architecture, implementation details like flowcharts, algorithms, and testing process, results and screenshots of the working system, and conclusions along with future scope.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

A Project Report

Decentralized E-Voting System Using Block Chain


Technology
Submitted in partial fulfillment of the requirements for the award of degree

BACHELOR OF ENGINEERING
in
COMPUTER SCIENCE AND ENGINEERING
by

JASHWANTH BHEEMAPAKA (160118733098)


DOMAKONDA RAVI TEJA (160118733308)

Department of Computer Science and Engineering


Chaitanya Bharathi Institute of Technology (Autonomous)
(Affiliated to Osmania University, Hyderabad)
TELANGANA (INDIA) –500 075
[2021-2022]
CERTIFICATE

This is to certify that the project titled “Decentralized E-Voting System Using Block
Chain Technology” is the bonafide work carried out by JASHWANTH
BHEEMAPAKA (160118733098) and DOMAKONDA RAVITEJA
(160118733308),students of B.E.(CSE) of Chaitanya Bharathi Institute of
Technology(A), Hyderabad, affiliated to Osmania University, Hyderabad,
Telangana(India) during the academic year 2021-2022, submitted in partial fulfillment
of the requirements for the award of the degree in Bachelor of Engineering
(Computer Science and Engineering ) and that the project has not formed the basis
for the award previously of any other degree, diploma, fellowship or any other similar
title.

Supervisor
Dr .Y. Rama Devi
Professor and Head
Department of CSE,
Prof. N Rama Devi. CBIT(A),Hyderabad
professor, CSE Dept
CBIT(A),Hyderabad

Place: Hyderabad
Date:

ii
DECLARATION

I/we hereby declare that the project entitled “Decentralized E-Voting System Using
Block Chain Technology” submitted for the B.E (CSE) degree is my original work
and the project has not formed the basis for the award of any other degree, diploma,
fellowship or any other similar titles.

Place: Hyderabad

Jashwanth Bheemapaka(160118733098)

Date:

Domakonda Ravi Teja (160118733308)

iii
ACKNOWLEDGEMENT

It is our privilege to acknowledge with deep sense of gratitude and devotion for keen
personal interest and invaluable guidance rendered by our Project Guide N.Rama Devi,
Professor, CSE Department,CBIT (A).

We are very thankful for the assistance and guidance of T.Sridevi, Associate Professor,
CSE Department, E. Kalpana, Assistant Professor, CBIT(A).

We take the opportunity to express our thanks to Dr. Y.RamaDevi, Professor & Head
of CSE Department, CBIT (A)for her valuable suggestions and moral support.

We are grateful to our Principal Dr.P.Ravinder Reddy, Chaitanya Bharathi Institute


of Technology(Autonomous), for his cooperation and encouragement.

Finally, We also thank all the staff members, faculty of Dept. of CSE, CBIT(A), and
our friends, who with their valuable suggestions and support, directly or indirectly
helped us in completing this project work

Iv
ABSTRACT

In today's democracy, elections are very important but large sections of society around
the world do not trust their electoral system which is a major concern for democracy.

Even the world's largest democracies like India, the United States, are still plagued by
flawed electoral systems. Voter fraud, EVM (electronic voting machine), electoral
fraud, and confiscation of polling stations are major problems in the current voting
system.

Blockchain is a emerging, distributed, and distributed technology that promises to


improve the various aspects of many industries. Increasing e-voting in blockchain
technology could be a solution to the concerns of the e-voting system.

Blockchain is a powerful tool because of its smarts contracts and many features that
override traditional systems.

Blockchain, with smart contracts, emerges as a viable candidate for the development of
secure, cheap, secure, transparent, and easy-to-use electronic voting systems. Due to its
consistency, extensive use, and logic provision of smart contracts, Ethereum and its
network are one of the most appropriate.

V
TABLE OF CONTENTS

Title Page I
Certificate II
Declaration III
Acknowledgement IV
Abstract V
List of Figures VIII
List of Tables IX

1. INTRODUCTION
1.1 Problem Definition , significance and objective 10
1.2 Methodologies 11
1.3 Outline of the project 11
1.4 Scope of the project 12
1.5 Organization of the report 13

2. LITERATURE SURVEY

2.1 Introduction to the problem domain terminology 14


2.2 Existing solutions for decentralized e-voting system 17
2.3 Related works 18
2.4 Tools/Technologies used 20

3. DESIGN OF THE PROPOSED SYSTEM


3.1 Block Diagram 21
3.2 Module Description 23
3.3 Theoretical Foundation/Algorithms

4. IMPLEMENTATION
4.1 Flowcharts /DFDs / ER Diagrams 25
4.2 Design and Test Steps / Criteria 30
4.3 Algorithms / Pseudo Code 30
4.4 Data Set description 32
4.5 Testing Process 32
5. RESULTS 33

6. CONCLUSIONS
6.1 Conclusions
6.1.1 Limitations 46
6.2 Recommendations /Future Work / Future Scope 47

REFERENCES 48

APPENDICES 51
LIST OF FIGURES

Figure Page No.

3.1 System Architecture 21

3.2.1 Frontend and backend modules 23

3.2.2 Dependencies 24

4.1 ER diagram 25

4.2 Case diagram 26

4.3 Class diagram 27

4.4 Sequence diagram 28

4.5 Block Chain Deployment 29

5.1 Homepage 33

5.2 User login 33

5.3 Signup page 34

5.4 User dashboard 34

5.5 Voter area 35

5.6 Results of Voting 35

5.7 About page 36

5.8 Add candidates 36

5.9 Candidate details 37

5.10 Change Election Phases 37

5.11 Analytics of Voting 38


5.12 Metamask wallet 39

5.13 Contract information 40

5.14 Etherscan 41

5.15 Gas fees 42

5.16 Ganache Suite 43

5.17 Account Information for each key 43

5.18 website on google search 44

VIII
List of Tables

Table Page No

1- What a Transaction Contain 45

IX
1.INTRODUCTION
An electoral system or voting system is a set of rules that determine how elections and
referendums are conducted and how their results are determined. Political electoral
systems are organized by governments, while non-political elections may take place in
business, non-profit organisations and informal organisations. E-voting systems can
crash on election day, can lose or scramble votes, or can operate incorrectly. Even minor
errors can be catastrophic because a fault in an electronic system has the potential to be
systematic and centralised, whereas in manual systems faults tend to be random and
localised.

Even minor errors can be catastrophic because a fault in an electronic system has the
potential to be systematic and centralised, whereas in manual systems faults tend to be
random and localised. Even the world’s largest democracies like India, United States,
still suffer from a flawed electoral system. Vote rigging, hacking of EVM (Electronic
voting machine), election manipulation, and polling booth capturing are the major
issues in the current voting system.

1.1Problem Definition , significance and objective

Problem Definition : Current voting systems such as ballot box voting or electronic
voting are subject to various security threats such as DDoS attacks, voting booths, vote-
rigging and fraud, malware attacks, etc., and require large amounts of paper, human
resources, and time. This creates a sense of mistrust between existing systems.

Disadvantages are: Long lines during elections, Security breaches such as data leaks,
vote rigging, It is difficult for disabled voters to reach the polling station, The cost of
elections is high.

Significance : This project report is to provide comprehensive information about the


technical aspects and real-time design of the project - Extended E Voting System Using
Block Chain Technology (Web application for citizens of each country).

Page 10 of 60
Objective: The objective of this project is to build a platform using Block chain smart
contracts.

Detailed research of electoral processes as it relates to voting.Design and develop


software forums for voter registration, election voting, real-time election collection and
monitoring and especially voters reaching remote elections.

1.2Methodologies

This project will be a web application with front end, back end and database.
Registration of voters and candidates must be done in advance. Personal verification
must be done before creating accounts. After verifying the identity document, the
authorized person must verify the eligible users by proving a coin or token Using this
coin or token each user can vote only once. The Blockchain verification process will
ensure that dual use of this symbol is not possible. So any user can not vote multiple
times. The blockchain-based e-voting system has been expanded. There is no central
authority to conduct elections. Votes are cryptographically protected.

An app dedicated to electronic voting, or dApp, built into the Ethereum blockchain. A
smart Ethereum contract was signed with Solidity to get the votes cast. User
communication on the client side is designed to use Ethereum accounts for voting.

1.3 Outline of the project

At the end of the project, our application accomplishes all the functional
requirements.[16]

• Votes are cryptographically protected.


• The votes cast are unchanged and uninterrupted.
• Keeps voter privacy and anonymity.
• The E voting system can improve voter participation.
• It can improve efficiency and allow faster results.
• Promotes transparency and clarity in the system.
• Eliminates misunderstandings arising from incorrect / vague
selections made on ballot papers.
• Voting results read publicly.

Page 11 of 60
1.4 Scope of the Project

This project is intended to work on various devices such as mobile, PC / Laptop. This
project will only work once the main function in the backend has been completed.
Blockchain is a distributed spreadsheet program that accesses, verifies, and transmits
network data through distributed nodes.

First of all, the objectives of the project will be determined. Then the software
requirements will be analyzed. The planning languages involved, the frameworks used,
the technology to be used etc. will be analyzed.

Then the hardware requirements are understood, what type of hardware is required, etc.,
will be understood.

Hardware will be acquired and configured to operate according to written software


requirements. The final product will be tested, and the results will be recorded.

1.5 Organization Of The Report

This report will clearly explain the terminologies used, tools used, proposed
implementations, results of the implementations, and conclusions drawn from the
results. After this introduction section,

section 2, the literature survey, will introduce the problem in detail. It will go over the
necessary domain terminology, mention the tools, and discuss how they will be used.
We will then go over the existing solutions that have already been presented along with
any other related works.

Section 3 ,We will look into the details of how exactly we implement this tool and how
this tool is run and implemented differently from the existing solutions. Block
diagrams, implementation architectures, module descriptions, and any other relevant
descriptions of the tool’s design will be clearly presented in this section.

Page 12 of 60
Next, section 4 will show the implementation of the proposed system. This section will
depict the implementation of the tool through flowcharts, DFDs, ER Diagrams, etc. The
algorithms or pseudo code will also be presented in this section. Any data sets would
also be presented and described in this section.

In section 5, We’ll look at how the tool run at each step and displaying all the outputs
and results obtained from the training and execution of our proposed model.

Finally in section 6, we’ll come to a conclusion, based on our implementation and


results, whether the tool successful. Finally, after observing all the results and drawing
conclusions, we present our recommendations on how to use this tool, who should use
this tool, what scenarios is it most effective in, how we can improve it, and so on. The
future works and scopes of this project will also be discussed in this section.

Page 13 of 60
2. LITERATURE SURVEY

2.1 Introduction to the problem domain terminology


Let us discuss the terminology related to the problem domain.

2.1.1 BlockChain

A blockchain is a shared site shared between computer network nodes.As a web site,
blockchain stores computer information in a digital format. Blockchains are best known
for their important role in cryptocurrency systems, such as Bitcoin, by keeping a secure
and separate record of transactions.

2.1.2 SmartContract

Smart contracts are simply blockchain-based programs that work where predetermined
conditions are met. They are usually used to automatically execute a contract so that all
participants can be immediately assured of the outcome, without the involvement of
any arbitrator or loss of time.

2.1.3 Ethereum

Ethereum is a blockchain platform with its own cryptocurrency, called Ether (ETH) or
Ethereum, and its own programming language, called Solidity. Ethereum is an all-
inclusive public bridge to verify and record activity.[12]

2.1.4 Dapp

DApps works similarly to standard web applications; However, they do get


their status and data on a blockchain network (or multiple blockchain
networks). DApps does not require a central web server to operate and can
only communicate via the blockchain network messaging protocol
connected to it.

Page 14 of 60
2.1.5 Solidity

Solidity is a programming language used to develop smart contracts in Ethereum and


other blockchain platforms, such as Monax and its Hyperledger Burrow
blockchain.[12]

2.1.6 Metamask

MetaMask is a cryptocurrency wallet used to communicate with the Ethereum


blockchain. Allows users to access their Ethereum wallet via a browser extension or
mobile application, which can be used to communicate with isolated applications.

2.1.7 Truffle

Intelligent Contract development area that integrates features such as an exploration


framework and a supply chain for blockchains using Ethereum virtual machine (EVM)
which makes engineer unit testing faster and easier.

2.1.8 web3.js

Web3.js is used to connect a localhost or remote ethereum node using HTTP, IPC or
WebSocket.[13]

2.1.9 Hyperledger sawtooth

Hyperledger Sawtooth provides a flexible and modular architecture that separates the
main program from the application domain, so smart contractors can specify the
business rules of the applications without knowing the basic design of the main system.

Page 15 of 60
2.1.10 Invisible signature

A blind signature, is a digital signature in which the content of a message is encrypted


(blinded) before it is signed. The resulting blind signature can be publicly verified
against a real, flawless message in the form of a standard digital signature.

2.1.11 Merkel Tree

The Merkle Tree is an integral part of blockchain technology. It is a mathematical data


structure composed of hashes of different data blocks, and serves as a summary of
everything that is done in the block.

2.1.12 DAO

DAO represents the Decentralized Autonomous Organization. As the name implies, it


is an independent and divided organization. At one time, it was also known as the
Decentralized Autonomous Corporation (DAC), but the term DAO is widely used
because not all corporations are corporations.

2.1.13 Distributed Manual

A distributed ledger is a type of shared database that is agreed upon, duplicated, and
synchronized between members of a shared network. All information in this file is
stored securely and accurately using cryptography.

Page 16 of 60
2.2 Existing solutions for decentralized E-voting system

Voting online is a growing practice in today's society.


One-on-one risk can lead to massive voter turnout. Electronic voting systems must be
legitimate, accurate, secure, and competent when used in elections. However,
acquisitions may be limited to potential problems associated with electronic voting
systems. Blockchain technology comes down to overcoming these issues and provides
electronic voting booths and is used to generate electronic voting systems mainly
because of their benefits of end-to-end voting. This technology effectively replaces
conventional electronic voting solutions with distributed, unrestricted features, and
security features.[15]
This study provides an overview of the blockchain-based targeted electronic voting
application as well as an introduction to the basic structure and blockchain features
regarding electronic voting.
As a result of this study, it has been found that blockchain programs can help solve
some of the problems currently plaguing electoral systems. On the other hand, the most
frequently mentioned issues in blockchain systems are to protect privacy and
purchasing speed. With an electronic blockchain-based electronic voting system,
remote participatory security must be operational, and in order to minimize, the
transaction speed must be adjusted. Due to these concerns, it was decided that the
existing structures needed to be improved in order to be used in voting systems.
The Blockchain technology that corrected the shortcomings of today's electoral system
made voting process clearer and more accessible, stopped illegal voting, strengthened
data protection, and evaluated voting results.

Page 17 of 60
2.3 Related works

[1] “Implementation of a Blockchain Enabled E-Voting Application Within IoT-


Oriented Smart Cities”- their approach is a two-pronged approach, namely, both
national election bodies and the rest of the organization can ensure security when IoT
devices are compromised using the blockchain method. The Blockchain voting system
uses not only electoral bodies but also informed voters in case they interfere with their
votes before the scheduled counting date.

[2] “Votereum: An Ethereum-Based E-Voting System”- EthVote, on the other hand,


is a site-divided app that runs on the Ethereum blockchain and benefits from a smart
contract. In this process, only eligible voters are allowed to vote while their identity is
unknown. This is achieved by using a Blind Signature when the message is signed
unless its content is disclosed and verified as a standard digital signature.

[3] “A blockchain based E-voting system”- They have analyzed three blockchain
frameworks for implementation and use our smart election contracts. Those are
Exonum, Quorum and Geth. Go-Ethereum or Geth is one of the three main uses of the
Ethereum protocol. It uses smart contract plans as planned without the possibility of
inefficiency, research, fraud or interference by third parties. This framework supports
the further development of the Geth protocol and is the most appropriate framework for
the developer .The level of performance depends on the blockchain being used as a
public or private network.they use a region-based voting system.

[4] The Hyperledger Sawtooth framework is used to ensure consistency using the same
transaction processing, and to use two different stages in a single blockchain, to ensure
anonymity and fairness in the voting process. and blockchain business logic, a smart
contract, to be implemented.

Page 18 of 60
[5] “ElectionBlock: An Electronic Voting System using Blockchain and
Fingerprint Authentication”- ElectionBlock adheres to the standard principles of
central blockchain technology and integrated biometric authentication. Registered
voters will have their biometrics registered on the website. will verify that the user is a
registered voter, and secondly, will check the blockchain to ensure that the user has not
cast a vote. Voting is accelerated using the Merkle Tree algorithm.

[6] “Decentralized Voting Platform Based on Ethereum Blockchain”- Key features


of the system include ensuring data integrity and transparency, and enforcing one vote
per phone number for each poll with a guaranteed privacy. To achieve this, Ethereum
Virtual Machine (EVM) is used as a Blockchain running platform.

[7] “Comparitive Analysis on E-Voting System Using Blockchain”.“Fraud-


Resistance”- The system should verify the identity of each potential voter and
determine his or her status, but should not allow this information to be associated with
their vote. The “Easy to Use” option should work for the whole community. It should
be designed in such a way that it can be used with minimal training and some technical
skills.

[8] “A Smart Contract For Boardroom Voting with Maximum Voter Privacy” -
doped an online voting protocol with separate features and greater voting privacy using
Open Vote Network (OVN) .OVN is a smart Ethereum Blockchain contractor. After
using the program the creators concluded that it cost $ 0.73 per voter in the program.
Researchers soon found that OVN was at risk of being attacked by DOS and traffic
jams at the time of purchase.

Page 19 of 60
[9] “Securing e-voting based on blockchain in P2P network”- Designed a
harmonized model of DLT-based voting records to avoid vote-rigging.Design an ECC-
based user verification model to provide authenticity and non-refusal.Design a
withdrawal model that allows voters to change their vote before the deadline.

[10] “Implementation of an E-Voting Scheme Using Hyperledger Fabric


Permissioned Blockchain”- Compared to latency it has been found that with a low
transaction value, the Ethereum delay is 2x times the Hyperledger.And in the transition
no transaction the Hyperledger rate output is greater than Ethereum.

1.4 Tools/Technologies Used

React.js - React is a JavaScript library for building user links. Used for building single
page applications. React allows us to create reusable UI components.

We used React.js for developing front-end of the E-voting Application.

Page 20 of 60
3.DESIGN OF THE PROPOSED SYSTEM

3.1 Block diagram

Figure 3.1 System Architecture

1.Frontend: The part visible to the user. It is an interface through which users will
interact the components/pages available in the website . It also contains all the stylized
pages. This is created mainly using React.js and styled using MaterialUI. The
Metamask extension is the wallet which is used by the user for initiating transactions.

2.Backend:The website is fully functional in localhost.To make it get accessed by


everyone we have used Infura IPFS server where we hosted the website on it,and it is
accessible everywhere.

Page 21 of 60
IPFS is a distributed system .Designed for speed and simplicity, the IPFS API for Infura
and the dedicated gateway connects applications of all sizes to a secure, distributed
environment, opening up a web-resistant webpage.

3.Blockchain: A smart contract is a tamper-proof program that runs on a blockchain


network.we have used Ethereum blockchain Network in this project.[11]

Page 22 of 60
3.2 Module description
➢ Metamask: A browser plugin that acts as an Ethereum wallet, and is installed
just like any other normal plugin. Once installed, it allows users to store Ether
and other ERC-20 tokens, enabling them to make transactions at any Ethereum
address.The website can be accessed in the local computer or globally using
infura IPFS.

➢ The voting system is deployed on infura so as to access globally.

Figure 3.2.1 Frontend and Backend Modules

Page 23 of 60
The project is developed with React.js where many files have been coded and many
libraries have been imported.It has many components like Admin, User, Contracts and
soon.The project has been deployed on Infura Ipfs platform.

Dependencies:

Figure 3.2.2 Dependencies

These are the dependencies that have been installed to develop the project.There are
many versions but we have used the ones which are compatible for our project.

Page 24 of 60
4. IMPLEMENTATION

4.1 Flowcharts / DFDs / ER Diagrams

ER Diagram

Figure 4.1 ER-Diagram

Here the Admin will manage the Voters and Party Candidates, the user will cast his
vote. Only the voters who are registered will be eligible for voting.

Page 25 of 60
Class Diagram

Figure 4.2 Class Diagram

This is a class Diagram where classes have been created for party, Admin, Phases, User,
Vote. Each class has different Attributes and Methods.

Page 26 of 60
Sequence Diagram

Figure 4.3 Sequence Diagram

This is a sequence diagram which shows the flow of casting of a vote from user/voter
to Ethereum chain. The Transaction will be submitted for mining and block will be
appended to Ethereum chain and total vote count will be increased by one on electrol
candidate.

Page 27 of 60
Use Case Diagram

Figure 4.4 Use Case Diagram

This is a use case diagram which describes the role of each of the voter and Admin. The
Admin manages the overall elections. The system checks voter identity and Admin will
verify the voter details.

Page 28 of 60
BLOCK CHAIN DEPLOYMENT

Figure 4.5 Block Chain Deployment

The Truffle compile the smart contract and is converted to byte code the truffle will
migrate the byte code and will be deployed on the network.

The user uses a Application binary interface to make a call to a function.

Page 29 of 60
4.2 Design and Test Steps / Criteria
• User has to create an account with Email and login to website

• Then user need to register with aadhar number and admin checks whether the
aadhar is eligible to register or not.

• Admin will activate the user account.

• Admin will add the candidates who are participating in elections and change the
phase to “voting”

• Now Voting will become live and users start voting to candidates and results
are hidden .

• Admin has to change the phase to “Election is done” and results are shown.

• The system is non hackable and is fully secured.

• The system does not allow user to cast his vote more than once.

4.3 Algorithms / Pseudo Code

4.3.1 Creating accounts and verification process

Step1: Start

Step2: User will create his account with email and password.

Step3: User need to give his Aadhar number after login ,admin will verify
the number.

Step4:Stop

Page 30 of 60
4.3.2 Adding Candidates interested in elections and election phase

Step1: Start

Step2: Admin will add the candidates and turn the phase to Election Phase
on Election day.

Step3:Users start casting their votes and once voted cannot cast again the
system shows warning.

Step4:The transaction will happen with metamask wallet and Ethereum


will be deducted from user account.

Step5:Stop

4.3.3 Result Phase

Step1: Start

Step2: Admin will change the phase of elections to results and users can’t
cast their vote.

Step3: users can view the results by going to the results tab in the website.

Step4: Stop

4.4.4 Ethereum deduction

Step1: Start

Step2: Ethereum will be deducted for user creation, Admin creation,


Changing election phases.

Step3: to view the transactions ,open etherscan.

Step4: Stop

Page 31 of 60
4.4 Data Set description
This is a web based application and it doesn’t require any data set.

4.5 Testing Process


➢ Different User accounts have been created and added candidates participating
in elections.

➢ Casted votes from created account and checked whether user can cast the vote
more than once or not.

➢ All the block chain transactions have been checked carefully and no problem
arised.

Page 32 of 60
5 . RESULTS
In this project we used React.js for developing front-end and solidity to write smart
Contracts. we used Metamask wallet for performing transactions using ether. The
application is working and is deployed on Netlify hosting site, everyone can access
the website from any location. The transactions in the application are immutable,
transparent and are secured.

Figure 5.1 Homepage

This is the Homepage of the E-Voting web application where there are User login and
Admin Login Features.

Figure 5.2 User Login

User need to create his account by providing his Email Id and a unique Password.

Page 33 of 60
Figure 5.3 SignUp

If a user is new to the website he/she must create a new account by providing a
username, Email Id, Password. If Email Id already exists then the website will not
allow user to create the account.

Figure 5.4 User Dashboard

Page 34 of 60
Once the user login successfully the user will be redirected to User Dashboard, After
which the user need to provide his Aadhaar Details to be eligible for voting.The Admin
will check the Age from Aadhaar details and may allow the user to cast the vote if
eligible else will be rejected.

Figure 5.5 Voter Area

This is the area where user will cast his vote once the time has come for Elections. The
Candidates who are Participating in elections will will be displayed here.

Figure 5.6 Results of Voting

Page 35 of 60
The Results page is where the candidate who won in the elections will be displayed and
it also shows each candidate got how many votes.

Figure 5.7 About Page

This is the page for user reference where it gives a clear idea for the user how election
process carry on.

Figure 5.8 Add Candidates

This is the Admin dashboard where the contesting candidate details will be added by
the admin.

Page 36 of 60
Figure 5.9 Candidate details

Once the admin add the candidate details the data will be shown in the Candidate details
page.

The attributes are Name, Age, Party Name, Qualification, No of votes.

Figure 5.10 Change state

This is the area where admin will change the state of elections to Registration, Voting,
Result.

Page 37 of 60
If the state is Registration means the admin is adding the eligible candidates for
elections where user cant see the vote button.

If the state is Voting implies that users can cast their vote.A user can cast a vote only
once.

If the state is Results implies that the elections are completed and the results are
announced where users can see the results.

Figure 5.11 Analytics of Voting

This is the page which describes total no of candidates and total votes casted as of now.

The Graph shows who has got more votes as of now i.e till a particular time.

Page 38 of 60
Figure 5.12 Metamask wallet

MetaMask is used to store and manage account keys, streaming, send and receive
cryptocurrencies and Ethereum-based tokens, and is securely connected to nationally
distributed systems via a compatible web browser or built-in mobile browser.

For casting the vote, changing the phase of elections, adding the candidates we need to
spend some ether to perform a transaction.

Page 39 of 60
In today’s global market the cost of 1 Ether is around 2.5 lakhs to 3 lakhs.In this
application we have got some free ether from different testing providers. The ether has
no value that is we cant sell to gain the money.

Instead we can make use of Ganache Truffle suite which provide 10 free accounts with
100 Ether each for one particular project.We can create any no of projects in Ganache
Truffle suite.

Figure 5.13 Contract Information

When a transaction is performed we can get to know all the transaction information but
we cant track the transaction made by a user.

Page 40 of 60
The transaction has the following information:

Nonce

Amount:

The total amount used in performing a transaction.

Gas Limit:

Gas Limit is the maximum amount a cryptocurrency user is willing to pay when
sending a job, or doing smart contract work, to the Ethereum blockchain.

Gas used:

It is the fee or the pricing value that is used to perform the transaction.

Base Fee, Priority fee, Total gas fee, Max fee for gas and total Ethereum spent on the
transaction.

Figure 5.14 Etherscan

Page 41 of 60
We can also view the transaction details on the etherscan website which contains all the
information about the transaction.

Figure 5.15 Gas Fees

Page 42 of 60
Figure 5.16 Ganache Suite

Ganache is an instant blockchain for Ethereum and Corda 's distributed application
development. We can use Ganache for the development, which enables us to develop,
implement, and test our dApps in a secure and secure environment.[14]

Figure 5.17 Account Information for each key


Ganache Provides 10 free accounts which we can use in our application, the account
address is 42 characters length which is in hexadecimal format.
Page 43 of 60
The private key is a unique key for each and every key. We need to use this in order to
perform a transaction.

Figure 5.18 website on google search

We have successfully deployed the application on Netlify, where users can access the
application by living any place. This only works if they have Metamask extension on
their browser and have some Eth coins with them.

https://e-voting-blockchain.netlify.app/

Page 44 of 60
TRANSACTION

Nonce How many time the sender has sent a transaction

To Address of account the money is going to

Value Amount of Ether to send to the target address

Gasprice Amount of Ether the sender is willing to pay per unit


gas to get this transaction processed

Startgas/gaslimit Units of ga that this transaction can consume

V
Cryptographic pieces of datathat can be used to
T generatethe senders account address.
Generated from the users private key.
S

Table 5.1 What a Transaction contain

Page 45 of 60
6. CONCLUSIONS
6.1 Conclusions
Active E-Voting platform created using HTML / CSS / JavaScript, React.js, Material
UI, Ganache, Truffle Integrated Environment, Infura and Metamask. Users were able
to register for the application and the administrator was able to add candidates to the
election. The administrator was able to control the entire election process.The main
objective of the project and achieved is that the user can only vote once. In each case
the work will be done using the Metamask wallet and the details of the transaction will
be displayed on the ether scan, but no one can track the user who did the work because
it is completely protected by cryptographic hashing. User votes are cryptographically
protected. Once the votes have been saved they have not changed and there is evidence
of disruption. The system maintains voter privacy and anonymity. The program also
promotes transparency. The system allows for quick results.

Voting results are publicly auditable.

6.1.1 Limitations

• There are no form validators present to validate form fields.


• Error handling is very limited.
• The Transaction speed is somewhat slower.
• We currently do not have Aadhaar Api and everyone who accesses a website
and provides an Aadhaar number after logging in can vote irrespective of the
age.
• Every one can’t buy Ethereum because it is costly.
• A better user Interface need to be designed.

Page 46 of 60
6.2 Recommendations/Future Work/Future Scope

The application should have a proper Domain name instead of using Hosting systems
like Heroku and Netlify. The application can have translation feature using Google Api.
We can also add Face Recognition feature to have more security when ever user login
to the application. The Aadhaar Card validation is not added in the current application
as the Api is not open source and will not be given for un-authorized users.

We can add more Stylings to improve the website and can make the system
robust.
We need to work on or look on how to make the transaction speed faster.

Page 47 of 60
REFERENCES
[1] G. Rathee, R. Iqbal, O. Waqar and A. K. Bashir, "On the Design and
Implementation of a Blockchain Enabled E-Voting Application Within IoT-
Oriented Smart Cities," in IEEE Access, vol. 9, pp. 34165-34176, 2021, doi:
10.1109/ACCESS.2021.3061411.

[2]L. V. Thuy, K. Cao-Minh, C. Dang-Le-Bao and T. A. Nguyen, "Votereum:


An Ethereum-Based E-Voting System," 2019 IEEE-RIVF International
Conference on Computing and Communication Technologies (RIVF), 2019, pp.
1-6, doi: 10.1109/RIVF.2019.8713661.

[3] F. Þ. Hjálmarsson, G. K. Hreiðarsson, M. Hamdaqa and G. Hjálmtýsson,


"Blockchain-Based E-Voting System," 2018 IEEE 11th International
Conference on Cloud Computing (CLOUD), 2018, pp. 983-986, doi:
10.1109/CLOUD.2018.00151.

[4]S. K. Vivek, R. S. Yashank, Y. Prashanth, N. Yashas and M. Namratha, "E-


Voting Systems using Blockchain: An Exploratory Literature Survey," 2020
Second International Conference on Inventive Research in Computing
Applications (ICIRCA), 2020, pp. 890-895, doi:
10.1109/ICIRCA48905.2020.9183185..

[5]M. Ibrahim, K. Ravindran, H. Lee, O. Farooqui and Q. H. Mahmoud,


"ElectionBlock: An Electronic Voting System using Blockchain and
Fingerprint Authentication," 2021 IEEE 18th International Conference on
Software Architecture Companion (ICSA-C), 2021, pp. 123-129

[6]D. Khoury, E. F. Kfoury, A. Kassem and H. Harb, "Decentralized Voting


Platform Based on Ethereum Blockchain," 2018 IEEE International
Multidisciplinary Conference on Engineering Technology (IMCET), 2018, pp.
1-6, doi: 10.1109/IMCET.2018.8603050.

Page 48 of 60
[7]K. Garg, P. Saraswat, S. Bisht, S. K. Aggarwal, S. K. Kothuri and S. Gupta,
"A Comparitive Analysis on E-Voting System Using Blockchain," 2019 4th
International Conference on Internet of Things: Smart Innovation and Usages
(IoT-SIU), 2019, pp. 1-4, doi: 10.1109/IoT-SIU.2019.8777471.

[8]K. Patidar and S. Jain, "Decentralized E-Voting Portal Using Blockchain,"


2019 10th International Conference on Computing, Communication and
Networking Technologies (ICCCNT), 2019, pp. 1-4, doi:
10.1109/ICCCNT45670.2019.8944820.

[9]Yi, H. Securing e-voting based on blockchain in P2P network. J Wireless


Com Network 2019, 137 (2019). https://doi.org/10.1186/s13638-019-1473-6

[10]A. Kaudare, M. Hazra, A. Shelar and M. Sabnis, "Implementing Electronic


Voting System With Blockchain Technology," 2020 International Conference
for Emerging Technology (INCET), 2020, pp. 1-9, doi:
10.1109/INCET49848.2020.9154116.

[11]Geth.ethereum.org. (2018). Go Ethereum. Available at: https://geth.


ethereum.org/

[12](documentation) - Solidity v0.8.10, 2016-2021

Available:https://docs.soliditylang.org/en/
v0.8.10/

[13](documentation) - web3.js v1.5.2,2016


Available: https://web3js.readthedocs.io/en/v1.5.2/

Page 49 of 60
[14] (web article) Akash Mittal - Truffle Suite tutorial: How to develop
Ethereum smart contracts, November 2021
Available:https://blog.logrocket.com/truffle-suite-tutorial-develop-
ethereum-smart-contracts/

[15]MDPI and ACS Style


Jafar, U.; Aziz, M.J.A.; Shukur, Z. Blockchain for Electronic Voting System—
Review and Open Research Challenges. Sensors 2021, 21, 5874.
https://doi.org/10.3390/s21175874

[16]https://www.geeksforgeeks.org/decentralized-voting-system-using-
blockchain/

Page 50 of 60
APPENDICES
Solidity code

Page 51 of 60
Page 52 of 60
Web3.js

Page 53 of 60
Frontend
Step 1: Create React app
Step 2: Install required dependencies
Step 3: Create App.js file and create routes
Step 4: Create a screens folder to store page components
Step 5: Create components folder to store general components
Step 6: Create a user context
Step 7: Initialize Metamask using web3.js
Step 8: Check if Metamask is loading Ganache accounts
Step 9: After building main functionality add styling

Below code in smart in contract adds all users using map function in solidity language

Authentication
Authentication using normal Databases
• Firebase
• Mongodb
• Mysql
Above public databases there is a high chance of hacking , admin has chance to
manipulate database , here user details are at high risk
Authentication using Blockchain

Page 54 of 60
Declared function in smart contract

Calling smart contract function from frontend

Page 55 of 60
Modules used to develop website

Frontend Routes

Since we are using React JS it is a single page application here we use routes.

Page 56 of 60
Calculating the winner

Smart Contract code

Page 57 of 60
Frontend Code

ABI- Application Binary Interface

List of ABI contains all the functions of smart contract

Page 58 of 60
Page 59 of 60
Finally smart contract is deployed to the ropsten network which is provided by Infura

Page 60 of 60

You might also like