The four pieces
The program is mint-scoped: each token has its own pool, treasury and Merkle tree. It collects the
withdrawal fee from that pool’s own on-chain config, and nothing else in the system charges one.
See Shield Pool program.
One instruction, three directions
Shield, private send and withdraw are the sameTransact instruction. What differs is the
public amount crossing the pool’s edge:
Every transaction spends up to two notes and creates up to two. The proof shows the inputs exist in
the tree, belong to the spender and balance against the outputs:
TransactSwap, which escrows the input and settles it
through Jupiter in a follow-up transaction. See Private swaps.
A private send, end to end
- Open the account. The wallet signs a fixed message once. The SDK derives the account’s
spending key, its viewing key
nkand itscloak_address from the signature. - Select notes. The SDK picks unspent notes that cover the amount, merging first if more than two are needed.
- Build outputs. One note for the recipient, one for the change. The recipient’s note secrets are sealed to the recipient’s viewing key so they can find it.
- Prove. The SDK fetches Merkle paths, builds the witness and generates a Groth16 proof in workers on the device.
- Submit. The request is signed and submitted for the user, so the user’s wallet does not appear and pays nothing.
- Verify on chain. The program checks the proof against a recent root, records the two nullifiers, and appends the two new commitments.
- Confirm. The SDK confirms settlement from chain state and stores the change note.
What stays private
An observer sees that a transaction touched a pool, the public amount, two nullifiers and two opaque commitments. A private send reveals no amount and no parties. Deposits and withdrawals reveal their public endpoints. Privacy guarantees lists exactly what each party can see.Compliance by design
Deposits carry a signed risk assessment that the program checks. Withdrawals and swaps are screened before they are authorized. Every transaction posts a small encrypted record readable with the sender’s viewing key, which is what lets a user disclose their own history to an auditor. See Viewing keys and compliance.Where to go next
UTXO model
Commitments, nullifiers, keys and the Merkle tree.
Privacy architecture
On-chain state, the fee model and history scanning.
Zero-knowledge proofs
The circuit, the ceremony bundle and how to verify it.
Quickstart
Move money privately in a few calls.