How it works

DeFi, short for decentralised finance, means financial services that run as code on a public blockchain instead of through a bank. Private DeFi is the part of it built to keep balances and payments out of public view, using shared pools, cryptography or both. This page explains how it works, what it hides and where it still falls short, without assuming any background.

The problem: a public ledger

A blockchain such as Bitcoin or Ethereum is a shared record of every payment ever made on it, copied across thousands of computers. That openness is what lets strangers trust it: anyone can check the record, so nobody can quietly change it. The cost is that anyone can read it too, and nothing on it is ever deleted.

A wallet address is a long string of letters and numbers rather than a name, but it is not secret either. Once a single payment ties it to you, such as a withdrawal from an exchange that knows who you are, anyone who makes that connection can look up its balance and every payment it has made or will make.

From that record, a watcher can learn:

  • who paid whom, and how much;
  • when each payment happened;
  • habits over time: pay days, regular bills, the services you use and the people you deal with.

Specialist firms sell software that does this at scale, grouping addresses that belong to the same person. Private DeFi tries to break those links.

On a public ledger, every balance and payment is open to anyone, forever.

The basic trick: the pool

Most private DeFi tools rest on one idea: many people put money into one shared pool, so that what comes out cannot be matched to what went in.

  1. 1Deposit

    Funds move from a public wallet into a shielded pool.

  2. 2Shield

    Inside, balances become identical notes. A zero-knowledge proof shows each one is valid without revealing whose it is.

  3. 3Transact privately

    Transfers and swaps happen inside the pool, with amounts and parties hidden.

  4. 4Withdraw

    Funds leave to a fresh address with no visible link back to the deposit.

The general pattern behind shielded pools and mixers. Confidential tokens and private exchanges reach the same goal with other techniques, such as encrypted balances.

In most designs, when you deposit, you receive a note: a secret that lets you, and only you, claim that deposit later. The pool stores only a sealed fingerprint of it, called a commitment. When you withdraw, you prove that your note matches one of the commitments in the pool without saying which, using a zero-knowledge proof (see the technologies below). The pool checks the proof, records a marker called a nullifier so that the same note cannot be used twice, and pays out to whatever address you choose.

The privacy comes from the crowd. Everyone whose note could be the one being withdrawn is part of your anonymity set. If only three people have deposited, a watcher has a one-in-three guess; with thirty, one in thirty; with thousands, the guess is close to worthless. The more people use a pool, and the more alike their deposits look, the harder it is to pick anyone out.

As the pool fills with identical notes, a watcher's guess gets weaker.

Where privacy still leaks

A pool only hides you if nothing around it gives you away. None of the leaks below breaks the cryptography; each works by matching patterns that stay visible on the chain or along the way.

These leaks explain much of how private DeFi is built. Mixers accept only fixed sizes so that amounts give nothing away, relayers exist so that a fresh wallet never needs funding from an old one, and some people run their own node, or connect through Tor (a network that hides where a connection comes from), so that no outside server sees them.

The technologies

Projects reach privacy in different ways, and many combine several of the techniques below. Each card gives an everyday comparison, what the technique hides and what it leaves visible. Designs differ, so read these as the general picture; the projects named are examples from those listed on this site.

One fixed size goes in; identical amounts leave for different wallets.

Mixers

Like a box of identical banknotes: many people each put one in and later each take one out, so nobody can say whose came back.

