Skip to content
On this page

OC Vote

Stake-weighted, sybil-resistant polls on Bitcoin. OC Vote lets you run a poll whose outcome depends on how much Bitcoin each voter holds (optionally weighted by time held). The tally is deterministic, pure, and cross-implementation testable — there is one correct answer for any poll and ballot set, and every reference impl produces it.

What it gives youLink to this section

  • Three canonical weight modes — one_per_address, sats, sats_days — chosen per-poll at creation time.
  • Deterministic tally — a pure function from (poll, ballots, chain-snapshot) to a tally result. No ordering ambiguity.
  • Offline-tallyable — anyone holding the poll + ballots + a Bitcoin chain snapshot for the relevant block height can recompute the tally from scratch.
  • Optional secret-mode ballots — commit-reveal for cases where plaintext votes would bias later voters.
  • Transport-agnostic — polls and ballots are signed JSON blobs. Publish via Nostr, HTTP, email, whatever.

What it does NOT solveLink to this section

  • Proof of personhood. Stake weighting is the wrong tool for one-human-one-vote. Use World ID or BrightID for that.
  • Adversarial chain-state hiding. Voters prove they hold UTXOs via an on-chain snapshot at a fixed block height. If your voters move coins before the snapshot, they can unstake. Pick the snapshot carefully.
  • Coercion resistance. Plaintext and commit-reveal ballots both leak the voter's choice under coercion (plaintext immediately; commit-reveal at reveal time). For coercion-resistant e-voting, the research literature has much more careful constructions — OC Vote is not one of them.

AnchoringLink to this section

A poll whose deadline is on or after 2026-11-15T00:00:00Z is anchored. Whether a ballot is in time is decided by the Bitcoin block that anchors its ballot id, through an OC Stamp over the ballot. A final tally counts only ballots anchored at or below H_close + G: H_close is the greatest block whose median time past is at or before the deadline, and G is 36 blocks. Until the chain tip reaches H_close + G + 6, the tally is provisional. A poll with an earlier deadline is clock-dated, and its tally says so. The tally algorithm has the rules.

Anyone can anchor a ballot: the voter's own client, or anyone else who sees it. A tally reads the anchors, not who made them. vote.ochk.io runs a convenience anchorer that stamps the ballots it sees in open anchored polls, within published limits: per run, 300 new stamps shared across polls, 50 a poll, and 50 polls read. It is never required, and anyone can run another.

Section contentsLink to this section

PackagesLink to this section

  • @orangecheck/vote-core — reference implementation, canonicalization, tally()
  • @orangecheck/vote-cli — shell interface for tallying, verifying, inspecting polls

See SDK overview.

Shared ecosystem conceptsLink to this section

Spec + implementationLink to this section

  • Normative spec: oc-vote-protocol (opens in a new tab) (MIT)
  • Reference impl: @orangecheck/vote-core, vote-cli in oc-packages (opens in a new tab)
  • Conformance vectors: 18 fixtures covering minimal public poll, sats weighting, sats_days with cap, vote-change semantics, secret-ballot commit-reveal, ballot times, anchored and clock-dated polls, provisional and deferred tallies, the order of counted, and the 32-level nesting limit