Developing an electronic voting system that meets the practical needs of administrators has been a difficult task for a long time. Now, blockchain technologies solve this problem by providing a distributed ledger with immutable, encrypted, and secure transactions. Distributed ledger technologies are an interesting technological leap in the field of data innovation, transparency, and trustability. In public blockchain, distributed ledger technology is widely used. The blockchain technology can be used in an almost infinite number of ways to benefit from sharing economies. The purpose of this study is to assess how blockchain may be utilized to build electronic voting systems that can be used as a service. The purpose of electronic voting systems is explained in this article, as are the technological and legal limitations of employing blockchain as a service. Then, using blockchain as a foundation, we propose a new electronic voting system that fixes the flaws we observed. In general, this paper evaluates the capabilities of distributed ledger technologies by depicting a contextual investigation in order to fine-tune the process of political election decisions and employing a blockchain-based application that improves security and lowers the cost of conducting nationwide elections.

1. Introduction

For decades, electronic voting systems have been a hot topic of research, with the major goal of maintaining data and minimizing election costs by ensuring security conditions and compliance requirements for election integrity. The security and transparency of an election in a democracy entail fair political judgments. As a result, election security is a national security issue. Pen-and-paper-based voting methodologies were adopted or employed to democratically elect the candidates, compromising on the fairness of the election and political judgments [1]. As a result, an electronic voting system to replace the traditional voting system is required, which will reduce deception and ensure the security of the voting process by making it verifiable and traceable, thereby reducing the possibility of fraud [2]. The blockchain-based e-voting system is gaining popularity in today’s modern era. When implemented properly, it has the potential to lower organizational costs while increasing voter turnout. Besides this, in public blockchain, scalability, computational cost, processing, and adoptability are still issues, although they are reduced and controlled much more. In addition, cryptography is used to address the security and trust-related issues in electronic voting systems.

Earlier security communities considered electronic voting systems to be unsatisfactory due to physical security concerns. The reason is that anyone with physical access to a voting system can sabotage it, hence impacting all votes cast on it [3]. We addressed these limitations by proposing an electronic voting scheme using blockchain technology. In our proposed system, we are evaluating blockchain as a service application by implementing a consortium blockchain-based distributed electronic voting system.

As indicated in Figure 1, the blockchain can be classified into four types: private, public, hybrid, and consortium. Public blockchains are permissionless and decentralized. The nature of private blockchains is that they are centralized. Similarly, a consortium is a type of private permissioned blockchain in which centralized control is maintained by a group of companies. A hybrid blockchain is one that combines public and private blockchains [4]. However, in a blockchain-based e-voting system, we use permissioned blockchain because voting is limited to people over the age of 18. As a result, we only allow individuals who meet certain criteria to maintain security and immutability.

Blockchain is a distributed, immutable, and secure public ledger [5]. In blockchain technology, the ledger is located in different locations. The maintenance of the services in distributed ledgers is easy as far as compared to the centralized system. As a result, when one system fails in a distributed or decentralized system, it does not shut down the entire system; in other words, the distributed ledger has no single point of failure. Furthermore, because of distributed control, it is a public ledger, which means that anyone who adds a new transaction or proposed new block to the ledger must refer to the preceding block of the ledger to create an immutable chain and avoid or prohibit manipulation. To improve security, the chains of these blocks are linked using hashing or cryptographic techniques [6, 7]. The blockchain technology is consequently considered by several researchers, including us, to be the superlative technology, to create a new democratic modern voting process.

2. Motivation and Contribution

In major countries, democracy is a vital and strong political source, and elections are used to establish and develop democracy [8, 9]. Democracy can be achieved by using the blockchain-based e-voting system as compared to traditional voting practices, as presented in Table 1. In this paper, we propose the blockchain-based e-voting system for Pakistan. Pakistan is a democratic country that still practices manual and expensive election techniques [10], which results in lengthy procedures, forged entries, counting problems, ballot paper mishandling, and major security, accessibility, and reliability issues [11, 12].

