Skip to content

Protocol · legitimacy

Polls weighed in coins, counted by anyone.

Sats as weight. One ballot. Anyone tallies. In an OC Vote poll, each ballot is signed by a Bitcoin address and weighed by the coins that address holds. Anyone can collect the ballots and count them, and get the same answer.

A poll · test vector v01
{
  "v": 0,
  "kind": "oc-vote/poll",
  "creator": "bc1qalice",
  "question": "Do we ship?",
  "options": [
    { "id": "yes", "label": "Ship it" },
    { "id": "no", "label": "Hold" }
  ],
  "mode": "public",
  "weight_mode": "sats",
  "weight_params": null,
  "min_sats": 100000,
  "min_days": 30,
  "snapshot_block": 900000,
  "deadline": "2026-05-08T00:00:00Z",
  "tiebreak": "latest",
  "reveal_pk": null,
  "notes": null,
  "created_at": "2026-04-22T12:00:00Z"
}
  • Open spec, MIT
  • No account, no token
  • Voting moves no coins
  • Anyone can count it

The problem

01 / 10

An online poll is easy to stuff.

One person can open a thousand accounts, and a form counts each one.

The usual fixes cost something else. Token voting needs a token. A hosted poll asks you to trust whoever runs the server that counts. Formal election systems need an authority to keep the voter roll.

A group that wants a quick signal needs two things: faking a crowd should cost real money, and nobody should have to be trusted to count.

How it works

02 / 10

Write a poll. Sign a ballot. Anyone counts.

  1. 01

    Someone writes a poll

    It has a question, options and a deadline, and it names when coins are counted: at a Bitcoin block height, or at the deadline, which is what vote.ochk.io uses. It says how votes are weighed: one per address, by sats held, or by sats × days held (with a cap), plus optional minimums. The creator signs it, and its id is a hash of its contents, so nobody can change it after people vote.
  2. 02

    Voters sign a ballot

    You pick an option and sign with your wallet. Signing moves nothing. The ballot goes to public Nostr relays. Most polls count your latest ballot, so you can change your vote until the deadline. A poll can choose to count your first ballot instead.
  3. 03

    Anyone counts

    After the deadline, anyone collects the poll and its ballots, checks every signature, looks up each voter’s coins at the snapshot block and adds the weight per option. Two people running the count on the same inputs get byte-identical results.
The Bitcoin part
A vote’s weight is the value and age of the coins an address holds at a named block, and the ballot is a BIP-322 signature from that address. A plain keypair has no balance and no age to weigh.
Secret ballots are optional
Each choice is sealed with OC Lock to a key the creator publishes after the deadline.

Why it exists

03 / 10

Every other way misses at least one of these.

The spec’s own audit of the field, in words.

  • A bot can’t make a voter for free
    OC VoteYes
    SnapshotNo: liquid tokens can be bought
    HeliosYes, with an authority’s voter list
    Gitcoin PassportYes, through stamps
    Nostr pollsNo
  • Weighted
    OC VoteYes
    SnapshotYes
    HeliosOne voter, one vote
    Gitcoin PassportYes
    Nostr pollsNo
  • Anyone can count it, offline
    OC VoteYes
    SnapshotPartly
    HeliosYes
    Gitcoin PassportPartly
    Nostr pollsYes
  • Secret ballot
    OC VoteYes, if the poll asks for it
    SnapshotNo
    HeliosYes
    Gitcoin PassportNo
    Nostr pollsNo
  • No token, no KYC
    OC VoteYes
    SnapshotNo: needs a token
    HeliosNo: needs an authority
    Gitcoin PassportPartly: stamps lean on KYC
    Nostr pollsYes

The full argument is in the spec’s WHY.md.

Where it stands

04 / 10

Open under MIT, and free to use.

The OC Vote spec is v0, and it is still changing: its rule changes since 0.1.0 are listed as unreleased in its changelog. In a poll whose deadline is on or after 2026-11-15, a ballot is in time when a Bitcoin block anchors it; earlier polls are counted by their voters’ clocks, and say so. The reference library, @orangecheck/vote-core, is on npm under MIT and checks itself against the spec’s eighteen test vectors. The tools at vote.ochk.io are free. You need no account and no token: your wallet signs. OC Vote never holds your coins, and voting broadcasts no transaction.

Version
v0
Licence
MIT
Nostr kind
30080–30082
Test vectors
18

For developers

06 / 10

Build on it.

npm install @orangecheck/vote-core @orangecheck/bip322

Core

@orangecheck/vote-core

canonical form, poll and ballot ids, the three weight modes and tally(); no network, no wallet

CLI

@orangecheck/vote-cli

