Voting with CoCo

Democracy on the Blockchain

CoCo now has a built-in voting pallet that makes on-chain voting free, transparent, and easy. Anyone can create an election in seconds. Vote tokens are sub-coins — the same technology that powers company loyalty programs and shareholder equity.

89 Unit Tests 18 Pallets 10 Scenarios FREE Creation 4 Vote Types Optional Anonymize Auto-Distribute 7 Extrinsics Shielded ✅

How It Works

  1. Create an Election

    Anyone creates an election for FREE. Set the name, options, voting window, and type — Democratic, Shareholder, Referendum, or Open. The election is created as a sub-coin (pallet-assets) on-chain, giving you verifiable vote tokens instantly.

  2. Distribute Vote Tokens

    Upload a CSV of citizens with names and ID numbers, or automatically distribute tokens to shareholders based on their existing share coin holdings. Each token = 1 vote. Tokens are minted in batches of up to 100 recipients per call.

  3. Voters Cast Ballots

    Voters sign with their on-device wallet and cast their ballot. One vote per address. The token is burned on vote — mathematically impossible to vote twice. No crypto knowledge required; voters just sign with their wallet. For sensitive elections, creators can enable optional privacy layer — ballots route through shielded stealth addresses so voter identities stay off the public record.

  4. Close & Finalize

    After the voting window ends, anyone can close the election. An admin finalizes it, burning any remaining undistributed tokens and publishing the final tally to the blockchain. The results are immutable and auditable forever.

Key Features

FREE

No payment required to create an election. VoteSessionPrice = 0. Create as many elections as you need at zero cost.

Transparent

Every ballot is on-chain, verifiable, and immutable. Anyone can audit the entire voting history for any election at any time.

Flexible

Democratic (1 person = 1 vote), Shareholder (weighted by share coin holdings), Referendum (Yes/No), or Open — choose the right type for your use case.

Identity-Linked

Upload a citizen CSV with names and ID numbers. Auto-mint tokens linked to verified identities, preventing impersonation.

Shareholder Ready

Auto-distribute vote tokens proportional to existing share coin holdings. Perfect for corporate governance and board elections.

Tamper-Proof

One token burned per vote. Mathematically impossible to vote twice. No double-spend, no double-vote, no fraud.

Auditable

Anyone can query any ballot, any election, any tally. Complete transparency from creation through finalization.

No Crypto Knowledge Required

Voters just sign with their wallet. No seed phrases, no gas fees, no blockchain terminology. Democracy that anyone can use.

Optional Anonymization

Route votes through the shielded privacy layer for anonymity. The CoCo privacy shield uses stealth addresses to break the on-chain link between voter identity and ballot. Anonymization is optional per election; transparent voting remains the default.

Flexible Administration

Different voting models, one system. HOA: 1 token per unit via Share coin. Shareholder: vote power weighted by holdings. National/Local: 1 person, 1 vote via Democratic type with citizen CSV. Eligible Actions on the dashboard auto-discovers your Share & Security coins for instant vote creation with automatic voter distribution.

Use Cases

National & Local Elections

Democratic type with citizen CSV upload. One person, one vote. Verifiable voter rolls, immutable results. Optional anonymization shields individual ballots from public view.

Corporate Governance & HOA

Shareholder or Share coin type. HOA: 1 token per unit. Corporate: vote power weighted by holdings. Use "Eligible Actions" on the dashboard to auto-discover vote coins and distribute tokens to all holders instantly.

Union Strike Authorization

Referendum type with Yes/No. Quick, verifiable member ballots. No disputed results.

Community Budget Proposals

Open type — anyone votes. Transparent allocation of community funds with on-chain proof.

Board of Directors Election

Shareholder type with multiple candidates. Weighted voting that respects equity distribution.

DAO Governance

Token-weighted proposals. Seamless integration with existing sub-coin ecosystems and treasuries.

Technical Specifications

Pallet17th pallet in the CoCo Substrate runtime
Extrinsics7 total: create_election, mint_vote_tokens, buy_vote_tokens, cast_vote, close_election, finalize_election, cancel_election
Creation CostVoteSessionPrice = 0 (free creation)
Token SystemEach election creates a sub-coin (pallet-assets) as the vote token
LimitsMax 20 options per election, max 100 recipients per mint batch
Test Coverage22 unit tests, 10 integration scenarios with 100 voters
Vote TypesDemocratic, Shareholder, Referendum, Open
RuntimeSubstrate FRAME pallet, compiled to WASM

Try It

# Create an election
curl -X POST http://localhost:4000/api/voting/create \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer TOKEN" \
  -d '{"assetId":100,"name":"My Election","voteType":"Democratic","options":["Yes","No"],"startBlock":10,"endBlock":100}'

# Query results
curl http://localhost:4000/api/voting/election/0

Tip: Use the CoCo CLI or API to automate voter registration, token distribution, and result aggregation. Full REST API documentation available in the docs.