In this study, we evaluate the use of blockchain as a service in the context of Pakistan, to establish an electronic democratic voting system, in order to give transparency, security, accuracy, verifiability, and voting authenticity in a less expensive and faster manner. The study also contributes to the review of existing blockchain-based e-voting systems to suggest an advanced blockchain-based e-voting system that empowers liquid democracy through the use of the “permissioned blockchain”.

The notations used in this paper are described in Table 2.

The remainder of the paper is structured as follows. The related work is discussed in Section 3. In Section 4, liquid democracy fundamental thought is discussed. In Section 5, blockchain-based e-voting system is discussed. Implementation details are provided in Section 6. Experimentation and testing are covered in Section 7. Finally, in Section 8, the conclusions are presented.

Many researchers have been working on blockchain technologies in recent decades. Satoshi Nakamoto launched the first cryptocurrency, Bitcoin, in 2008, which paved the way for blockchain technology [13]. The Bitcoin blockchain technology uses a public distributed ledger, immutable transactions, and secure and limited encryption and is based on the PoW consensus mechanism [14]. Every transaction on the blockchain is cryptographically signed and publicly validated, ensuring that the data recorded to the blockchain cannot be tampered with, thus the phrase “immutable transactions.” When a new block is created in the blockchain structure, data can be written but not changed or deleted [15, 16]. Blocks are linked in such a way that each block contains the hash of the previous block, which is generated by adding the nonce (number only once) value to generate the hash according to certain rules. This increases the hash difficulty level and provides immutability [17].

Blockchain is being employed in a variety of industries, including cryptocurrencies, healthcare, e-voting systems, and supply chain management systems [18]. In the healthcare industry, blockchain technology is extensively used to maintain health-related records and make them more secure and accurate. The blockchain technology advanced the medicine and healthcare industry. Several researchers used the blockchain to project the e-health systems in terms of proposing data management schemes, medicine precisions, biomedical sciences, brain research, and much more [1924].

On the other hand, for years, researchers and practitioners have been working on blockchain-based e-voting by casting and producing high-quality, secure, and transparent results utilizing computer tools and equipment. Erstwhile researcher contributes for eliminating malleability transaction to control and decrease the blocks and transactions tempering in Bitcoins. Transaction tempering and malleability is a major concern in e-voting systems for fair elections [2527].

Practitioners investigate the blockchain performance constraints and always try to introduce universally verifiable blockchain-based e-voting systems. E-voting systems are improved by introducing secure architectures, visual cryptography, and consensus algorithms [5, 28, 29]. The blockchain-based e-vote-as-a-service architecture, which dynamically picks, deploys, and executes an e-voting service, and a cloud-based decentralized e-voting system architecture are proposed in [30, 31], respectively. An intelligent agents-based voting system is introduced in [32], to maintain transparency and auditability by integrating a single supervised online voting system. In [33], the authors create a secure voting system by using the hardware to exchange data and optimized the proposed proof-of-work (PoW) consensus algorithm. Experts also worked on different kinds of consensus algorithms and cryptographic primitives, such as homomorphic encryption and one-time ring signature, to improve the voting system’s security by resolving cryptographic problems with conflicting security features and making the voting system more secure on a broad scale [34, 35]. However, these kinds of systems need large computational power and communication overhead [36, 37].

4. Liquid Democracy Fundamental Thought

