Project Overview
Cloak Minster Ballot is a revolutionary decentralized voting platform that enables anonymous, verifiable elections through the combination of zero-knowledge cryptography and blockchain technology. The system ensures voter privacy while preventing double-voting and maintaining public verifiability of results.
This project represents one of the most sophisticated ZK implementations on Solana, demonstrating that privacy and transparency can coexist in democratic processes.
The Challenge
Building a truly private voting system on a public blockchain presents unique challenges:
- Complete Voter Privacy: No one should be able to link a vote to a voter's identity
- Double-Vote Prevention: Each eligible voter must only vote once
- Public Verifiability: Anyone should be able to verify the election results are correct
- Scalable Architecture: Handle large elections without excessive on-chain storage costs
Technical Architecture
The system operates through three primary layers that interact to provide secure, private voting:
Zero-Knowledge Layer
The ZK system uses Circom circuits with Groth16 proofs:
Identity Nullifier Circuit (identity_nullifier.circom)
- Generates unique voter identifiers using Poseidon hash
- Proves voter eligibility without revealing identity
Vote Circuit (vote.circom)
- Proves membership in the voter Merkle tree
- Validates vote without revealing voter identity
Blockchain Layer
The ZkVotingSystem Anchor program manages the election lifecycle:
Program Instructions:
initElection- Creates new election with optionsregisterVoter- Verifies ZK proof and adds voter nullifiercloseRegistration- Ends registration, opens votingvote- Verifies vote proof and records choiceconcludeElection- Finalizes results
Off-Chain Storage
IPFS provides scalable storage for tree data:
- Registered voter nullifiers (via
nullifiers_ipfs_cid) - Spent vote nullifiers (via
spent_nullifiers_ipfs_cid) - Merkle tree proof data for voter verification
By storing large datasets on IPFS and only keeping roots on-chain, Cloak Minster Ballot can support elections with millions of voters while keeping costs manageable.
Election Lifecycle
Phase 1: Initialization
Admin creates election with name and voting options. Election PDA is created with isRegistrationOpen = true.
Phase 2: Voter Registration
Eligible voters generate identity nullifier proofs using their secret and election ID:
nullifier = poseidon(identity_secret, election_id)
The program verifies the Groth16 proof and adds the nullifier to IPFS storage.
Phase 3: Voting
After registration closes, voters download voucher data with Merkle proof siblings. They generate vote proofs proving membership without revealing identity, then submit votes with ZK verification.
Phase 4: Conclusion
Admin concludes election, tallies are finalized and publicly verifiable.
Privacy & Security Model
The system implements a multi-layered privacy architecture:
- Identity Secret: Private value known only to voter
- Identity Nullifier: Public commitment that cannot be traced back
- Merkle Tree Membership: Proves eligibility without revealing position
- Spent Nullifiers: Prevents double voting while maintaining anonymity
User Interface
The Next.js frontend provides intuitive interfaces for all election participants:
- Dashboard: Overview of active and past elections
- Voting Interface: Simple ballot submission with progress indicators
- Registration Interface: Guided ZK proof generation and submission
- Results View: Real-time tallies and verification tools
Results & Impact
Cloak Minster Ballot demonstrates that trustless, private voting is achievable on public blockchains:
- Complete Privacy: Zero knowledge proofs ensure votes cannot be traced to voters
- Verifiable Results: Anyone can verify the election integrity
- Scalable Design: IPFS storage enables elections of any size
- User Friendly: Complex cryptography hidden behind intuitive interfaces
This project showcases our deep expertise in zero-knowledge cryptography and our ability to bring cutting-edge privacy technology to production-ready applications.









