Please describe your proposed solution
Project Summary:
We aim to develop a state-of-the-art Zero-Knowledge (ZK) voting protocol on Cardano that ensures privacy, security, and scalability for blockchain-based voting systems. Using zk-SNARKs, our protocol will guarantee voter anonymity while maintaining the ability to verify that votes are counted accurately without revealing voters' identities or choices.
Background and Rationale:
The essence of democracy (and DAO Goveranacne) lies in the integrity and transparency of the voting process. Traditional voting systems often struggle with issues such as voter fraud, coercion and lack of accessibility, and digital voting systems often struggle with ensuring voter privacy and security from cyberthreats. With blockchain technology, we have an innovative solution to these problems by providing a decentralised and immutable ledger, but the public nature of blockchains can compromise voter anonymity and privacy.
Proposed Solution:
We propose Zero-Knowledge Proofs (zk-SNARKs) to create a voting protocol that maintains all the advantages of blockchain while protecting voter anonymity and ensuring vote integrity and verifiability.
<u>Protocol Layout</u>
1. Voter Registration and Anonymity:
- Decentralized Identity Verification: Voters register through a DApp with simple UI where they prove their eligibility using zero-knowledge proofs
- Anonymous Credentials: Once verified, the voter receives a ZK credential that allows them to vote without revealing their identity. This credential proves that they belong to the set of registered voters without indicating which individual they are.
2. Voting Process:
- Vote Casting: Voters cast their votes using the DApp UI. Each vote is converted into a zk-SNARK, which comprehensively proves that the vote is valid according to the voting rules (e.g., the voter has not voted before) without revealing the voter’s identity or choice.
- Smart Contracts: A smart contract receives and verifies the zk-SNARKs. If the proof is valid, the contract records the vote on the blockchain and updates the tally for the respective option, all without revealing any individual vote data.
3. Vote Tallying and Verification:
- Aggregate Tallying: At the end of the voting period, the smart contract will execute a function to tally all votes that have been cast and validate the final count using a cryptographic accumulator.
- Result Verification: Voters can independently verify that their vote was included in the final tally through a "zk proof of inclusion," which assures them that their vote was counted without revealing which vote was theirs.
<u>Technical Framework</u>
1. Setup:
- zk-SNARK Circuit: Cryptographic circuit that defines the computation verifying both voter eligibility and the correctness of their vote without revealing their identity or choices.
- Trusted Setup: One-time multiparty computation (MPC) ceremony to generate the public parameters (common reference string) used in zk-SNARK proofs. This setup is crucial to prevent the sprover from creating fake proofs.
- Proof Generation and Verification: Integrate libraries like libsnark or ZoKrates for creating and verifying zk-SNARK proofs. These proofs are generated off-chain and verified on-chain by the smart contract.
2. Smart Contracts:
- Voter Registration Contract: Registration of voters by verifying their zk-SNARK proofs of eligibility and issuing zk-based credentials for voting.
- Voting Contract: Verifies zk-SNARK proofs that confirm a valid vote according to the voter’s credential and records the vote anonymously.
- Tally Contract: Aggregates votes and computes the final results, ensuring that all votes are counted correctly and maintaining transparency in the final tally.
3. UI:
- DApp Interface to communicates with Cardano wallets for the blockchain interactions.
- zk-SNARK Proof Generation: Incorporate client-side libraries that can compile to WebAssembly (WASM) for generating zk-SNARK proofs efficiently in the browser.
- Mockup:
4. Backend:
- Off-Chain Server: We need to host the APIs for off-chain computations like generating or verifying zk-SNARK proofs and handling data that should not be stored on-chain for privacy reasons.
- Blockchain Interaction Layer: We can use tools like Ouroboros, a Cardano node, or third-party APIs to submit transactions to the blockchain, monitor contract events, and query blockchain state.
- Database Management: We need to store the records of voters and votes.