Skip to content
Open app

Notes and labels

A note is a private balance in SPP. Its label is the hash of the deposit it came from, and it travels with the money.

Notes

A note is one private balance held in the Solana Privacy Program: a mint, an amount and an owner, kept on chain only as a commitment. Plaza notes are owned by Plaza's ring authority, so only a Plaza spend can consume them, and each one opens to a single holder's keys. The holder's browser finds its notes by scanning the program's traffic with keys derived from one wallet signature; see Unlock your notes.

A spend consumes one note and creates up to two: the payment and the change. A note is spent once; its nullifier is published when it is, and SPP refuses the same nullifier twice.

Labels

Every Plaza deposit gets a label, a BN254 field element that commits to the deposit's public facts:

label
label = Poseidon(depositor[0..16], depositor[16..32], mint[0..16], mint[16..32], amount, slot, nonce)
depositorAddress
The wallet that signed the deposit, split into two 16-byte limbs.
mintAddress
The deposited mint, in two limbs. SOL is the system program address.
amountu64
Base units.
slotu64
The slot the deposit executes in.
nonceu64
The program's deposit counter: 0 for the first deposit, 1 for the next.

deposit computes the label when it executes, from the slot it lands in and the program's deposit counter, writes it into the note and emits it in the Deposited event, where the depositor's client reads it back. A label of zero is refused, because zero marks an empty leaf.

The SDK's depositLabel(depositor, mint, amount, slot, nonce) computes the same hash; see SDK.

The deposit tree

deposit appends each label to Plaza's deposit tree, an incremental Poseidon Merkle tree of depth 32 held in the DepositTree account. It holds 4,294,967,296 deposits; past that, deposit fails with TreeFull.

ASPs build their sets from the labels in this tree. The Deposited event carries every input of the label, so anyone can recompute it, and a ragequit proves its note against the same facts.

How a label travels

A note's label is hashed into its commitment together with Plaza's program, so a note cannot change its label without changing the commitment SPP holds. When a note is spent, the policy proof requires every output to carry the input's label. A note received through ten private transfers still carries the label of the deposit it started from, and is approved in exactly the sets that approved that deposit.

Label status

A label is approved in a set when it is a leaf under one of that set's roots, pending when the set hasn't decided, and rejected when the set has decided against it. The app shows each note's status in every set; POST /labels/status returns the same for up to 512 labels.