How ZERA Works
From the Privacy Problem to the Zero-Knowledge Solution
Traditional cryptocurrencies like Bitcoin were designed to be transparent, but this transparency comes at a huge cost to privacy. ZERA solves this with a shielded pool on Solana powered by Groth16 zk-SNARKs and Poseidon hash commitments.
The Transparency Trap
When Bitcoin was created, the idea of a public ledger was revolutionary. Everyone could see every transaction, making it hard to cheat the system. But this transparency has a dark side: complete financial surveillance.
With Bitcoin and similar cryptocurrencies, every transaction is permanently recorded on a public blockchain that anyone can view. This means:
- Your wallet balance is visible to everyone
- Every transaction you've ever made is public
- Who you've sent money to and received money from
- When you made transactions and how much
- Your spending patterns and financial behavior
The Address Linking Problem
Even if you use different addresses, sophisticated analysis can link them together. Companies and governments can use blockchain analysis tools to:
- Track money as it moves between addresses
- Identify patterns that reveal the same person owns multiple addresses
- Build profiles of users based on their transaction history
- De-anonymize supposedly anonymous transactions
The Privacy Problems
Imagine if your bank account was completely public. Anyone could see:
Your employer can see your salary and spending habits
Your landlord can see your rent payments and financial stability
Advertisers can target you based on your spending patterns
Criminals can see you have money and target you for theft
Why This Matters
How ZERA Solves It
The ZERA Protocol is a shielded pool on Solana that lets you deposit, withdraw, transfer, and physically hand off value — all without revealing amounts, senders, or recipients. Here's how each piece works.
The system has four key building blocks: Poseidon commitments that hide your data, a Merkle tree that stores them, Groth16 proofs that verify correctness, and nullifiers that prevent double-spending.
The Four Core Components
1. The Poseidon Commitment
How Your Data Gets Shielded
When you deposit into ZERA, your transaction details are hashed together using the Poseidon X5 hash function — a hash specifically designed to be efficient inside zero-knowledge circuits. The result is a single commitment value that hides everything.
What Goes Into a Commitment
A ZERA commitment is computed as:
Commitment = Poseidon(amount, secret, blinding, asset, memo[0..3])
- amount — the value being shielded (e.g. 100 USDC)
- secret — a private key only you know, used to derive the nullifier later
- blinding — a random number that ensures two deposits of the same amount produce different commitments
- asset — the token type (e.g. USDC mint address)
- memo[0..3] — optional metadata fields for notes or identifiers
The commitment is inserted into a 24-level incremental Merkle tree stored on Solana. With 24 levels, the tree supports over 16 million leaves — each one a shielded note. Nobody looking at the tree can tell which commitment is yours or what's inside it.
2. Nullifiers — Preventing Double-Spending
How Spending Works Without Revealing Your Note
When you want to spend a shielded note, you need to prove you own it and mark it as used — without revealing which note in the Merkle tree is yours. This is where nullifiers come in.
Nullifier = Poseidon(secret, commitment)
- secret is the private key only you know (the same one inside your commitment)
- commitment is the Poseidon hash of your shielded note
Each nullifier is stored on Solana as a Program Derived Address (PDA). If a nullifier already exists on-chain, the transaction is rejected — this is what prevents double-spending. Since the nullifier is derived from your secret and commitment, nobody can link it back to a specific leaf in the Merkle tree.
The Merkle Proof
To prove your note exists in the tree, the circuit verifies a Merkle inclusion proof — a path of 24 sibling hashes from your leaf to the root. The on-chain program checks that the root you provide matches the current Merkle root stored in the contract. This proves membership without revealing position.
3. Making a Shielded Transfer
Select a shielded note
The sender selects a shielded note they own — they know the secret, blinding factor, and amount inside it. This note is a leaf in the 24-level Poseidon Merkle tree on Solana.
4. Putting It All Together
Deposit
Tokens go into the shielded pool and a Poseidon commitment is added to the 24-level Merkle tree on Solana. The commitment hides the amount and owner — only the depositor knows the secret.
Every step maps directly to code in the @zera-labs/sdk (TypeScript + Rust core), with circuits compiled by snarkjs and proofs verified on Solana. The web wallet at wallet.zeralabs.org is live today.
