Confidential Voting
Last updated
Last updated
Confidential voting is a privacy-preserving system designed to protect both voting choices and other sensitive information. In decentralized governance, tools like Snapshot and Tally have become key platforms for managing proposals and voting. Snapshot enables off-chain voting with results stored on decentralized systems like IPFS or Arweave, while Tally offers a fully on-chain voting solution using ERC20 and ERC721 token contracts. By combining the strengths of both systems and incorporating zkFHE (zero-knowledge Fully Homomorphic Encryption), we can design a secure, decentralized voting system that ensures both confidentiality and integrity.
Snapshot allows users to create voting proposals by locking in the block height associated with the proposal. A user's voting power is calculated based on their token balance at that block height. Voters can cast votes (for, against, or abstain), and results are tallied after the voting period ends. Proposal and voting data are stored on IPFS or Arweave, and users have the option to delegate or withdraw their voting power to/from other addresses.
Tally's decentralized autonomous organization (DAO) voting system operates through token (ERC20 or ERC721) and governor contracts. Users submit proposals and vote by sending on-chain transactions to the governor contract. All voting activity is fully recorded on-chain, ensuring transparency and security. Like Snapshot, Tally also supports the delegation of voting power, but with the added assurance of on-chain governance.
By integrating zkFHE into the voting process, we can build a confidential voting dApp (CV) that combines the benefits of on-chain (Tally) and off-chain (Snapshot) governance with enhanced privacy and security.
This voting dApp would integrate with the zkFHE network, following these key steps: proposal creation, voting, and tallying.
Users can create proposals through the CV dApp and publish them either on-chain (Tally) or off-chain (Snapshot). The proposal's metadata would define the voting strategy. The dApp communicates with BAVO's zkFHE nodes to generate a shared public key (PK) specifically for that proposal.
When a user casts their vote (e.g., for option m1), they encrypt the vote using the shared public key (PK) before submitting it. The encrypted vote is represented as Enc(m1, PK).
Once enough encrypted votes have been submitted, the dApp tallies the votes. This is done through a homomorphic computation that aggregates all encrypted votes without decrypting them:
C=Compute(Enc(m1,PK),Enc(m2,PK),…,Enc(m99,PK))C = \text{Compute}(Enc(m1, PK), Enc(m2, PK), \ldots, Enc(m99, PK))C=Compute(Enc(m1,PK),Enc(m2,PK),…,Enc(m99,PK))
The vote can be as simple as a "yes" or "no" (boolean) or a weighted vote where m1 = a1 * b1, where a1 is the token quantity and b1 is the voting choice. Note that token quantities are not hidden, as they can be queried from the blockchain based on the snapshot block height.
The final result, represented as ciphertext C, is an encryption of the voting outcome. This result is then threshold-decrypted to reveal the plain result R.
Integration with Existing Frameworks
The proposed solution can seamlessly integrate with both Tally and Snapshot, allowing for confidential voting within both on-chain and off-chain governance models. Voting power delegation is also supported, maintaining standard governance logic.
Enhanced Security and Decentralization
Compared to traditional zero-knowledge proof (ZKP) voting solutions, this zkFHE approach eliminates the need for a central tallying authority. This reduces the risk of centralization, offering a more decentralized and secure voting process.