This section explains liquid democracy and the design considerations that go into it. After that, we discussed smart contracts and blockchain technology, as well as their capabilities as a service for designing a liquid democratic electronic voting system. A liquid democracy [38] is based on the premise that a voter can audit how his/her vote was projected in respect to a particular legislative proposition or bill at any time. Individuals with clear information can have a greater influence on the outcome of decisions, resulting in more democratic governance. Although liquid democracy could be a viable alternative to open soliciting, there are some technical and societal barriers to overcome [39]. The technical challenges around the liquid democracy concept may be critical to democracy’s evolution as we know it. We have compiled a list of the basic assumptions that an electronic voting system must meet in order to be used effectively in national elections:(a)The election system should not allow for compulsory voting(b)The election system should not be able to track the credentials of voters(c)The election system should ensure and demonstrate to voters that their votes were counted and correctly counted(d)The electoral system should not allow for vote-rigging by third parties(e)No one should be able to control vote counting and determine election results in the election system(f)According to the voting system, only eligible people should be allowed to vote in elections

5. Blockchain-Based E-Voting System

For public voting, we have proposed a blockchain-based national e-voting system. Firstly, our proposed system’s design architecture will be discussed, then move on to the smart contract implementation on the blockchain, as well as the user authentication and voting.

5.1. Proposed Architecture

In Step 1, the voters must register by providing their identity number and other credentials; the block will be created against the voter record, and the private and public keys will be assigned to that particular voter. In Step 2, the system adds the voter to the list based on the specific district (from which the voter hails); then in Step 3, the voter’s list is distributed (allocated) to the various polling stations. In Step 4, the voters cast their vote against a certain candidate. In Step 5, polling stations update the blockchain with the results while in Step 6, the system (mining node) verifies the record for tampering and sends it back to the blockchain. In Step 7, at the end, the final result will be displayed when the election is over, as the proposed architecture discussed above is illustrated in Figure 2.

5.2. Smart Contract

Ethereum is a blockchain platform that is open-source and may be used to deploy smart contracts. Ethereum includes a new programming language called Solidity for creating these contracts [40]. Using smart contracts in the permissioned blockchain, we implement the design electronic voting system as a system based on smart contracts.

A smart contract identifies the roles involved in the agreement (election agreement) as well as the various components and transactions in the agreement process [41]. Election administrators generate election ballots by interacting with smart contracts. In a smart contract, the administrator describes the candidate list along with voting districts. Voters will register and cast the vote in their specific districts and that would be stored in blockchain against specific nodes. In a blockchain-based e-voting system, we identify the components for implementing the electronic voting smart contract as shown in Figure 3.

We can employ a permissioned blockchain with the proof-of-authority (PoA) [42] consensus algorithm in our proposed method. The nodes are verified by authorized nodes in a network based on proof of authority, and certain predetermined boundaries are enforced. This manner is computerized and does now no longer require verifiers to continuously reveal their computers. A permissioned blockchain employs PoA consensus methods to impose rules on a specific set of recognized entities in order to verify and display transactions on the blockchain, as well as arbitrarily evaluate transactions while their identities and popularity are in jeopardy. For election transparency, voters’ votes are saved as transactions, and the user receives the transaction ID. Furthermore, when the user casts a vote, the wallet’s weight is decreased to 1, limiting the voter to casting only one vote, with the transaction value representing a vote against a certain party. The identity of voters is not revealed in order to protect their privacy. Example of transactions is shown in Table 3.

Moreover, this would be audited by the miner node using the proof-of-work consensus algorithm, i.e., Step 6 in Figure 2, on a public blockchain [43]. Furthermore, using a dedicated community reduces the ability of eavesdroppers to trace visitors and incoming data. It is critical to obtain voting rights so that citizens can vote without having to divulge their identities. This is required in order to gain voting privileges, which will allow voters to vote without having to reveal their identity or voting information.

6. Implementation Details

In our proposed e-voting system, we used the following technologies: Hyperledger Fabric, Permissioned blockchain, Ledger, VS Code, Docker Kubernetes, and Blockchain Wallet, and for a user interface, we used the HTML, CSS, and JavaScript programming languages.

6.1. Voter Class

In the voter class, the voter will be registered by entering his CNIC, DOB, and first and last name as shown in Figure 4.

6.2. Ballot Class

