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.

22 Unit Tests 17 Pallets 10 Scenarios FREE Creation 4 Vote Types 7 Extrinsics

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 or coin holdings. Each token = 1 vote.

  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.

  4. Close & Finalize

    After the voting window ends or 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.

Use Cases

National Elections

Democratic type with citizen CSV upload. Verifiable voter rolls, one vote per citizen, immutable results.

Corporate Governance

Shareholder type weighted by share coin. Board votes, proxy voting, proportional power based on real holdings.

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.