A mixer is a pool that accepts only a few fixed sizes, called denominations. Tornado Cash, for example, has separate pools for sizes such as 0.1, 1, 10 and 100 ETH (Ethereum's currency). Every deposit becomes an identical note, and a withdrawal proves it owns one of them without saying which, so the money arrives at a new address with no visible link to where it came from.

What it hides
The link between each deposit and its withdrawal.
What it does not hide
That you used the mixer, the size you used, and when you went in and came out.
Used by
Tornado Cash.
The checker sees only the proof card, and the secret stays sealed.

Zero-knowledge proofs

Like proving you know a password without saying it.

A zero-knowledge proof is a small piece of data that convinces anyone who checks it that a statement is true, while revealing nothing else. In a pool the statement is roughly "I own one of the unspent notes in here", and the proof convinces the pool's code without showing which note it is or who owns it. The projects named on this card use a kind called the zk-SNARK, which is small and quick to check.

What it hides
The secret behind the claim, such as which note is yours.
What it does not hide
Anything outside the proof: that a transaction happened, when it happened and, in most designs, the amounts entering and leaving a pool.
Used by
Tornado Cash, Railgun, Privacy Pools and Zcash.
Value changes hands inside the pool while the outside sees no change.

Shielded pools with private transfers

Like a closed room in a public square: people inside can pay each other, and passers-by see only the walls.

A shielded pool goes further than a mixer. Money that enters can stay inside and move between users: a payment spends the sender's notes and creates new ones for the recipient, with a zero-knowledge proof showing that the sums add up. Amounts can be any size, and value can change hands many times without leaving the pool. Railgun keeps balances as private notes inside its smart contract (code that runs on the blockchain), and Zcash has shielded pools built into the coin itself.

What it hides
Who pays whom inside the pool, and how much.
What it does not hide
Money entering and leaving the pool, with its amount and time, which can still be matched as described above.
Used by
Railgun and Zcash.
Two sealed amounts go in and a sealed total comes out, never opened.

Confidential tokens

Like adding up sealed envelopes without opening them.

Instead of hiding money in a shared pool, a confidential token keeps every balance encrypted on the chain. A technique called fully homomorphic encryption lets the network add and subtract encrypted numbers without decrypting them, so a transfer updates balances that nobody can read. Only the owner, or someone they allow, can see the real figures. Ordinary tokens can be wrapped into confidential versions, with the originals held as backing.

What it hides
Balances and the amounts sent.
What it does not hide
In most designs, which addresses take part and when each transfer happens.
Used by
Zama.
One real signer among decoys, with a one-time address and a hidden amount.

Privacy coins

Like a letter signed on behalf of a group, where nobody can tell which member held the pen.

Some coins build privacy into the currency itself. Monero is private by default and combines three methods: ring signatures, which hide the real signer among decoys drawn from earlier transactions; one-time stealth addresses, so each payment lands at a new address that only the recipient can recognise; and hidden amounts. Zcash works differently. It has both transparent and shielded addresses, and payments between shielded addresses use zero-knowledge proofs to hide the sender, the recipient and the amount. Shielding in Zcash is optional, and transparent payments are as visible as on Bitcoin.

What it hides
In Monero, which coin was really spent, who received it and how much; in shielded Zcash payments, the sender, the recipient and the amount.
What it does not hide
That a payment happened and when, and anything sent through Zcash's transparent addresses.
Used by
Monero and Zcash.
Each party holds one piece, and nobody sees the whole picture.

Secure computing

Like a group working out its average salary without anyone revealing their own.

Multi-party computation, or MPC, splits a secret between several independent parties. They work on it together, each seeing only its own share, and still produce a result such as a decrypted figure or a matched trade; the secret stays safe unless enough of them collude. A related approach, trusted hardware, runs the work inside a sealed chip designed to stop even the machine's owner looking in, which means trusting the chip maker.

What it hides
The full secret, from every single party.
What it does not hide
Whatever the result itself reveals. It cannot help if enough parties collude, or if the chip has a flaw.
Used by
Zama, which splits the key that unlocks its encrypted balances between several operators, each running inside secure hardware.
A withdrawal shows it belongs to the clean set, not which note it came from.

Compliance tools

Like proving your name is on the guest list without pointing to which name it is.

Some tools let people show that their money is clean while keeping the rest private. In Privacy Pools, a withdrawal can prove that it comes from an association set, a group of deposits judged acceptable that leaves out those linked to known crime, without revealing which deposit is yours. In the live version a provider maintains the approved set, and a depositor left out of it can still take their own money back in public. Viewing keys, in Zcash and Railgun, work the other way round: an owner can give a read-only key to an auditor or accountant, who can then see that owner's history while everyone else still cannot.

What it hides
Which deposit is yours, and your history from anyone who does not hold your viewing key.
What it does not hide
Whatever you choose to reveal. Association sets rely on whoever draws them up, and in most designs a viewing key cannot be taken back once shared.
Used by
Privacy Pools (association sets); Zcash and Railgun (viewing keys).

What this means for the numbers on this site

The TVL figures here (total value locked) measure the money sitting in private pools and in the wrappers behind confidential tokens at a given moment. Zcash shielded supply counts the coins held inside Zcash's shielded pools, out of public view. Both show how much value is being kept private, not how many people use these tools or how often.

Private does not mean untraceable. Money in a pool is only as hidden as the crowd around it and the care taken on the way in and out, and the leaks above apply to every design. The protocols page lists each project with its type, so you can see which technique sits behind each figure.

Glossary

Anonymity set
The group of people you could be mistaken for. The larger it is, the better you are hidden.
Note
A private record of value inside a pool that only its owner can spend.
Commitment
The sealed fingerprint of a note that a pool stores in public. It shows the note exists without showing what it holds or whose it is.
Nullifier
A marker published when a note is spent, so the same note cannot be spent twice, without revealing which note it was.
Relayer
A service that sends your transaction and pays its fee for you, in return for a small cut. Railgun calls them broadcasters.
Shielded
Held or sent inside a privacy pool, where the parties and amounts are hidden.
Transparent
Visible on the public ledger, like an ordinary payment. Zcash uses the word for its public addresses.
Zero-knowledge proof
A proof that a statement is true which reveals nothing beyond that fact.
zk-SNARK
A compact zero-knowledge proof that is quick to check; short for zero-knowledge succinct non-interactive argument of knowledge.
Fully homomorphic encryption (FHE)
Encryption that still lets computers calculate with data while it stays encrypted.
Stealth address
A one-time address made for a single payment, so that payments to the same person cannot be linked.
Ring signature
A signature that proves someone in a group signed, without showing who.
Viewing key
A read-only key that lets its holder see an owner's private history but not spend anything.
Association set
In Privacy Pools, a group of deposits judged acceptable, which a withdrawal can prove it belongs to.
Denomination
One of the fixed sizes a mixer accepts, such as 1 ETH.
Front end
The website or app you use to reach a protocol. It is separate from the code that runs on the blockchain.

Sources

The data behind the figures on this site is credited on the Sources page.