Documentation

Learn about zkSolana's privacy architecture and virtual pool innovation.

Virtual Pool Innovation

zkSolana solves the "cold start problem" that plagues traditional mixers. On day 1, most mixers have 0% privacy because there are no other deposits to mix with. We fix this with virtual commitments.

Traditional Mixer (Day 1)0% Privacy
1 real deposit ÷ 1 total = 100% chance of identification
zkSolana (Day 1)99.9% Privacy
1 real deposit + 999 virtual = 1,000 total commitments
1 real ÷ 1,000 total = 0.1% chance of identification

Virtual commitments are cryptographically indistinguishable from real ones. Each deposit generates 999 deterministic virtual commitments using a unique seed, providing instant anonymity even with zero prior deposits.

Privacy Modes

Choose between speed and maximum anonymity. Both modes protect your privacy, but Full ZK offers mathematically guaranteed unlinkability.

Basic Privacy

~5 seconds

Fast withdrawals using nullifier verification only. No ZK proof generation required.

Virtual pool protection (99.9% privacy from day 1)
Nullifier prevents double-spending
Lightning fast (~5s withdrawal)
Advanced adversary could potentially link deposits (very difficult)

Good for: Most users, small-medium amounts ($10-$10,000)

Full ZK Privacy

~5 minutes

Maximum anonymity using Groth16 zero-knowledge proofs. Browser-based proof generation ensures complete privacy.

Mathematically guaranteed unlinkability
Virtual pool + Merkle tree ZK proof
Proof generated in YOUR browser (no server sees your secrets)
192-byte Groth16 proof (compact & efficient)
Slower (~5 min proof generation due to browser WASM)

Good for: Large amounts (>$10,000), paranoid users, maximum privacy needs

Why is Full ZK slower?

Groth16 proof generation runs in your browser using WebAssembly (~8,000 cryptographic constraints). This ensures your nullifier and secret NEVER leave your device. We prioritize ease of use with browser-based proving.

Commitment Scheme

zkSolana uses Poseidon hash for ZK-friendly commitment generation:

commitment = Poseidon(nullifier || secret)

Using Poseidon hash (ZK-friendly) instead of SHA256 for efficient zero-knowledge proof generation

Privacy Pool Architecture

Merkle tree of commitments for efficient ZK proofs (depth: 20, supports 1M+ deposits)
Nullifier tracking to prevent double-spending
PDA-based vault for secure token storage
Encrypted on-chain commitment storage for cross-device access
Virtual pool system (1 real + 999 virtual = instant anonymity)

Fee Structure

Privacy fees scale with deposit size. Pay in zkSolana tokens based on the USD value of your deposit (works for any token: SOL, USDC, BONK, etc.)

Tier 1: Small Deposits
$1 - $100
Fee: 100 zkSolana (burned)
Example: 0.5 SOL (~$80) → Pay 100 zkSolana fee
Tier 2: Medium Deposits
$100 - $1,000
Fee: 1,000 zkSolana (burned)
Example: 500 USDC → Pay 1,000 zkSolana fee
Tier 3: Large Deposits
$1,000 - $10,000
Fee: 10,000 zkSolana (burned)
Example: 5,000 USDC → Pay 10,000 zkSolana fee
Tier 4: Whale Deposits
> $10,000
Fee: 50,000 zkSolana (burned)
Example: 100 SOL (~$16,000) → Pay 50,000 zkSolana fee

How It Works

Fees are paid separately in zkSolana tokens. Your full deposit (100% of SOL, USDC, etc.) goes into the privacy pool. The fee tier is determined by the USD value of your deposit at the time of mixing.

Deflationary Mechanism

All zkSolana fees are automatically burned (permanently removed from supply), making the token deflationary. No fees go to developers or treasury. Every privacy transaction reduces total supply.

Smart Contract

Built on Solana using Anchor framework.

Program ID (Mainnet)
-

Contract address will be updated after token launch on bags.fm