Skip to main content
Cloak is a shielded pool on Solana. Value enters as notes, moves between owners inside the pool, and leaves to public addresses. A zero-knowledge proof, built on the client, accompanies every state change, and the on-chain program accepts nothing without one.

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 same Transact 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:
Private swaps use a second instruction, TransactSwap, which escrows the input and settles it through Jupiter in a follow-up transaction. See Private swaps.

A private send, end to end

  1. Open the account. The wallet signs a fixed message once. The SDK derives the account’s spending key, its viewing key nk and its cloak_ address from the signature.
  2. Select notes. The SDK picks unspent notes that cover the amount, merging first if more than two are needed.
  3. 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.
  4. Prove. The SDK fetches Merkle paths, builds the witness and generates a Groth16 proof in workers on the device.
  5. Submit. The request is signed and submitted for the user, so the user’s wallet does not appear and pays nothing.
  6. Verify on chain. The program checks the proof against a recent root, records the two nullifiers, and appends the two new commitments.
  7. Confirm. The SDK confirms settlement from chain state and stores the change note.
The same steps run for a withdrawal, with a negative public amount and a recipient address. A shield is signed and submitted by the funding wallet. Transaction lifecycle has the per-flow detail.

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.