In ballot class voter id, voteable candidates list, ballot class will be called. So, authenticate the user for a specific ballot according to their respective voting district of the smart contract as shown in Figure 5.

6.3. Election Class

In the election class, the list of the eligible parties concerning their nominated candidate is placed in a smart contract according to the allocated districts for an election as presented in Figure 6.

6.4. Hyperledger Fabric Blockchain

Hyperledger Fabric blockchain acts as a framework for developing blockchain-based applications with a modular architecture, as the screenshot is shown in Figure 7.

6.5. Docker

In a blockchain, docker is used for deployment and developing the application in containers. These containers allow emulating the applications without a technical environment. Simply build, ship, and run the application anywhere, as work is shown in Figure 8.

6.6. Ledger

In the blockchain, the ledger is duplicated and distributed across the network, in which transactions are recorded with immutable cryptographic signature as presented in Figure 9.

6.7. Block Creation

Block is created by assembling multiple transactions. When a user is going to register for a vote, his record block is created on a blockchain as presented in Figure 10.

6.8. Wallet and Private and Public Keys

In the wallet, the user keeps a record of his account. When the voter is registered, private and public keys are assigned to it as presented in Figure 11. The private key is a personal unique key against which the user can access his account and public key is for transactions. Furthermore, when the user casts the vote, the value in a wallet is changed to 1, to show the user cast the vote and now they are not eligible to cast another vote.

7. Experimental/Deployment Details

We evaluated the proposed system by entering the dummy values into the context of Pakistani political parties. Pakistan is a democratic country that uses manual and costly election procedures. This leads to lengthy procedures, forged entries, ballot paper mishandling, counting issues, and significant security, accessibility, and reliability issues. Our proposed system overcomes all these challenges by preserving liquid democracy while providing a secure, cost-effective election while maintaining voter anonymity. On screen one, an e-voting blockchain-based system is shown. The user needs to register using his/her CNIC, name, and DOB (constraint: minimum age of 18 years old). On screen two, a list of the participating parties is shown. You can select the party from which you want to vote. Remember, it is immutable. If you lose the vote once, you cannot change it. And on the third screen, the voting results are shown.

7.1. E-Voting System Interface

The e-voting system interface is shown in Figure 12, in which users can register for vote casting and log in later to see the results.

7.2. Vote Casting

When a user registers for voting, then the user needs to select the appropriate party, which he wants to vote. An example of vote casting is shown in Figure 13.

7.3. Dummy Input Results (Testing)

We test this blockchain-based electronic voting system by entering the dummy values, just for a testing purpose that how the results show after elections. In Figure 14, the outcomes are shown that transparently identify the wining party.

8. Conclusion and Future Work

This paper presents a unique blockchain-based electronic voting system that uses smart contracts to provide a secure and cost-effective election while preserving voter anonymity. We demonstrated that blockchain technology offers democratic countries a new way to shift from pen-and-paper elections to a more time-and-cost-effective voting method while also improving security and transparency by comparing our findings to earlier studies. In Pakistan, developing a secure electronic voting system that meets the legal criteria of legislators has proven difficult. This study examines the numerous legal and technical constraints that could prevent blockchain from being used as an electronic voting system. In this study, we introduced the e-voting system, which has the potential to increase voter turnout and ensure security, transparency, and user privacy, while also allowing democratic elections to maintain liquid democracy.

The implementation of electronic voting systems continues to present numerous challenges and risks to developers and governments. In government, political parties will not readily accept it, and electronic voting systems will not be functional. Electronic voting will have an impact on the scalability of the blockchain-based system. The growing number of nodes in the blockchain network exacerbates scalability issues. In the future, we will try to overcome the public blockchain scalability and processing overhead.

Data Availability

The data that support the findings of the study are available from the authors upon request.

Conflicts of Interest

The authors declare that there are no conflicts of interest.


This research was supported by the Researchers Supporting Project number (RSP-2021/244), King Saud University, Riyadh, Saudi Arabia.