Siphon Docs
Concepts

Notes & Vaults

How private balances work inside Siphon.

A note is the unit of private balance inside a Siphon vault.

Note structure

Each note contains:

FieldRole
ValueToken amount (wei for ETH, base units for ERC-20)
NullifierSecret scalar; its hash is revealed on spend
SecretAdditional entropy for commitment derivation

The commitment inserted into the Merkle tree is:

commitment = Poseidon(value, Poseidon(nullifier, secret))

Only the user who generated the note knows the nullifier and secret.

Deposits

When you deposit through the Entrypoint:

  1. Tokens move into the asset-specific Vault.
  2. A new commitment is inserted as a Merkle leaf.
  3. Note secrets are generated and stored locally (optionally encrypted and synced to the server).

Spends

Spending a note requires a Groth16 proof that:

  • Proves Merkle membership of the input commitment(s)
  • Reveals nullifier hash(es) to prevent double-spend
  • Binds the recipient and any swap parameters in public signals

Observers see that some note was spent — not which deposit it came from.

Spendable balance

Your balance is not a single on-chain number. The dapp reconstructs it by:

  1. Matching local notes against indexed Merkle leaves
  2. Excluding notes whose nullifiers appear on-chain
  3. Summing remaining note values

The indexer (siphon-indexer) makes this a single HTTP query instead of thousands of eth_getLogs calls.

Vault operations

OperationWhat it does
WithdrawSend value to a recipient; optional change note
MergeCombine 2–6 notes into one (funds stay in vault)
SwapSpend one note through Uniswap V3; mint change note
SplitDivide one note into up to eight slices

On this page