Blockchain has introduced a new ecosystem of decentralised and transparent applications, running without a central authority and providing high guarantees against tampering. During a one-day hackathlon at the University of Southampton, we decided to implement a stereotypical example in order to learn more about blockchain: a voting application implemented in Ethereum.

The proposed framework consists of three components:

  • A private Ethereum test blockchain running on Ganache.
  • A smart contract taking care of voter identity and vote counts, implemented using Solidity. It heavily borrows from an example in the Solidity docs, but it has a couple more features: a white-list of of voters and max one vote per voter.
  • A web app where voters can type their public address, cast their vote and see real-time vote counts.

For the demo, the idea was to give people print outs with a public address of the blockchain, which they could then use to login in the web app and cast their vote. Of course, this project was quick, exploratory work. The resulting web app and smart contract are not safe for real use, but work fine for illustrative purposes.

License: MIT

Blockchain-voting-system is available under an MIT license.