Last updated 3 months ago
Ballot processes in elections and governance rely on in-person steps & trusted operators. Digital options centralize control or expose data, with no assurance of privacy or cryptographic integrity.
We propose an open-source ZK digital ballot prototype on Midnight that enables private, non-duplicable ballots with verifiable results, without revealing identity or ballot contents.
Please provide your proposal title
Midnight ZK Privacy-Preserving Digital Ballot Prototype
Please specify how many months you expect your project to last
3
Please indicate if your proposal has been auto-translated
No
Original Language
en
What is the problem you want to solve?
Ballot processes in elections and governance rely on in-person steps & trusted operators. Digital options centralize control or expose data, with no assurance of privacy or cryptographic integrity.
Supporting links
Does your project have any dependencies on other organizations, technical or otherwise?
No
Describe any dependencies or write 'No dependencies'
No dependencies
Will your project's outputs be fully open source?
Yes
Please provide here more information on the open source status of your project outputs
All deliverables will be released under MIT and made public from day one. The full codebase containing Compact contracts, cli module, UI, tests, and documentation will be openly accessible in a GitHub repository, ensuring the project functions as a true reference DApp that others can study, fork, and build on.
Please choose the most relevant theme and tag related to the outcomes of your proposal
RWA
What is useful about your DApp within one of the specified industry or enterprise verticals?
This reference dApp is useful because it gives any organisation a practical example of how to run private and verifiable digital voting. The patterns it demonstrates can be applied across several governance-heavy sectors.
In public or civic governance, it helps show how people can vote without revealing who they are or how they voted. It supports remote participation and removes the need for central servers to handle sensitive data.
In enterprises, it can support board elections, shareholder votes, internal policy votes, or anything where confidentiality matters. It provides a model where a company can prove the vote results are correct without exposing employee or shareholder choices.
In education, student unions and academic councils can use the same pattern to run fair and private elections without relying on university administrators to manage or see the ballots.
DAOs and Web3 communities can use the code as a template for private on-chain governance, which is still a major gap in most blockchain voting systems.
By releasing a fully open-source implementation (Compact contract + ZK circuits + UI + wallet integration), developers can adopt the contract, UI, and circuits, and adapt them to their own governance needs. This reduces the barrier to adopting privacy-preserving digital governance and provides developers with a concrete, working example of how to use Midnight for secure decision-making.
What exactly will you build? List the Compact contract(s) and key functions/proofs, the demo UI flow, Lace (Midnight) wallet integration, and your basic test plan.
We will build a complete reference voting dApp on Midnight that demonstrates how private, verifiable digital ballots can work using Compact contracts and Zero-Knowledge proofs. The project includes two eligibility models, the full voting circuits, a simple UI, and Lace (Midnight) wallet integration. Everything will be released open-source so other developers can reuse it.
1. Compact Contract
We will deliver a single Compact contract that supports the full voting flow:
The contract will be small, easy to read, and designed to be used as a teaching example.
2. Voting Circuits (Core Proofs)
We will build circuits that show:
3. Eligibility Models
We will implement and demonstrate two eligibility approaches:
Vote-access token model : Each voter receives a non-transferable token. Casting a vote consumes the token. Enforces exactly one vote per person
Merkle-root eligibility model: A registration authority publishes a Merkle root of eligible voters. Voters prove membership privately without revealing identity. Ideal for smaller-scale governance or fixed voter lists
Both flows will be available in the repo so other developers can choose based on their use case.
4. Demo UI
A simple UI that lets a user:
The UI will stay minimal and instructional, since this is a reference dApp.
5. Wallet and CLI Integration
The project will support both:
This makes the project useful for developers who prefer UI-based or CLI-based flows.
6. Repository and documentation
Everything will be MIT-licensed so other teams can fork or extend the design.
How will other developers learn from and reuse your repo? Describe repo structure, README contents, docs/tutorials, test instructions, and extension points. Which developer personas benefit, and how will you gauge impact (forks, stars, issues, remixes)?
Repo structure
README
CLI usage
Documentation and tutorials
Tests
Reusability
Fully MIT-licensed repo. Developers can fork it, replace the UI, or reuse only the Compact contract patterns
This will be a practical reference for anyone building private voting, governance, or eligibility systems on Midnight
Please describe your proposed solution and how it addresses the problem
The Real Problem: Why National Elections Need This
Countries across the world struggle with election integrity due to:
1. Duplicate Voting & Identity Fraud: Manual rolls and weak authentication allow: multi-voting, impersonation,
spoofed entries, fraudulent re-entries
2. Physical Presence Requirement
To prevent impersonation, countries require citizens to physically appear: long queues, travel barriers, disenfranchisement of remote workers or diaspora, accessibility challenges for elderly, disabled, military personnel
3. Booth Capture & Coercion
In many regions, political actors or militants take over polling stations, ballots are replaced, voters are forced or prevented from voting, polling agents become targets
4. Tampering & Manipulation
Paper-based systems have risks of ballot stuffing, manual counting errors, delayed results, opacity, confusion, and political allegations
5. Public Blockchains Cannot Fix This
Placing votes publicly on-chain breaks secrecy:
votes become linkable, metadata and timing leak identity, adversaries can analyze patterns, transparency is not equalt to privacy. A functioning national voting system must guarantee both: Absolute Privacy, Absolute Integrity. Today, no public blockchain or traditional system can satisfy both.
Midnight + Zero-Knowledge can.
This project delivers an open-source reference DApp showing how:
The aim is not to build a full national voting system, but a small, complete reference implementation demonstrating the core cryptographic pattern.
Eligibility Models (Two Supported Approaches)
1. Vote Token–Based Eligibility (Recommended for large scale ballots)
A non-transferable vote-access token (VAT) is delivered to each eligible voter’s wallet. The Midnight contract verifies that token exists, token not used, token burned/consumed during voting.
This model is ideal for, national elections, corporate board elections, shareholder voting, secure referendums
2. Merkle-Root Eligibility (for small-scale cases)
Midnight’s Compact libraries provide promising flexibility for building eligibility proofs, and we anticipate growing support for Merkle-based verification patterns as the SDK matures. This approach remains open-ended: depending on available primitives, the system may support:
In this model, a registration authority creates a Merkle tree of eligible voter commitments off-chain, while the contract stores only the root. Users then submit a ZK proof of inclusion without exposing any identifying information.
If supported by Midnight’s evolving libraries, this pattern lends itself especially well to smaller-scale governance scenarios such as, student elections, DAOs, associations, civic organizations
Core Voting Circuits (High-Level Only, Not Tied to Implementation Details)
Eligibility Circuit
Vote Circuit
These circuits are described intentionally at a conceptual level for flexibility.
Contract State (Minimal & Privacy-Preserving)
The contract maintains only the essential data required to enforce one-person-one-vote and to process votes privately:
Eligibility Indicators (Two Modes Supported)
Access-token mode: record of consumed vote tokens or token IDs
Merkle-mode: optional stored Merkle root representing an eligibility commitment
Double-Voting Protection
A set of used nullifiers or consumed token identifiers to ensure each voter can vote only once
Private Ballot Data
Privacy-protected vote commitments stored inside Midnight’s confidential contract state
Election Status
A simple open/closed flag indicating whether the poll is accepting votes
This will demonstrate Midnight’s private-state capability.
How It Solves National Election Problems
Please define the positive impact your project will have on Midnight ecosystem
Benefits to the Midnight & Cardano Ecosystem
Primary Users
Long-Term Value
A functional, replicable, adaptable prototype for any privacy-preserving voting system across industries.
What is your capability to deliver your project with high levels of trust and accountability? How do you intend to validate if your approach is feasible?
Please provide a cost breakdown of the proposed work and resources
Compact contracts and ZK circuits: $4,000
CLI module and TypeScript utilities: $2,000
UI and wallet integration: $2,000
Tests and documentation: $1,000
Project reporting: $1,000
Total Requested: $10,000 USDM
How does the cost of the project represent value for the Midnight ecosystem?
I confirm that the proposal clearly provides a basic prototype reference application for one of the areas of interest.
Yes
I confirm that the proposal clearly defines which part of the developer journey it improves and how it makes building on Midnight easier and more productive.
Yes
I confirm that the proposal explicitly states the chosen permissive open-source license (e.g., MIT, Apache 2.0) and commits to a public code repository.
Yes
I confirm that the team provides evidence of their technical ability and experience in creating developer tools or high-quality technical content (e.g., GitHub, portfolio).
Yes
I confirm that a plan for creating and maintaining clear, comprehensive documentation is a core part of the proposal's scope.
Yes
I confirm that the budget and timeline (3 months) are realistic for delivering the proposed tool or resource.
Yes
I Agree
Yes
Lambdac Labs is a developer collective focused on building blockchain solutions on Cardano. We have open-source reference repositories and closed source solutions for Cardano dApps. Our ongoing exploration of smart contracts, governance tooling, and Midnight development can be viewed at out Github.
Team github: https://github.com/lambdacc
The specific developers working on this project are:
Reshma Mohan – Cardano Engineer (Smart Contracts, Architecture & Governance)
LinkedIn: https://linkedin.com/in/reshmohan
Github: https://github.com/resgsh
Sandeep Sooryaprakash – Principal Engineer (Backend & Cardano Tooling)
LinkedIn: https://www.linkedin.com/in/sandeepsooryaprakash/
Github: https://github.com/sandykwl