the oc-vote command: create, vote, discover, show, verify, tally, reveal

React

@orangecheck/vote-react

<OcPoll>, <OcTallyBadge> and useTally() to show a live count on any site

TypeScript · count a poll yourself
import { verifySignature } from '@orangecheck/bip322';
import { mempoolBlockTimeSource, resolveCloseBlock, tally } from '@orangecheck/vote-core';

// A ballot is in time when a Bitcoin block anchors it: read the last block at
// the deadline and the chain tip first.
const close = await resolveCloseBlock(poll.deadline, mempoolBlockTimeSource());
if (!close.ok) throw new Error(close.reason);

const result = await tally({
  poll,                      // the signed poll (Nostr kind 30080)
  ballots,                   // every copy of every ballot for it (kind 30081)
  utxosAt: (address, height) => utxosFromMyNode(address, height),
  verify: ({ address, message, signature }) => verifySignature(address, message, signature),
  tipHeight: close.tip,
  closeHeight: close.height, // null while voting is open
  anchorHeight: (ballotId) => anchorFromMyStamps(ballotId), // lowest verified OC Stamp anchor, or null
});
// { state: 'tallied' or 'provisional', basis: 'anchored', counted: [ballot ids], tallies: { yes: …, no: … }, … }
tally() refuses to run without a signature verifier. In a secret poll, pass unseal once the reveal is out. A poll that closed before 2026-11-15 is counted by its voters’ clocks: pass snapshotBlock instead of the three chain inputs.

Check one

07 / 10

Check a result yourself.

Nobody’s count is official, including ours. Paste a poll id or link to open its page, which fetches the poll and ballots from the relays and counts them on your machine.

What the count checks, per the spec:

  • the creator’s signature over the poll id;
  • for each ballot: it names this poll, comes from a mainnet address, was signed before the deadline, names a real option, and carries a valid signature from the voter;
  • one ballot per voter, chosen by the poll’s rule (latest or first);
  • in a secret poll: the reveal is signed by the creator and published after the deadline, and each opened choice matches the commitment in its ballot;
  • the snapshot block has at least 6 confirmations;
  • each voter’s weight under the poll’s mode and minimums, summed per option.

Anything that is not a poll id or a vote.ochk.io link opens the list of polls.

Over HTTP: curl "https://vote.ochk.io/api/tally?poll=<poll_id>". The answer names the relays and the coin source it used. Any site may call it.

On your own machine: npx -y @orangecheck/vote-cli tally <poll_id>. Add --mempool-base to read coins from your own mempool.space instance. oc-vote verify <poll_id> checks the signatures only.

What you trust

08 / 10

Every party you rely on, by name.

A source of Bitcoin data
The count needs each voter’s coins at the snapshot block. vote.ochk.io and the CLI read them from mempool.space by default. Run your own node or explorer and you trust no one.
One known gap in the reference tools
They count coins that are still unspent today and were confirmed by the snapshot block. A coin spent after the snapshot drops out, so a count run long after the deadline can come out lower than the spec’s answer. The tally API says so in every response.
Nostr relays
Polls and ballots are found on relays, and a relay can drop a ballot. The reference set is relay.ochk.io, nos.lol, relay.primal.net, relay.damus.io and nostr.oxtr.dev. Publishing to several limits the damage.
The creator of a secret poll
The creator holds the reveal key. They can read ballots before the deadline, and if they never reveal, the poll is abandoned with no count. Use a public poll if that is not acceptable.

What it is not

09 / 10

The limits, plainly.

Not one person, one vote
One person can hold many addresses. Splitting coins does not add weight when votes are weighed by sats, but it does in one-per-address mode, so that mode needs a minimum high enough to make splitting expensive.
Not coercion-proof
Once a secret poll is revealed, every choice is linked to its address. Anyone can ask you to prove how you voted.
Not a legal election
It is a signal for voluntary groups.
Not anonymous
Questions, options and voter addresses are public. A fresh address hides you but usually carries no weight.

Where it is used

10 / 10

Apps that use it.

No showcase app yet
None of the showcase apps (vault, chat, cosign, the demo) uses OC Vote yet. ochk.app lists the polls and ballots an account has signed, under What you’ve signed. vote.ochk.io is the reference tool.
oc-vote-examples (opens in a new tab)
Copy-ready templates: a Discord bot that posts counts, a GitHub Action that runs a job only when a poll passes, and shell recipes.

Run your first poll.

The tools are free and need no account or token. The spec is open to anyone who wants to build their own.

With thanks to Bram Kanstein (opens in a new tab), whose work on Bitcoin as a sovereignty layer shaped the premise.