Taking Decentralized Voting to the NEXT level
Table of Contents
- Problems to Solve
- Project Structure
- Key Features
- The Cryptographic Magic
- Impact Points
- Tech Stack
- Local Setup
- Next Steps
Spinning up ultra-secure, anonymous and decentralized voting solutions, for
- Enterprises and Corporates
- Governance Protocols (in Ethereum and other blockchains)
- Providing Customized Voting Solutions,
while exploring/exploiting the synergies produced during the process.
Problems To Solve / Inspiration
- Increasing the average voter turnout in Elections around the world, by bringing the end-to-end voting process, online, in a secure manner
- Removing trust issues in Country election campaigns all over the world.
- Speeding up the State-Of-The-Art voting processes in the 3 domains mentioned in the 'Vision' above.
- Reducing overall costs incurred by Governments in conducting their elections.
The project has 4 core Modules, which would implement Secure, Anonymous, Transparent (SAT from here on) Voting solutions for the following:
- Module 1: Governments
- 13 types of Electoral Systems
- Module 2: Enterprises and Corporates
- Module 3: Governance Protocols (in Ethereum and other blockchains)
- Module 4: Customized Needs of Clients
- Current implementation includes a secure, anaonymous and transparent implementation of the First-Past-The-Post type Elections, which is one type out of a total of 13 concrete types of Electoral systems.
- Providing full-fledged voting solutions, and SATaaS (Security, Anonymity and Transparency as a Service) to existing voting solutions in the 3 domains mentioned in the 'Vision' above.
- A Plug-and-Play SDK to allow developers and other organizations to create Secure, Anonymous, Transparent (SAT from here on) and customized voting solutions, in accordance with their needs.
- The Cryptographic Magic
The Cryptographic Magic
No rocket science here. We're using simple hashing and encryption techniques, but in a smart way, to achieve anonymity and security, even on the blockchain, when options like zero-knowledge proofs and bullet-proofs are available. This is to achieve gas and performance optimization. Because more often than not, it is easy to make things complicated, but difficult to keep things simple.
Have a look at these slides to experience the feel of it.
- Increased accessibility to Voters, leading to a larger voter turnout, eventually, if not immediately.
- Immense business value for Torus (our Auth Partner), even at a very low global acceptance rate of the project.
- International Voting Interoperability, as a consequence of multiple Countries' and Orgs' voting implementations on a single platform (think International and Inter-Continental voting, for making global decisions, based on decentralized Global Identities, powered by Torus)
- Birth of International Voting Standards for fair, secure and anonymous voting, which would act as the next Status Quo, as far as voting is concerned.
- Even a success rate of 5% of this project, would be a major boost to Blockchain adoption to the masses.
CosmoVoting uses Torus for a seamless authentication experience for its users, for the following reasons:
- One of the easiest ones to integrate with.
- Generates a wallet for every gmail account, which acted as a sweet bridge for us, between OAuth 2.0 and Web 3.0 wallets like MetaMask.
- Torus would help us in orders of magnitudes, in exploring decentralized Global Identites for International and Inter-Continental Voting, for purposes meant to impact the world as a whole (think Framing international policies to tackle Climate Change, and the likes)
- Solidity (for smart contracts on Ethereum blockchain)
- Truffle Framework (to speed up blockchain development)
- web3.js (blockchain interaction)
- Torus (auth and wallet)
- Django (server)
- Angular (front-end)
- Clone the repo using
- To start the ganache instance, type
ganache-cli --port 8546
- Start a ganache proxy server using:
- Fire a new terminal in the same folder type
cd Dapp, follwed by
npm i, and then
truffle migrateto deploy the contracts to the local ganache instance
- Now, type
cd ..and create a python3 virtual environment using
python3 -m venv ./venvs/djangoOR
virtualenv -p python3 ./venvs/django/bin/
- In the same terminal, start the virtual environment using
- After making sure pip, python, django are installed in the virtual environment too, type
cd django && pip3 install -r requirements.txt
- [In case it doesn't get installed automatically],
pip install wheel
- To start the Django server,
cd vote, followed by
python manage.py runserverOR
python3 manage.py runserver
- Now, fire up a new terminal,
cdinto 'Dapp' directory and type in
npm startto start the Voting DApp.
- Replacing MetaMask with Torus as the wallet to interact with the Ethereum blockchain.
- Using simple hashing and encryption to achieve anonymity and security, even on the blockchain, when options like zero-knowledge proofs and bullet-proofs are available.
- Different types of electoral systems, via which elections take place at various levels in multiple countries.
- Adjusting the code among the different life cycles in Angular, to manage and execute successful transactions on the Ethereum blockchain, i.e. initiate web3Service => create contract instances => make contract calls.
- Using a single web3Service that is injected at the app-root to share the fetched web3 accounts and contract instances, with all other components.
- Simulating the First-Past-The-Post Electoral Systems, while ensuring anonymity, security and transparency.
- Figuring out Torus RPC errors
- Creating a clean and sleek UI/UX for the current implementation of the First-Past-The-Post type Elections.
- Implementing SAT elections for the remaining 12 types of Electoral systems.
- Inculcating Advanced Security implementations via GPIPs (Global Project Improvement Proposals)