arnaucube
arnaucube/davinci-paperPublic Self-hosted repository
davinci-paper/v2/sections/protocol-intuition.tex
v2/sections/protocol-intuition.texRaw
 1% !TeX root = ../build/main.tex
 2
 3The following section provides an overview of the DAVINCI protocol, describing its main phases and actors without delving into technical details. An election is governed by smart contracts deployed on a settlement chain, either Ethereum or an Ethereum rollup built on the OP Stack, which ensure transparency, enforce rules, and verify proofs. As shown in Fig.~\ref{fig:protocol-intuition}, the protocol consists of five main phases, from the setup of the election to the publication and verification of the final results. The numbered tags of the figure match the phases described below.
 4
 5\begin{figure}[h]
 6	\centerline{\includegraphics[width=\textwidth,draft=false]{\figs/protocol-intuition-flow.pdf}}
 7	\setlength{\abovecaptionskip}{5pt} % Space between figure and caption
 8	\caption{Overview of the protocol flow. Tags mark the phases: (1) election setup, (2) encryption key generation, (3a) vote casting and (3b) vote batching during the voting period, (4) tally decryption, and (5) election finalization.}
 9	\label{fig:protocol-intuition}
10\end{figure}
11
12\begin{enumerate}
13	\item \textit{Election setup}.
14	In the first phase, the \emph{organizer} gathers all census data and generates a cryptographic commitment to this data. Additionally, the organizer defines the voting parameters, including the number of ballot fields, the rules a valid ballot must satisfy (e.g., single choice, approval, weighted or quadratic voting), the voting period, and the maximum number of voters. The organizer also chooses who will hold the election key, as described in the next phase. Once these details are set, the organizer submits a transaction to the process registry smart contract. This transaction publicly records the voting parameters and the census commitment, and derives from them the initial state of the election, ensuring transparency: the configuration of the election is committed, and the few parameters that may change later (such as the end time or a dynamic census) can only be changed by the organizer, under the rules of the registry.\\
15	%
16	\item \textit{Encryption key generation.}
17	A designated group of participants, referred to as \emph{\keywardens}, collaboratively generate a shared encryption public key, which voters will use to encrypt their votes. This key is established through a \ac{DKG} protocol, ensuring that no single party can control or reconstruct the corresponding private key independently. In \davinci, the \keywardens are either a committee of permissionless operators, which prepares encryption keys in advance and hands one to each new election, or a council of members invited by the organizer. For elections in which the organizer accepts a weaker trust model, a single sequencer can also provide the key. In every case, the encryption public key is recorded in the process registry when the election is created, and the voting period can start.\\
18	%
19	\item \textit{Voting period}.
20	During the voting period, two actors interact continuously: \textit{voters}, who cast their encrypted ballots, and \emph{sequencers}, independent entities responsible for collecting, verifying, and processing these ballots before committing them to the shared state. Both processes, (\ref{sec:protocol-intuition:vote-casting}) ballot submission by voters and (\ref{sec:protocol-intuition:vote-batching}) vote batching by sequencers, occur continuously and in parallel throughout this phase.
21	The voting period remains open until the deadline defined by the organizer, allowing voters to submit or overwrite ballots at any time, while sequencers periodically process new submissions and update the election state accordingly.\\
22
23	\begin{enumerate}
24		\item \label{sec:protocol-intuition:vote-casting} \textit{Vote casting}.
25		Voters select their preferred choices according to the voting rules established by the organizer and captured in the process registry. Instead of submitting their votes directly on-chain, they send them off-chain to a sequencer of their choice for processing.
26		To ensure privacy, votes are encrypted using the election's encryption public key. Additionally, voters compute a unique vote identifier that will allow them to verify that their submission has been included in the election state. Alongside the encrypted vote and the vote identifier, each voter must also provide the following data: a proof of valid voting, demonstrating that the vote complies with the election rules; a proof of eligibility, verifying that they are registered in the census; and a proof of identity ownership, in the form of a digital signature, confirming that they are the legitimate voter and are not impersonating someone else. To mitigate coercion and vote-buying, the protocol allows voters to overwrite their vote any number of times during the voting phase; only the last ballot counts. \\
27		%
28		\item \label{sec:protocol-intuition:vote-batching} \textit{Vote batching}.
29		During this phase, sequencers collect encrypted votes from multiple voters along with their corresponding proofs, and verify the validity of these submissions. That is, sequencers
30		verify the signatures, to ensure the votes were cast by legitimate voters; they verify the proof of compliance, confirming that each vote adheres to the election voting rules; and they verify the census membership proofs against the commitment to the census data that was originally registered in the process registry. Valid votes are grouped into batches. For each batch, the sequencer re-encrypts the votes, so that the stored ciphertexts no longer match the voters' original encryption randomness, and also re-encrypts a random sample of the ballots already stored in the state, so that an outside observer can hardly tell a voter who overwrote a ballot from one whose ballot was merely refreshed. While this process does not alter the final tally, it makes it harder for voters to prove their choice to third parties, which mitigates vote selling and coercion. The sequencer then updates the election state and the encrypted tally, and publishes the data of the batch in Ethereum data blobs.
31		Instead of submitting individual verifications for each vote, the sequencer generates a single \ac{ZK} proof that attests to the correctness of the whole batch: every verification, every re-encryption, the state update, and the published data. Finally, the sequencer submits the proof and the new state root to the process registry, which verifies the proof and the blobs and accepts the new state. Settlement is permissionless: any sequencer may submit the next state transition, and the first valid one to land advances the election.\\
32	\end{enumerate}
33
34	\item \textit{Tally decryption}.
35	At the end of the voting period, sequencers stop accepting votes and settle the batches they still hold during a short grace window, after which the registry ceases to accept new state updates.
36	Then, a threshold number of \keywardens cooperate to decrypt the final tally.
37	That is, instead of reconstructing the election's private key, each \keywarden publishes a partial decryption together with a proof that the contribution is correct. When the key is held by a single sequencer, that sequencer decrypts the tally itself and proves the decryption.
38	This way, the individual votes remain encrypted throughout the voting period, and only the final aggregated result is decrypted at the end of the election.
39	\\
40	%
41	\item \textit{Election finalization}.
42	The results and a proof of correctness are submitted to the process registry. The registry checks that the decrypted tally corresponds to the encrypted tally committed in the final state: either by verifying a \ac{ZK} proof of the decryption, or by binding the final encrypted tally to the state root before handing it to the \keywardens and reading the decryptions they proved. Once this verification succeeds, the results and the latest state root remain available on-chain, providing an immutable record of the election outcome that can be independently audited by anyone.
43\end{enumerate}