DAVINCI is the evolution of the Vocdoni voting protocol, designed to empower civil society by providing essential tools for secure, verifiable, and anonymous digital voting. Leveraging recent advancements in zero-knowledge proofs and blockchain technology, the Vocdoni protocol transitions to a specialized zkRollup system that inherits network security from settlement layers like Ethereum Mainnet. The system relies exclusively on cryptographic proofs to ensure integrity and security, eliminating the need for centralized authorities. By integrating zkSNARKs and threshold homomorphic encryption (ElGamal), DAVINCI enables end-to-end verifiability, privacy, and trustlessness in the voting process.
The protocol employs a distributed key generation among sequencers, coordinated via Ethereum smart contracts, and utilizes Ethereum data blobs (EIP-4844) for data availability. With a focus on accessibility, scalability, receipt-freeness, and automation, DAVINCI aims to facilitate high-frequency, low-cost voting, fostering mass adoption of e-voting and simplifying civil participation. Finally, the introduction of the Vocdoni Token (VOC) aligns incentives among participants, ensuring the network sustainability.
Voĉdoni, meaning “to give voice” in Esperanto, embodies our mission to empower civil society from the grassroots level. We aim to build essential primitives and tools that enable any collective—from small groups to millions of citizens—to be heard, regardless of their circumstances or available resources.
Our philosophy envisions voting beyond traditional nation-state elections; we see it as a collective signaling mechanism with cryptographic guarantees of integrity and outcome.
To address the challenge, we developed a end-to-end verifiable and anonymous voting system designed to work on any device, including smartphones. We also successfuly deployed an infrastructure that maximizes resilience, neutrality, and transparency.
In 2018, when Vocdoni began, zkSNARKs was just an emerging technology. We chose to base our solution on a customized Byzantine Fault Tolerant L1 blockchain called Vochain. This allowed us to achieve scalability (approximately 700 transactions per second), to leverage advanced cryptographic tools that are prohibitively expensive on EVM-based blockchains, and enable users to send voting transactions without costs.
This experience has provided us with invaluable insights that have enabled us to overcome technical and operational challenges. Although this solution has effectively met user requirements and demonstrated its viability, further development is essential for its widespread adoption as a universal voting protocol.
DAVINCI represents the evolution of the Vocdoni voting protocol. It integrates smart contracts for orchestration, a zkSNARK-based state machine for verifying and accumulating votes, and a decentralized data availability layer to ensure censorship resistance.
To build the DAVINCI Stack, we adhere to the following design principles:
1. Cryptography as the Source of Truth: We rely exclusively on cryptographic proofs -> widely validated cryptographic schemes to ensure the integrity and security of the voting process. By trusting only in cryptography, we eliminate the need for centralized authorities, making the system inherently secure and transparent.
2. Trustlessness: Our system operates without requiring trust in any single party. Through cryptographic protocols and decentralized infrastructure, we ensure system integrity and prevent compromise from any malicious actor.
3. End-to-End Verifiability: Every voter can verify their ballot from casting to result computation (bold font). Additionally, any third party can audit the election data to confirm results (bold font, as it is a principles like Trustlessness) and verify that each vote comes from a uniquely registered voter (bold font). Transparent cryptographic mechanisms make this possible.
4. Composability: The system is modular, consisting of interchangeable components that can be rearranged or integrated with external systems via adaptable interfaces. This allows for redundancy, flexibility, and seamless integration with third-party applications, exemplified by our voting-as-a-service APIs.
5. Accessibility: Vocdoni’s voting platform (App) is open source, publicly available and user-friendly. The interface is intuitive for all users, including those less familiar with technology, and accommodates voters that use assistive technologies like screen readers.
6. Open Source: By releasing our code openly, we invite anyone to audit and contribute, enhancing security and fostering community engagement. Transparency makes security by obscurity totally uneeded and accelerates innovation.
7. Resilience: We design for robustness against hardware failures, network outages, and censorship. Infrastructure decentralization and distributed ownership enhance system availability and resistance to attacks.
8. Scalability: Our solution processes votes at high throughput, exceeding current requirements to accommodate future growth. The decentralized infrastructure scales organically as usage increases, ensuring consistent performance.
9. Receipt-freeness: To mitigate risks of collusion, coercion, and vote-buying, the system enables voters to verify their votes without being able to prove to others how they voted, thus reducing incentives for coercion and bribery. Additionally, voters are allowed to overwrite their votes while maintaining secrecy.
10. Automation: We minimize human intervention through smart contracts and cryptographic protocols, reducing costs and human error. Automation ensures consistent operation and frees resources for voter support, auditing and automatic execution..
Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge are a crucial component in ensuring the validity of the voting results. Voters generate zkSNARK proofs to prove that their encrypted votes comply with the rules and requirements of the voting process, without revealing any information about their choices. Sequencers also generate zkSNARK proofs to prove the correct aggregation of votes into the shared state that maintains the status of the voting process.
Merkle trees are employed to create a cryptographic representation of both the voter registry (census) and the voting process state:
Threshold homomorphic encryption, specifically the ElGamal scheme, is used to allow the summation of encrypted votes without decrypting them. This enables the system to compute the final vote tally while maintaining the privacy of individual votes. By ensuring that no vote is exposed during the aggregation phase, this scheme preserves voter confidentiality and provides anti-coercion protection, as voters cannot prove their choice to a third party once an encrypted vote is added.
The DKG protocol is used to generate the encryption public key (EPK) in a decentralized manner. Sequencers collaboratively participate in the DKG process to create the EPK, ensuring that no single party has full control over the key. This approach guarantees that the encryption key remains secure and that decryption of results is only possible when a threshold number of sequencers publish their shares.
Ethereum smart contracts are employed to orchestrate the voting process, manage state transitions, and store critical data, such as the current state root and encryption public keys. These smart contracts provide a trustless environment, ensuring that all participants can be confident that the voting process rules are correctly enforced.
EIP-4844 is used for data availability, enabling the storage of state transition data in the form of Ethereum data blobs. This mechanism allows sequencers to collaborate on the construction and verification of the voting process state, ensuring efficient and decentralized data availability.
Below, we detail the components of the architecture that collectively support the operation and management of the voting system.
An Ethereum compatible network is used as the source of truth for the voting system. By leveraging an EVM blockchain, the process management ensures that all transitions are immutable and verifiable by all participants. To this end, we implement several smart contracts.
Process Management: This smart contract is responsible for the lifecycle management of voting processes. It includes the initiation, configuration, monitoring, execution, and closure of voting events.
Results Verification: This smart contract maintains the integrity of the cast votes and process lifecycle for each voting process. It verifies that each state transition committed by a Sequencer adheres to the predefined rules by checking the submited zkSNARK proofs.
Sequencer Registry: This smart contract keeps track of the existing available sequencers, stores the collateral to ensure good behavior, and it's used to coordinate the distributed key generation when a new voting process is created.
The Sequencer is a specialized component designed to handle the voting process using zero-knowledge proof mechanisms. It ensures that all transactions related to this process are validated and sequenced. The Sequencers periodically commit the state of the voting process to Ethereum.
The user interface serves as the primary interaction layer for voters and organizers. It provides tools and functionalities like setting up, managing, and overseeing elections, cast votes, etc.. This interface hides the complexities involved in managing a decentralized voting system..
For each voting process, the system keeps track of the current State Merkle Tree, which contains all information of such processes. A public data availability layer, ensures that all state transitions are available and verifiable and allows the participation of multiple sequencers within the same voting process.
The process includes the initialization of a voting event, distributed key generation, encrypted vote casting, vote verification, and accumulation, culminating in the publication and public verification of results. Each phase leverages advanced cryptographic techniques to ensure the integrity, privacy, and universal verifiability of the voting process.
When a new voting process begins, the Sequencer initializes a new State, represented by the root hash of a Merkle tree. This tree encapsulates all essential information about the voting process, including process parameters, voter registry (census), ballot configurations, and initial results.
For each new batch of votes, the Sequencer updates the state by generating a zkSNARK proof that validates the state transition from the current Root to a new Root. This proof is submitted on-chain for settlement. By doing so, we maintain an immutable and verifiable record of the voting process on the blockchain.
This approach allows anyone to access the latest verified state of the voting process from the Results Verification smart contract, along with the necessary data to process subsequent state updates. The system's design enables multiple Sequencers to participate in tallying votes. They can take the current State Root and its associated data to construct the next state, incorporating new votes into the tally. This decentralization of Sequencers helps prevent potential censorship and reinforces the robustness of the voting process.
The chain of integrity is maintained through a combination of smart contract enforcement and strict zkSNARK circuit constraints. This ensures that each state transition is valid and builds upon the last accepted state without requiring additional mechanisms.
The State tree contains some special addresses (indices) for storing some required data regarding the voting process:
The voting process begins with an initial state where the Merkle Tree Root is established and published on the Process Management smart contract. Predefined parameters are included, but the results are initialized to zero, and no nullifiers are present.
The Process Organizer transaction, contains the initial root and the necessary Merkle proofs. These proofs verify that the initial parameters are correct according to the voting process information and that no additional information is stored. Since the `ProcessId` of the initial state is a unique identifier, there won't be duplicate roots for different processes.
To validate and process state transitions, we employ a zkSNARK circuit that enforces all protocol constraints. This circuit proves that the transition from the previous state Root to the new state Root is valid based on the newly processed votes.
The circuit have the following inputs (the public ones are required to verify the proof).
The following constraints must be enforced by the circuit.
censusRoot
or processId
) retrieved from Root1
remain consistent and are not altered in the transition.censusRoot
retrieved from Root1
.Root2
, updating the Merkle tree accordingly.Root1
, so that results2 = results1 + votes
.blobCommitment
provided as a public input, ensuring that the votes processed are exactly those published in the data blob.Root2
) is correctly computed from Root1
by applying the validated votes and updates to the Merkle tree.At the conclusion of the voting period, the smart contract ceases to accept new state updates, effectively finalizing the process. The final State is then available on-chain for verification, providing an immutable record of the voting outcome.
The Census represents the list of eligible voters along with their respective voting weights. It is implemented as a binary Merkle-Tree using an iden3 Sparse Merkle Tree (SMT) with a zkSNARK-friendly hashing function to ensure compatibility with zero-knowledge proofs.
In this Merkle-Tree:
This structure allows for efficient generation and verification of Merkle proofs, enabling voters to prove their eligibility and voting weight without revealing the entire Census.
The Organizer of the voting process is responsible for constructing the Census. Only the Root Hash of the Census Merkle-Tree is stored on-chain, ensuring transparency and immutability while minimizing on-chain data storage costs. The complete Census data is shared off-chain, typically via IPFS or an HTTPS endpoint, allowing participants and sequencers to fetch the data and generate Merkle proofs as needed.
Although the method of constructing the Census is outside the core protocol, we provide insights into common approaches to accommodate various use cases.
For organizations that maintain a private list of eligible voters and their voting weights—such as a membership database, CRM system, or a CSV file—the Census can be built directly from this dataset for each voting process. The organizer converts the list into the Merkle-Tree format, ensuring that each voter's address and weight are correctly represented in the leaves. This approach is straightforward and keeps the voter registry confidential, as only the root hash is made public.
The protocol supports the use of Self-Sovereign Identity systems. If voters have identities managed through SSI solutions, and their addresses are available either on-chain or off-chain, the Census can incorporate this information. The organizer aggregates the SSI data to build the Merkle-Tree, allowing voters to use their self-managed identities to participate in the voting process securely.
To leverage existing Ethereum-based tokens (such as NFTs or ERC20 tokens) as a basis for the Census, there are two primary approaches:
Optimistic Approach: In the optimistic approach, a snapshot of the token holders is taken at a specific Ethereum block height, using the state root corresponding to that block. A third party (or the organizer) fetches all token holders' addresses and balances, constructs the Census Merkle-Tree from this data, and submits the root hash to the voting smart contract.
To ensure accuracy and prevent fraud, there is a dispute period during which anyone can challenge the validity of the Census. If discrepancies are found, such as incorrect balances or missing addresses, a challenger can submit a fraud proof. This typically involves providing a Merkle proof from the Census and an Ethereum storage proof (as per EIP-1186) showing the correct balance at the specified block height. If the challenge is valid, the Census can be rejected.
ZK Approach: The ZK approach involves generating a Census that is cryptographically verified using zero-knowledge proofs. For a given Ethereum block number and state root, an off-chain zkSNARK circuit verifies the correct construction of the Census Merkle-Tree:
In the DAVINCI protocol, a vote comprises several components that work together to ensure secure, private, and verifiable voting. These components are:
Below, we detail each component and its role in the voting process.
The Process Identifier (ProcessId
) is a unique 32-byte number that uniquely identifies a specific voting process within the DAVINCI ecosystem. It encapsulates essential information, including the rules and constraints for ballots and the unique identifier of the DAVINCI blockchain instance.
The Census Proof serves as the voter's identity verification mechanism, ensuring that only eligible voters can participate. Depending on the process configuration, the voter provides:
The Commitment
The secret
The Nullifier
The ballot contains the voter's selections encoded according to the ballot protocol rules. To ensure privacy, the ballot is encrypted using the ElGamal cryptosystem over elliptic curves, which allows homomorphic combination of encrypted votes.
Encryption process:
Zero-Knowledge Proof (ZKP):
The voter generates a ZKP to prove the correctness of the ballot and encryption process:
Inputs to the ZKP Circuit:
The Signature authenticates the vote and ensures that it was cast by a legitimate voter. The voter signs necessary components using their private key, depending on the census configuration (e.g., ECDSA, EdDSA, RSA).
The Vocdoni Ballot Protocol defines a simple and efficient mechanism for casting and tallying votes in any type of election or collective decision-making process. Each voting process consists of one or more fields, and voters are required to provide a response for each field in their ballot.
The responses in the ballot are represented as a sequence of natural numbers, each corresponding to the voter’s choice for the respective field. Results are accumulated into a single array. Each position in the array corresponds to the sum of all votes cast for that field across all voters.
The ballot protocol is defined by a set of configurable variables that dictate how votes must be cast. This way the protocol can accommodate a wide range of voting processes and behaviors.
Consider a voting process where voters are asked to rate three candidates: Lennon, Hendrix, and Joplin. Voters rate each candidate from 0 to 5 stars, and each vote is represented as an array where each position corresponds to the candidate’s rating.
Configuration:
maxCount
: 3maxValue
: 5uniqueValues
: YesBallots:
[3, 2, 5]
(3 stars for Lennon, 2 stars for Hendrix, 5 stars for Joplin)[4, 3, 2]
[2, 4, 5]
After accumulating the votes:
[3+4+2, 2+3+4, 5+2+5] = [9, 9, 12]
In a scenario where voters distribute a fixed number of credits across different options (e.g., selecting funding levels for NGOs), the ballot allows voters to assign multiple points, but the cost of casting multiple votes for a single option increases quadratically.
Configuration:
maxCount
: 4maxTotalCost
: 12 (credits)costExponent
: 2 (quadratic)Ballots:
[2, 2, 2, 0]
[1, 1, 3, 1]
[0, 2, 1, 2]
After accumulating the votes:
[2+1+0, 2+1+2, 2+3+1, 0+1+2] = [3, 5, 6, 3]
The privacy of the voting process is ensured through the use of a Threshold Homomorphic Encryption Scheme. Specifically, the Threshold ElGamal Cryptosystem over elliptic curves is used. This cryptosystem provides both homomorphic and threshold properties essential for secure and verifiable digital voting.
Encrypted messages can be combined to produce an encryption of the sum of the original plaintexts without decrypting them. In the context of voting, this allows for the secure aggregation of votes while keeping the voter's choice private.
Collaborative Key Generation:
Encryption: Given a message
Homomorphic Addition: The ElGamal cryptosystem over elliptic curves supports additive homomorphism for messages represented as points:
Decryption:
For solving the discrete logarithm problem and compute the final results, since the message is small, it can be done via brute-force search or using the algorithm baby-step giant-step.
DAVINCI employs a Distributed Key Generation (DKG) protocol that allows a group of participants (Sequencers) to jointly generate a public/private key pair for the ElGamal cryptosystem without any single participant knowing the complete private key. Instead, each participant holds a share of the private key, and only a threshold number of participants can collaborate to decrypt messages (the threshold is configurable). This enhances security by eliminating the need for a trusted dealer and protecting against single-point failures.
In democratic processes, the ability of voters to cast their votes freely, without undue influence or coercion, is crucial. A critical aspect of maintaining this freedom is ensuring receipt-freeness, preventing voters from being able to prove to third parties how they voted. DAVINCI implements receipt-freeness by leveraging the properties of the ElGamal cryptosystem, and zkSNARKs.
The ElGamal cryptosystem over elliptic curves supports additive homomorphism, allowing operations to be performed on ciphertexts that translate to addition on the underlying plaintexts. Re-encryption is a process that refreshes the randomness of a ciphertext without changing the underlying plaintext message. This makes computationally infeasible to link the original and re-encrypted ciphertexts.
To prevent voters from being able to prove how they voted, DAVINCI Z employs re-encryption of ballots by the Sequencers. When a voter submits an encrypted ballot, the Sequencer re-encrypts it before storing it in the state Merkle tree.
This way, the system ensures that voters cannot produce a receipt of their vote by revealing r since the stored ciphertext no longer corresponds to r. This prevents vote-buying and coercion by third parties.
To further enhance receipt-freeness and mitigate the risk of collusion between voters and Sequencers, DAVINCI allows voters to overwrite their votes. A voter can submit multiple votes, with each new submission replacing the previous one.
When a Sequencer receives a new vote from a voter who has already voted, it performs the following steps:
To prevent observers from detecting when overwrites occur, the Sequencers regularly re-encrypt a random subset of ballots in the state Merkle tree during each state update. This process obscures the occurrence of overwrites, as re-encryptions are indistinguishable from standard re-randomizations performed for privacy enhancement.
By re-encrypting random ballots, the system increases the entropy and makes it statistically improbable for an adversary to determine if a specific ballot was overwritten or simply re-randomized.
DAVINCI ensures user anonymity by anonymizing both the ballot and the voter's identity, employing cryptographic techniques that maintain privacy even in the face of future quantum computing threats. The system uses the ElGamal Homomorphic Encryption scheme to encrypt ballots, allowing for the aggregation of votes without revealing individual choices. Since encrypted ballots are stored in public repositories like Ethereum blobs—which, although removed after some weeks, may still be accessible—it is crucial to prevent any association between decrypted ballots and voter identities. By decoupling the voter's identity from their encrypted ballot through the use of secrets and cryptographic hashes, even if an adversary decrypts the ballots in the future, they cannot link them back to individual voters.
The identity anonymization acts as a double security factor, enhancing long-term privacy. While the Sequencer processing the vote can identify the voter (since voters submit proofs of eligibility and commitments), there is no incentive for the Sequencer to make this information public, and the Sequencer cannot decrypt the voter's ballot because they do not possess the private decryption keys. This ensures that voter choices remain confidential.
We have adopted this partial identity anonymization because generating fully anonymous proofs using zkSNARKs directly from digital signatures (e.g., ECDSA/EdDSA or RSA) is computationally intensive for client-side devices like browsers and smartphones. Our priority is to support a wide range of devices, making the system accessible to as many voters as possible. In the future, as cryptographic technology advances and client devices become more powerful, we anticipate being able to generate such zero-knowledge proofs efficiently on the client side. This would enable us to fully anonymize the client's identity in addition to the ballot, further enhancing user privacy without compromising accessibility or user experience.
As quantum computing technology advances, it poses significant challenges to classical cryptographic schemes that underpin the security of digital systems, including voting platforms like DAVINCI. Ensuring that the system remains secure in the face of quantum threats is crucial for its longevity and trustworthiness.
Quantum computers have the potential to solve certain mathematical problems exponentially faster than classical computers. Notably, Shor's algorithm allows quantum computers to efficiently factor large integers and compute discrete logarithms, undermining the security of widely used cryptographic schemes such as RSA, DSA, ECDSA, and the ElGamal cryptosystem.
However, the design of DAVINCI incorporates mechanisms that preserve voter anonymity even in the face of future quantum attacks:
Detachment of Identity and Encrypted Ballot: The voter's identity and their encrypted ballot are decoupled through the use of a secret in the nullifier. The nullifier is computed as:
where
Quantum-Resistant Hash Functions: The Nullifier and Commitment are computed using cryptographic hash functions that are believed to be resistant to quantum attacks (e.g., SHA-3). While Grover's algorithm can provide a quadratic speedup in searching for preimages, using sufficiently long hash outputs (e.g., 256 bits) mitigates this risk.
To further safeguard against quantum threats, the following measures can be implemented in the futre:
Adopt post-quantum signature schemes. Replace ECDSA/EdDSA with quantum-resistant algorithms such as CRYSTALS-Dilithium, Falcon, or Rainbow, which are based on hard lattice problems.
Explore lattice-based homomorphic encryption schemes. Replace ElGamal cryptosystem with quantum-resistant alternatives such as the Brakerski-Gentry-Vaikuntanathan (BGV) scheme or the Brakerski/Fan-Vercauteren (BFV).
Adopt quantum-resistant zero-knowledge proof systems, such as zkSNARK constructions based on post-quantum assumptions or zkSTARKs.
We introduce the Vocdoni token (VOC) as a key element of its decentralized voting ecosystem, playing a crucial role in the protocol's sustainability.
The token serves multiple utility functions that align the incentives of all participants (voting organizers, sequencers, and voters) ensuring the integrity, efficiency, and security of the voting system.
Organizers of voting processes pay fees in VOC tokens to create and manage their voting events. These fees cover operational costs and incentivize the sequencers.
The costs of voting processes vary based on the following factors:
Fees must be paid upfront but can be partially reimbursed. The formula for calculating the reimbursement is:
Given that there is a list of eligible voters for each voting process, organizers should reserve space equal to the maximum number of voters, anticipating that all eligible voters may participate. However, since this is unlikely, a portion of the reward pool may be reimbursed.
The components of this formula are defined in the following sections.
The process cost model defines how the cost for a given process is calculated.
Considering sequencer-specific capacities, process duration, number of voters and security costs, we define following components formula:
Where:
It is expected to have a minimum and maximum duration thresholds (e.g 1 hour to 1 year).
There is the need to enforce some constrains in the formula in order to avoid impracticable scenarios.
To become a sequencer and earn rewards, participants must stake VOC tokens as collateral. This collateral is locked during the sequencer registry in the Sequencer Registry smart contract and can be withdrawn upon the sequencer commitments are fulfilled.
Sequencers receive rewards based on:
The total reward obtained can be expressed as:
And subject to the constraints:
Where:
Non-Participation: Sequencers who fail to meet their obligation, not providing key shares during the tally phase, can have their collateral slashed.
Penalites for a sequencer can be expressed as:
Where:
The total cost formula combines four main components:
The proposed formula ensures that:
In the model presented we can clearly see that there are conflicting objectives from the two main actors:
These are naturally conflicting objectives that can be modeled as a strategic game. However, modeling this equilibrium for the protocol it is not in the scope on this document and will be presented in a separate piece.
The authors would like to thank the following reviewers and contributors for their valuable feedback and support: