Voting via Blockchain at Blockchain Consulting

AuditsConsultancyDevelopment

Abstract

Voting is a fundamental right of citizens who live in a democracy. We at Blockchain Consulting were approached several times to evaluate voting systems. Despite the obvious advantages of using blockchain for voting, there are also some problems such as vote privacy. For years, people have been struggling to find workarounds for these downsides, and it still remains hard to find solutions. In 2021, we decided to develop our own voting application and to use it for in-house purposes. Our goal was to find solutions to some of the problems that could not be solved yet.

Voting on blockchain

Voting was already part of the attic democracy in 500 b.c. and, despite technological advancements , the voting process is pretty much the same today as it was back then. The voter receives the ballot, checks a box next to their preferred choice in private, upon which someone collects and counts everyone’s votes to determine the winner .

One of the first ideas for using  blockchain technology for something other than payment solutions and financial services was to use it for voting processes. People envisioned a faster and more efficient voting process. They also thought the immutability of a blockchain would guarantee trust in the result. Trust is an important component. Just take the 2020 US presidential election and the huge debate around postal votes. Even in modern democracies, the element of trust in a voting process is definitely a weak point.

Most famously, Ethereum founder Vitalik Buterin referred to a statistic which suggested that 27% of mail-in ballots were not counted in South Florida in the 2020 presidential election. He Thereby claimed it would not be that hard to beat an accuracy of 73% and supported the idea of voting on blockchain. (Mapperson, 2020)

Analysis of voting processes on blockchain

At Blockchain Consulting we researched possible blockchain-based voting processes throughout the years and closely followed the developments in this area. When the Republican party Utah GOP convention used a blockchain-based voting application in April 2020, we looked into the application they used and analysed the process once again. (Anzalone, 2020)

The general advantages of blockchain-based voting are:

  • Real time confirmation of the votes
  • Transparency, as all transactions are recorded on the blockchain
  • Data integrity due to decentralized consensus mechanisms
  • High level of security through decentralized infrastructure

Despite these advantages there are also problems that require  widely accepted solutions:

The first and most common  problem is privacy. It needs to be ensured that the person voting can only vote once – therefore, we need to know who is voting. How can the process remain anonymous if it has to be verified that one individual only casts one vote. 

The wide and imprecise answer to this problem is usually “cryptographic methods”. So far we have not yet found a method that ensures 100% privacy without trusting  a third party.

Idea creation

Here at Blockchain Consulting, we use a prototype approach to test concepts and processes, and to find further solutions to potential problems . Upon researching  how to ensure privacy on a public blockchain, the natural choice for a testing environment were the simple, non-critical everyday polls of our daily office lives. Nevertheless our goal was and still is to derive ideas and develop solutions based on the status of the application. We decided to develop a blockchain-based voting application for internal purposes, through which employees were able to democratically vote on questions regarding  

  • Projects
  • Workshops
  • Lunch

Development phase

In our application, the voting process is a smart contract with variable attributes such as:

  • Voter: Eligible users can be added to the voting.
  • Ballot: A set of choices a voter is able to cast.
  • Time: The time span during which valid votes can be taken into account. After this period the election will be closed.

The first step involved deciding on  a suitable blockchain on which  this sort of  voting system can be realized as a smart contract. We decided to go with the Ethereum testnet, as the Ethereum Blockchain is able to fulfill our needs, plus Blockchain Consulting already had experience with coding smart contracts on this blockchain (Cf. Report about Hashrate Token).

The voting application was developed on an Ethereum testnet called “Polygon”. Polygon is a framework for Ethereum-based smart contract developers. (Bhalla, n.d.) By using Polygon you are able to launch your own Blockchain, which has all the advantages of the Ethereum Blockchain, as it communicates with the legacy Blockchain by interoperability. Having your own Blockchain for a voting process has the big advantage of using a sandboxed environment. Additionally, you gain all the advantages of Ethereum. The user authentication will be done by metamask. Metamask is an application through a compatible web browser. It allows users to store and manage account keys and to process transactions on Ethereum based cryptocurrencies and tokens, which is important because smart contracts run on Ethereum.

The ballot is the atomic unit in this system and contains the following parameters:

  • The name of the election
  • A unique identifier
  • End of the voting time frame
  • One or more choices by the voter. The issuer decides how many votes can be cast.

The voting smart contract contains the following functions

  • Vote: This function represents the voting process itself.
  • Results: Shows the results of the election.
  • addVoters: Voters can be added to the election with their wallet address 
  • createBallot: Ballots will be created after all participants are in place.
  • getBallot: See the anonymized results of a ballot
Fig. 1: Structure of the smart contract and its containing functions

Practical usage

This is clearly a very centralized voting application, which is acceptable because for now it is only used for in-house purposes. The polls are issued by our HR department. 

It works as described in the following:

Fig. 2: Workflow of an election

The issuer decides the name of the election and its ending date.

Fig. 3: Dashboard and creation of an election

The issuer then writes down the voting choices. Then the issuer decides who is allowed to vote in this particular election by adding their wallet addresses.

Fig. 4: Creation of a Ballot

All eligible voters are now able to vote and write their choice into the smart contract. All these processes will be stored on the Blockchain and are therefore resistant to fraud.

Our developers designed a clear User interface, so the process looks more like a vote and not like a transaction.

Once the vote is over  or every voter has used the token provided, all votes are counted and it becomes clear which option is preferred and by how many.

Fig. 5: Voting dashboard

Further developments

The voting application is still a prototype and under active development. It may seem simple and almost basic, but that’s certainly not the case. The application so far has strengthened our understanding of blockchain technology and allowed employees from all departments to use a smart contract, get accustomed to metamask and complete a transaction on the blockchain. As a company from the blockchain space it seemed just right to offer a voting system like this. 

Furthermore, our developers get to think more deeply about the problems of voting privacy, how to address them and find a solution that is secure and widely accepted. There is still a long way to go but the first steps have been taken and our goal is to finalize the first version for the market soon.

Bibliography

Anzalone, R. (2020, 04 29). Utah Republican Convention Uses Blockchain Voting Service. Utah Republican Convention Uses Blockchain Voting Service. https://www.forbes.com/sites/robertanzalone/2020/04/29/utah-republican-convention-uses-blockchain-voting-service/

Bhalla, A. (n.d.). What is Polygon MATIC? How does Polygon work? What is Polygon MATIC? How does Polygon work? https://www.blockchain-council.org/ethereum/what-is-polygon-matic-how-does-polygon-work/

Mapperson, J. (2020, 11 05). CZ and Vitalik agree blockchain-based voting is a must. CZ and Vitalik agree blockchain-based voting is a must. https://cointelegraph.com/news/cz-and-vitalik-agree-blockchain-based-voting-is-a-must

More Insights

Menu