Skip to main content

Voting System

Voting System

Voting System Design Structure


The Punkpoll voting system is designed with a simple yet innovative structure based on zero-knowledge blockchain technology. The core of this system lies in a unique Merkle map structure named 'Indexer', where voter information, participation information, and tally information are processed in a single map and the root hash value is updated on-chain. This integrated approach significantly improves the efficiency of voting data management while maintaining the security and transparency of the zero-knowledge blockchain.

The adoption of the Indexer Merkle map structure reduces the overhead involved in separately managing and verifying various voting-related information. Moreover, this structure enhances the overall efficiency of the voting system by reducing the amount of information that needs to be updated on the blockchain to a single root hash value. This helps in addressing the issues of processing speed and capacity while maintaining the fundamental characteristics of blockchain: security and transparency.

Another key element of the Punkpoll system is the recursion proof technology. This technology simplifies the voting verification process and improves the scalability of the system. By allowing all data to be verified with a single proof instead of individual proofs for each vote and voter information, it plays a crucial role in ensuring the validity of the data and enhancing the processing capacity and speed of the voting system.

Additionally, the utilization of the Merkle map structure minimizes the amount of data stored on the blockchain while maintaining complete information for each vote. This ensures the transparency and traceability of each vote and allows for the verification and confirmation of the results of each vote when necessary.

  • Single Merkle Map (Indexer) Usage: Manages all voting-related information in a single Merkle map, reducing the complexity of data management and simplifying blockchain updates.
  • Application of Recursion Proof Technology: Uses recursion proof technology to simplify the voting verification process and increase the scalability of the overall system. This allows for efficient verification of all voting data with a single proof.
  • Data Minimization and Transparency Maintenance: Utilizes the Merkle map structure to minimize the amount of data stored on the blockchain while maintaining complete information for each vote, ensuring the transparency and traceability of the votes.

๐Ÿงพ zk-Vote Smart Contract

The zk-Vote (NFT) serves as a smart contract for voting, created whenever a vote is deployed, managing the voting content and the state of the voter's NFT.

When a vote is deployed, voters are registered, and an NFT is issued when a voter participates, with this information being registered on the NFT Indexer. Separate wallets*2 are created for each item in the voting content and added to the NFT Indexer. The submitted participation information is compared with the voting content to validate its authenticity, and the voter's NFT is then transferred to the respective wallets for each item. Upon completion, a 'zk-Vote-Receipt (NFT)' is issued to the participant, and PUNK Token is sent as a reward. After the vote concludes, the NFTs in each item's wallet are tallied to produce the final result.

zk-Vote (NFT) Smart Contract:

  • Creates a separate smart contract for each vote.
  • Manages zk-PUNK and voter NFT states.
  • Registers voters and issues NFTs during voting, recording information in the NFT Indexer.

Role of the NFT Indexer:

  • Tracks and manages the status of voter NFTs.
  • When a voter participates in a vote, their NFT moves to the candidate's wallet, updating the NFT Indexer.

Aggregating and Publicizing Voting Results:

  • After voting concludes, NFTs in the candidate's wallet are tallied to form the final result.
  • Results are recorded on the blockchain, accessible to all participants.

Zero-Knowledge Proof for Vote Verification:

  • After voting, a 'zk-Vote-Receipt-NFT' is issued.
  • The receipt serves as proof of voter participation, maintaining privacy through zero-knowledge proof technology.

Punk Token Rewards:

  • Reward Punk Tokens are transferred to voters.

๐ŸŽฒ "Indexer" Structure

The "Indexer" is a concept used in the Punkpoll voting system, referring to a special Merkle map designed to manage various information in one place. It efficiently manages and processes diverse information such as voter information, participation information, and tally information. Using recursion proof, these processes can be performed much faster and more efficiently.

Additionally, the "Indexer" manages the crucial NFTs in the voting system. Voters use these NFTs to participate in voting, and during the vote, the NFTs move from the voter's wallet to the intended item's wallet. This ensures safe tracking of participation information and accurate tallying of vote results.

  • The "Indexer" includes the following fields:
    • idx: A unique index value used by the "Indexer"
    • owner: Wallet addresses of voters and candidates
    • type: Type of wallet (voter or candidate)
    • nftIds[]: List of NFTs used for voting or list of NFTs received by voting items
  • After voting is completed, each voting item's wallet tallies the NFTs it holds to create the final result data. This structure ensures the transparency and accuracy of votes in a blockchain-based voting system while greatly improving processing efficiency.

๐Ÿ“š zk-PUNK (NFT) Indexer

The zk-PUNK Indexer records and manages the ownership information of individual NFTs. When an NFT is created, the owner's wallet is added to the NFT Indexer, and when an NFT is transferred, the ownership information in the NFT Indexer is updated for the respective accounts (from-user, to-voting item).

The NFT Indexer created for voting participation issues participation NFTs for all voters and individual NFTs for each selectable item.

Once the NFT issuance is complete, the NFT Indexer adds the selectable items to the wallet. Subsequently, participants transfer their NFTs to the wallet of the item they choose to participate in. This ensures safe tracking of participation information and accurate tallying of vote results.

  • The "Indexer" includes the following fields:
    • idx: A unique index value used by the "Indexer"
    • ownerSecret: Composed of a hash value of the user's address and secret text
    • nftIds: An array of IDs of NFTs owned by the user
  • This array is updated whenever an NFT is transferred or ownership is changed.
  • After voting is completed, each voting item's wallet tallies the NFTs it holds to create the final result. This structure ensures the transparency and accuracy of votes in a blockchain-based voting system while greatly improving processing efficiency.
zk-PUNK(NFT) Indexer Structure

Example 1) Process for Handling 6 Voters and 4 Candidates

Step 1: NFT Issuance

Initially, voter information is added to the Indexer. Each voter issues their own NFT at the time of participation in the vote. This NFT acts like a 'vote'. In this case, as there are 6 voters, 6 NFTs are issued. Each NFT has a unique ID (e.g., nftID220, nftID221, nftID222, nftID223, nftID224, nftID225), managed and recorded by the "Indexer".

Step 2: Voting

Voter 1 transfers their NFT (nftID220) to 'candidate 2'. This process is transparent and tamper-proof as it occurs on the blockchain on-chain. Voter 1's "Indexer" moves and records nftID220 from voter 1's wallet to the wallet of 'candidate 2'. This is done by removing nftID220 from voter 1's nftIds[] array in the Indexer and adding it to the nftIds[] array of the wallet for 'candidate 2'. After the voting process, a 'zk-nftID220 transferred to candidate 2's wallet-receipt (NFT)' is issued and sent to voter 1.

Step 3: Vote Tallying

When the vote concludes, each candidate's wallet is tallied. For example, the wallet of 'candidate 2' tallies the NFTs voted for them. The "Indexer" checks the number of NFTs voted for 'candidate 2's wallet and organizes the voting results based on this.

Step 4: Result Publication

The tallied results are announced according to the voting conditions, recorded, and published on the blockchain. All voters can verify their participation in the voting results with the receipt NFT they received. This entire process is executed through smart contracts.

Example 2) Process for Handling 3 Voters, 2 Candidates for Seoul Mayor, and 4 Candidates for Seoul City Council

In this way, the "Indexer" effectively manages and records the entire process from each voter's participation to the tallying of results, ensuring the transparency, accuracy, and verifiability of votes in the zero-knowledge blockchain voting system while greatly improving processing efficiency.

#zkVoting #zkVote #zkVotingSystem