Inspiration

As we advance into an ever-increasing digital age, the emergence of online elections are inevitable. Its advantages are numerous, ranging from increases in voter turnout from the internet's wide span to decreases in carbon footprint from the countless paper ballots used in today's elections. However, amidst rising concerns around voter fraud and voter suppression, it is important that online voting is equitable, accessible, and secure.

While blockchain technology dominates the world of cryptocurrency, the technology on its own is also applicable in creating robust online elections due to its architecture. Online elections facilitated through blockchain technology are fundamentally immutable, anonymous, and secure by linking nodes containing encrypted voter identity and ballot data. Tampering with ballot data would not be possible as this would alter the hash code of one block, hence causing discrepancies with every other block that comes after it, as blocks are also based upon the hash code of the preceding block.

This allows secure attainment, recording, and reporting of votes. While the government is able to validate votes, people are able to verify their votes by generating their unique voter hash code and querying it with a transaction in the blockchain voting record.

What it does

Votr mocks the process of a blockchain election by utilizing python to implement a blockchain mechanism which stores online ballot data. Users are able to view the blockchain, cast a vote if they are registered, and lookup the record of their ballots through their block number containing their transaction. After a voter votes, their voter hash is removed from the registered voters, and added to a blacklisted voter hash collection in order to prevent voting more than once.

How we built it

Our ballot record blockchain is made secure through the SHA-256 cryptographic hash functions which hashes the concatenation of a voter's credentials (name, date of birth, and social security number) on the frontend, and securely sends this hash to the backend. This hash is then combined with the vote number, previous vote hash, and vote choice to form as new hash for the individual vote block that is added onto the chain. Before adding each block to the blockchain, Votr checks that the voter is allowed to vote in this election, by comparing the voter hash to the hash stored in a database of allowed voters. As you can see, the plain text of a voters credentials are never actually stored which key to maintaining anonymity and protecting voter privacy. In order to integrate our blockchain backend with our React.js frontend, we used the django rest framework to provide api endpoints. After a vote is cast, the voter receives the unique block id of the vote on the chain. They can put this block id into a user input at any time, which will then fetch the current vote choice of that block to show the user that their vote is intact and as they intended it to be.

Challenges we ran into

Understanding the blockchain architecture involved reading and understanding theoretical knowledge before writing any code. Furthermore, learning how to implement a private blockchain without mining functionality rather than a public blockchain was especially difficult considering the dominance of cryptocurrency-related online education surrounding blockchain.

We also had difficulties figuring out how to facilitate communication between our blockchain and our client side

Accomplishments that we're proud of

We're especially proud that we were able to implement a functioning blockchain and help provide a proof of concept for the digitization of elections. Also, we are proud of showcasing blockchain technology's potential beyond cryptocurrency to improve legacy systems.

What we learned

We learned about Blockchain architecture and how to implement one. Specifically, we gained an appreciation for the SHA-256 hashing algorithm, and how to detect whether a blockchain has been tampered with. We also honed our skills in web development, especially in React.js and Django.

What's next for rezen

We hope to add a client side page where users can register to vote, and add their voter credentials hash stored in Postgresql database. We also hope to give voters the ability to update their ballot at any time before the election closes. We could do this by adding a new block to the chain, and only counting the latest ballot block in the chain from a voter in the final tally.

Built With

Share this project:

Updates