Docs/Introduction

Introduction to ZKMix

What ZKMix is, why privacy matters, and how it works at a high level

Introduction to ZKMix

ZKMix is a non-custodial, zero-knowledge privacy protocol built on Solana. It allows users to sever the on-chain link between a source address and a destination address by routing funds through a smart contract that accepts fixed-denomination deposits and processes withdrawals using zero-knowledge proofs. At no point does ZKMix take custody of your funds, and at no point does any third party learn which deposit corresponds to which withdrawal.

Why Financial Privacy Matters

Every transaction on Solana is permanently recorded on a public ledger. Anyone with an internet connection can trace the full history of any wallet: how much it holds, where it received funds, and where it sent them. While transparency is valuable for protocol integrity and auditability, it creates serious problems for individual users.

Without privacy, you expose yourself to several risks:

  • Targeted attacks. A wallet known to hold significant value becomes a target for phishing, social engineering, and even physical threats.
  • Commercial surveillance. Employers, landlords, insurers, and merchants can inspect your full financial history before doing business with you.
  • Front-running and MEV extraction. Visible pending transactions allow bots and validators to extract value by reordering or inserting transactions around yours.
  • Loss of fungibility. When individual tokens carry traceable histories, some tokens become less desirable than others, undermining the basic property of money.

Traditional financial systems offer a degree of privacy by default. Your bank does not broadcast your balance to the world. Blockchain technology removed that default, and ZKMix restores it.

The Problem with Transparent Blockchains

Solana processes thousands of transactions per second, and every one of them is visible to everyone. Suppose Alice pays Bob 10 SOL. That transaction is recorded with Alice's public key as the sender and Bob's public key as the receiver. If Alice's identity is ever linked to her public key, through a centralized exchange, an ENS name, or a social media post, her entire transaction history becomes attributable.

Blockchain analysis firms specialize in exactly this kind of deanonymization. They cluster addresses, trace fund flows, and build profiles of wallet owners. Simple techniques like sending funds through multiple wallets offer little protection because graph analysis can follow the trail across hops. The amounts, timing, and patterns of transactions provide strong heuristics for linking addresses even without explicit identity data.

What is needed is a mechanism that mathematically breaks the link between sender and receiver while still proving that the withdrawal is legitimate.

How ZK-SNARKs Solve This

ZK-SNARKs (Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge) are a class of cryptographic proofs that allow one party to prove they know a piece of information without revealing that information. In the context of ZKMix, a withdrawer proves they previously made a deposit without revealing which deposit was theirs.

The core idea works as follows:

  1. When you deposit into ZKMix, you generate a random secret and a random nullifier. You compute a cryptographic commitment from these two values and submit it to the on-chain Merkle tree along with your deposit.
  2. When you withdraw, you generate a zero-knowledge proof that demonstrates: (a) you know a secret and nullifier that hash to a commitment in the Merkle tree, and (b) the nullifier has not been used before. You submit the proof and the nullifier hash to the contract.
  3. The smart contract verifies the proof on-chain, checks that the nullifier has not been spent, records the nullifier, and releases the funds to the specified recipient address.

At no point does the contract or any observer learn which commitment you are spending. The proof is "zero-knowledge" because it reveals nothing beyond the truth of the statement. It is "succinct" because the proof is small and fast to verify regardless of the complexity of the underlying computation. It is "non-interactive" because the prover and verifier do not need to communicate back and forth.

ZKMix uses the Groth16 proof system with the Poseidon hash function, which is optimized for arithmetic circuits and produces efficient zero-knowledge proofs.

Key Features

Non-Custodial

ZKMix never holds your funds. Deposits are locked in a smart contract on Solana, and only a valid zero-knowledge proof can release them. There are no administrators, no multisigs controlling the pool, and no way for anyone, including the ZKMix team, to seize or redirect deposited funds.

Fast

Solana's sub-second block times mean deposits confirm almost instantly. Proof generation happens client-side in your browser and typically takes between 5 and 15 seconds depending on your hardware. On-chain proof verification completes within a single Solana transaction.

Cheap

Solana's low transaction fees make privacy accessible. A deposit or withdrawal on ZKMix costs a fraction of a cent in network fees, compared to the tens of dollars that similar protocols charge on Ethereum. This makes ZKMix practical for everyday privacy needs, not just large transfers.

Open Source

All ZKMix smart contracts, circuits, and client-side code are open source. The zero-knowledge circuits have been audited, and the trusted setup ceremony was conducted with community participation. Anyone can inspect the code, verify the proofs, or run their own relayer.

Multiple Denominations

ZKMix supports fixed-denomination pools for SOL and major SPL tokens. Fixed denominations are essential for privacy: if you deposit 7.3 SOL and someone later withdraws 7.3 SOL, the unusual amount links the two transactions. By using standard denominations like 1 SOL, 10 SOL, or 100 SOL, your deposit blends in with every other deposit of the same size.

Relayer Support

When you withdraw funds to a fresh wallet, that wallet has no SOL to pay transaction fees. ZKMix supports relayers: third-party services that submit your withdrawal transaction on your behalf and deduct a small fee from the withdrawn amount. This prevents the need to fund the recipient wallet from a traceable source.

Who Is ZKMix For?

ZKMix is for anyone who values financial privacy on Solana:

  • Individuals who do not want their complete financial history exposed to every person or service they transact with.
  • DAOs and organizations that need to make payments without revealing their full treasury activity to competitors or the public.
  • Traders who want to prevent front-running and avoid revealing their positions and strategies on-chain.
  • Donors who wish to contribute to causes without public attribution.
  • Developers who are building privacy-preserving applications and need a composable privacy layer on Solana.

Privacy is not about hiding wrongdoing. It is about maintaining the basic financial confidentiality that people have expected from monetary systems for centuries. ZKMix brings that expectation to Solana.

What Comes Next

The rest of this documentation covers how ZKMix works in technical detail, how to get started using it, answers to frequently asked questions, and a glossary of the terms you will encounter. If you want to understand the deposit and withdrawal flow, start with How ZKMix Works. If you want to start using ZKMix immediately, jump to Getting Started.