ZeraLabs logo
WALLET

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

Public Ledger Exposure
Every transaction visible to everyone on the network
Address Linking
Multiple transactions can be linked to the same person
Balance Tracking
Anyone can see how much money you have
Spending Patterns
Your financial behavior is completely transparent
Real-World Privacy Nightmares

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

Personal Security
Protect yourself from theft, stalking, and targeted attacks based on wealth
Financial Freedom
Make financial decisions without fear of judgment or discrimination

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. Poseidon Commitments
Your deposit details (amount, secret, blinding factor, asset type, memo) are hashed together with the Poseidon X5 hash function into a single commitment — a cryptographic fingerprint that hides everything inside it.
2. Merkle Tree
Every commitment is inserted into a 24-level incremental Merkle tree on Solana, supporting over 16 million leaves. A Merkle proof shows your commitment exists in the tree without revealing which one it is.
3. Groth16 Proofs
When you spend, a Groth16 zk-SNARK proof (over the BN254 curve) is generated client-side and verified on-chain. It proves your transaction is valid without revealing any private inputs.
4. Nullifiers
Each commitment has a unique nullifier — Poseidon(secret, commitment) — stored as a Solana PDA. Publishing a nullifier marks a note as spent without revealing which commitment it belongs to, preventing double-spending.

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])
  1. amount — the value being shielded (e.g. 100 USDC)
  2. secret — a private key only you know, used to derive the nullifier later
  3. blinding — a random number that ensures two deposits of the same amount produce different commitments
  4. asset — the token type (e.g. USDC mint address)
  5. 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.

Why Poseidon Instead of Traditional Hashes?
ZERA uses Poseidon X5 (not SHA-256 or Pedersen commitments) because Poseidon was designed specifically for arithmetic circuits. It requires far fewer constraints inside a zk-SNARK, which means faster proof generation and smaller proof sizes — critical for a system that runs on Solana where compute is limited.

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

Step 1 of 6

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

Step 1 of 5

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.

Continue Learning

What Is Zero-Knowledge Cash?

The hook — why privacy matters for crypto

The Protocol In Action

Interactive visualization of all 4 circuit types

Real-World Use Cases

Web wallet, NFC tokens, AI agents, SDK