GhillieDocs Open the app

How it works

How privacy works

The pool, notes, nullifiers and the crowd you hide in, in plain words.

Ghillie hides who you are, not what happened. This page explains how, without the maths.

The pool

There is one pool, on Elysium, for every token and every user. One pool means one crowd. The Ghillie vault contract holds all the tokens. It does not keep a list of who owns what. Instead, your balance is a set of notes.

Notes

A note is a small record that says: this much of this token belongs to whoever holds a certain key.

The pool never stores notes in the clear. For each note it stores a fingerprint, called a commitment, in one long list. That list is a Merkle tree with room for about 16.7 million notes. Your wallet address is not part of the fingerprint.

The note's details are encrypted so that only its owner can read them, and posted on-chain next to the fingerprint. Your app downloads every encrypted note and tries to open each one with your viewing key. It keeps the ones that open.

Your app reads the pool's events straight from an Elysium RPC node, and opens your notes inside your browser. Nobody is asked which notes are yours. The RPC provider does see your IP address and what the app reads, and Ghillie's relayer sees your transactions. What's hidden and what's public lists who sees what.

Spending a note

When you trade in Max privacy, send or unshield, your browser makes a zero-knowledge proof. The proof convinces the contract of a few facts without revealing the details:

  • You own notes that are in the pool's list. The proof does not say which ones.
  • The amounts add up. Nothing is created out of thin air.
  • The new notes are built correctly.

Each proof spends up to two notes and creates up to two new ones. A typical send creates one note for the recipient and one for your change. All the notes in one proof are the same token. Making a proof takes about 4 to 5 seconds on a desktop computer.

Nullifiers

The contract still has to stop anyone spending the same note twice. It does this with nullifiers.

When you spend a note, the proof publishes a one-time tag for it: the nullifier. Only the owner's spending key can compute it. The contract keeps a list of every tag it has seen and rejects any repeat.

Because nobody else can compute your tag, an observer can't tell which note in the list a tag belongs to. They see that some note was spent. They can't see which.

The relayer

If your wallet sent the transaction, your address would sit right next to the action and undo the point. So a relayer submits it for you and pays the gas. You pay the relayer privately, in WHYPE or USDC. The fee follows the network's gas price, with a floor of 0.005 WHYPE. See Relayer.

The crowd you hide in

When you spend, an observer knows only that the spender is one of the people who own notes in the pool. That group is called the anonymity set. The bigger it is, the harder you are to pick out.

In practice your crowd is smaller than the whole pool. It is the people who hold the same token, in amounts that could cover the action, who shielded before you acted.

Compare two cases:

  • Three people have shielded a thin token. One of them shielded 52,318 of it an hour ago. Then 52,000 of that token is unshielded. An observer can make a good guess.
  • Three thousand people hold USDC in the pool, many in round amounts. The same 52,000 USDC exit fits many of them, and a guess is much weaker.

This is why a busy pool helps everyone in it. Each new user makes everyone else's crowd larger.

Fast mode will work differently

Fast mode is coming next. A trading wallet will be an ordinary public wallet. Its privacy won't come from the crowd. It will come from how it was funded: privately from the pool, so nothing connects it to you. Rotating it when Ghillie flags high exposure will keep any one wallet from building a history worth following. See Trading wallets.

What a proof can't hide

Some things have to be public for the pool to work. Shields show your wallet. Swaps show the tokens and amounts. Cash-outs show the recipient and amount. The proof hides only the link back to you. Distinctive amounts and timing can rebuild that link, which is why the app runs a Leak check.

What the cryptography uses

Part Choice
Proof system Noir circuits, UltraHonk proofs (Barretenberg). No per-circuit trusted setup. The prover's setup data is served from Ghillie's own site.
Hash Poseidon over the BN254 field
Note encryption X25519 key exchange, HKDF-SHA256, XChaCha20-Poly1305
Tree Depth 24, about 16.7 million notes. The contract accepts proofs against any of the last 1,000 roots, so busy periods rarely make you prove again. If a proof does go stale, the app makes a fresh one once, automatically.