Anonymous On-Chain Voting

Create polls where every vote is backed by a ZK proof. No one sees how you voted. Everyone can verify the result is correct. Deploy to any EVM chain.

Quick Start

Three API calls. Create a poll, cast a ZK-proven vote, read the results.

Create a poll
curl -X POST https://api.bitwrap.io/api/polls \
  -H "Content-Type: application/json" \
  -d '{"title":"Board Vote","choices":["Approve","Reject","Abstain"],"duration":"24h"}'

# → {"id":"p_8f3a...","status":"active","choices":3}
Cast a vote with ZK proof
curl -X POST https://api.bitwrap.io/api/polls/p_8f3a.../vote \
  -H "Content-Type: application/json" \
  -d '{"choice":0,"secret":"voter-entropy","nullifier":"unique-id"}'

# → {"nullifier":"0x4b2c...","proof":{"a":...,"b":...,"c":...},"verified":true}
Get results
curl https://api.bitwrap.io/api/polls/p_8f3a.../results

# → {"tally":[12,7,3],"total":22,"choices":["Approve","Reject","Abstain"]}

Vote → Prove → Tally

Voter privacy and result integrity in one protocol.

Vote

Voters register with a commitment hash. When they cast a ballot, a nullifier prevents double-voting without revealing identity.

Prove

Each vote generates a Groth16 proof attesting the voter is registered and the ballot is valid — without revealing the choice.

Tally

Results stay sealed until the poll closes. Once closed, the final tally is publicly verifiable — anyone can audit the proofs without accessing individual ballots.

Try It Live

Cast a vote on an active poll. Your choice stays hidden until the poll closes.

Loading active polls…
View All Polls

Why ZK Voting?

Voter Privacy

Nullifiers link each ballot to a registered voter without revealing who voted for what. The proof confirms eligibility; the choice stays hidden.

Wallet-Native Auth

Connect MetaMask to create polls and derive voting secrets from wallet signatures. No accounts, no passwords — your key is your identity.

Verifiable Results

Every vote carries a Groth16 proof that the on-chain verifier checks. No trusted tallier, no back-room count — the math is the audit.

Deploy to Your Chain

Download a complete Foundry project. Deploy the ZK poll contract to any EVM chain in minutes.

What You Get

BitwrapZKPoll.sol — governance contract with nullifier-based double-vote prevention and voter registry Merkle root verification.

Verifier.sol — auto-generated Groth16 verifier for the voteCast circuit. Deployed alongside the poll contract.

Deploy.s.sol — Foundry deployment script with sample initialization.

Three Commands

# Download the bundle
curl -o poll.zip https://api.bitwrap.io/api/bundle/vote

# Build & test
cd BitwrapZKPoll && forge test

# Deploy
forge script script/Deploy.s.sol \
  --rpc-url $RPC_URL --broadcast
Download Foundry Bundle

Built on Petri Net Foundations

The voting protocol is one application of a general-purpose ZK state machine. The same framework powers token standards.

Vote

ZK Polls

Register, cast, tally — anonymous voting with nullifier-based double-vote prevention and on-chain proof verification.

ERC-20

Fungible Token

Transfer, approve, mint, burn — five transitions, three places, conservation law built in.

ERC-721

Non-Fungible Token

Ownership tracking, approval, safe transfer — each token ID is a unique state.

ERC-1155

Multi Token

Fungible and non-fungible in one contract. Batch operations, operator approvals.