Zeko
Buy + Make a proof +

Docs

Everything a verifier needs to decide whether to trust a Zeko proof, including where it falls short.

The model

Zeko answers one question: can a person show they hold a coin, or bought it early, without saying which wallet they are? A set is built for a coin from chain data. Each eligible holder adds a private key to the set. Anyone in the set can then make a zero-knowledge proof that some enrolled member exists and is speaking, bound to a short message, without saying who.

  1. Snapshot. The server reads the coin's token accounts (or its first buyers), sums balances per owner, and keeps the top 1,000 (or the first 100 buyers). The list is public chain data and is served by the API.
  2. Identity. Your wallet signs a fixed message. Ed25519 signatures are deterministic, so the same wallet always derives the same secret: secret = sha256("zeko/v1/secret:" + signature), first 31 bytes. Your commitment is Poseidon(secret).
  3. Enroll. Your wallet signs enroll(setId, commitment). The server checks the signature and that the address is in the snapshot, then appends the commitment to the set's Poseidon tree.
  4. Prove. In the browser, snarkjs makes a Groth16 proof that you know a secret whose commitment is a leaf under the published root. The nullifier is Poseidon(scope, secret) with the scope derived from the set id, so one member can speak once per set.
  5. Verify. The proof is checked server-side and again, on the proof page, in your own browser against the public verification key.

The circuit

One circom 2 template, ZekoMembership(10), in circuits/zeko.circom. A depth-10 tree holds 1,024 members. It compiles to 2,874 constraints with 21 private inputs.

SignalVisibilityMeaning
secretprivatederived from the wallet signature
pathElements[10], pathIndices[10]privatethe Merkle path, which also hides the leaf position
rootpublic outputrecomputed from the leaf and path
nullifierpublic outputPoseidon(scope, secret)
scopepublic inputhash of the set id
messagepublic inputhash of the claim text, or 0

The message is squared inside the circuit so it is a constrained signal, which stops a proof being re-used with different words. Hashes are Poseidon over the BN254 field, matching circomlib.

Trusted setup

Groth16 needs a setup. Phase 1 is the PSE Perpetual Powers of Tau, contribution 80 file ppot_0080_13.ptau (213, hundreds of independent contributors), sha256 ccee28086e4b81d81a6e16fdee054d1dbd5276362e2662d4205d31de45cb930f. Phase 2 is circuit specific: one contribution with fresh entropy, then a public random beacon, the finalized Solana blockhash D4mGGkKp95XwrfPtAcmN5Atmbakh7Dp4ti7yJBgyEzxS at slot 472164740, hashed 1024 times. The result was verified against the r1cs and the ptau.

Be clear about what that means: phase 2 had a single contributor plus a beacon. If that contributor kept their entropy and every phase-1 contributor colluded, a false proof could be forged. Forging proofs would let someone claim to hold a coin they do not. It would still not reveal anyone's address. Rebuild it yourself with node circuits/build.mjs.

FileSizesha256
zeko.wasm1980 KB9e9d279d76decaa0...
zeko.zkey1683 KB3e87d4edc2a1c757...
verification_key.json3.5 KBfa062ae7d6232092...

Public and private

Visible to everyoneVisible to the Zeko serverNever leaves your device
The set's eligible list and root; each enrollment (address, commitment, signature); every proof (root, nullifier, message, claim text)Your IP on each request (stored only as a salted hash for rate limits); the enrollment you sendYour identity signature, your secret, your Merkle path, the proof witness

An enrollment says an address joined a set. A proof says some member spoke. Nothing connects them except what the proof's anonymity set allows: with N members, you are one of N.

Threat model

What Zeko protects

From the proof alone, nobody can tell which enrolled wallet made it, and a second proof from the same member in the same set is rejected without linking the two.

What it does not protect

  • Small crowds. Anonymity is the number of enrolled members, not the snapshot size. With 2 members you are 50% identifiable. The server refuses proofs under 2 members, and the page warns below 10.
  • Timing. If you enroll and prove within moments, an observer can match the two. Wait, or prove after others have enrolled.
  • Enrollment is public. Anyone can see that your address enrolled in a set. That proves you held the coin at the snapshot.
  • Censorship. The server could refuse an enrollment. It cannot forge one, because every enrollment is signed and the tree is auditable with auditSet.
  • Point in time. A snapshot says you held at that slot. It does not say you still hold.
  • Network metadata. The server sees an IP when you post. Use a VPN if that matters to you.
  • The setup. See above: one phase-2 contributor plus a beacon.
  • Program accounts. Wallets owned by a program cannot sign messages, so they cannot enroll.

Limits

  • A tree holds 1,024 members, so a set caps at 1,000 holders or 100 early buyers.
  • Early buyers are found by walking the coin's history back to its start, up to 40,000 transactions. Busier coins are not supported for that set.
  • Snapshots of one coin are reused for 30 minutes. Making a new one is rate limited.
  • Proving needs a modern browser with WebAssembly and about 300 MB of memory.
  • Messages are at most 140 characters.

SDK

The same code the site runs lives in sdk/. It works in browsers and Node. Pass snarkjs's groth16, or let it use the global.

import * as Z from './sdk/src/index.js'

const sig = await wallet.signMessage(Z.IDENTITY_MESSAGE)
const secret = await Z.secretFromSignature(sig)
const commitment = Z.commitmentOf(secret)

const set = (await (await fetch('/api/sets?id=' + id + '&audit=1')).json()).set
Z.auditSet(set)        // re-derives the root from signed enrollments

const out = await Z.prove({ secret, members: set.commitments, setId: id,
  claim: 'held through the dip', wasm: '/assets/zk/zeko.wasm', zkey: '/assets/zk/zeko.zkey' })
await Z.verify({ vkey, proof: out.proof, publicSignals: out.publicSignals,
  setId: id, claim: 'held through the dip', roots: set.roots.map(r => r.root) })

The repository's npm run check runs the SDK checks and an end-to-end run against the real database and circuit, enrolling throwaway wallets, proving, verifying, and then deleting every row it made.

Decisions

Leaves are keys, not addresses

A tree of addresses would let anyone prove for any public address, since an address is not a secret. So leaves are commitments to a secret derived from a wallet signature. The cost is an enrollment step.

Enrollments are public

Publishing each signed enrollment lets anyone rebuild the tree and catch a server that adds members who are not holders. The privacy comes from the proof hiding which member spoke, not from hiding who enrolled.

Fixed depth 10, top 1,000

Depth 10 keeps the circuit near 2,874 constraints, so the key is 1.68 MB and proving takes seconds on a phone. A deeper tree would hide more people and prove slower.

Powers of Tau plus a Solana beacon

Phase 1 reuses a large public ceremony. Phase 2 closes with a beacon nobody could predict, a finalized Solana blockhash recorded in the setup file.

A floor of 2

A proof from a set of one points at that member, so the server refuses it. The warning at 10 is advice, not a rule.

No fees, no vault

Zeko holds no funds and pays no one. It has no wallet to drain.