The policy proof
The Groth16 proof every Plaza spend carries, what it shows, and what the program checks before calling SPP.
A Custom Ring decides which spends of its notes SPP will settle. Plaza decides with one zero-knowledge proof per spend: the note being spent carries a label that is a leaf under the chosen set's root, and the outputs carry the same label. The proof is Groth16 on BN254, made in the holder's browser and verified on chain with alt_bn128 syscalls (groth16-solana).
What the circuit proves
The Membership circuit, at depth 32, shows all of this without revealing the label, the note or the path:
- The label is non-zero, and hashing it up the given path of 32 siblings gives
root. - The spent note's commitment, rebuilt from its fields and the label, is the note the holder's nullifier secret opens, and
nullifierisPoseidon(commitment, blinding, nullifierSecret). This is the same nullifier SPP checks. - Each output that is present is a note commitment carrying the same label. An absent output is
0. exitLabelis0for a spend; it is the label itself only on the ragequit path.authorizationisPoseidon(nullifierSecret, intent), which ties the holder's secret to this spend's payout.
The full signal list is on Circuits.
Public signals
The proof has seven public signals, in this order:
| # | Signal | Checked against |
|---|---|---|
| 0 | authorization | Part of the verified statement |
| 1 | root | A root in the ASP's window |
| 2 | nullifier | The nullifier in the SPP transaction |
| 3 | outputs[0] | The first output commitment in the SPP transaction |
| 4 | outputs[1] | The second output commitment, or 0 |
| 5 | exitLabel | Must be 0 in transact |
| 6 | intent | The payout this spend makes |
The intent
The intent binds the proof to where the money goes, so nobody who sees a proof in flight, the relayer included, can redirect it:
intent = SHA-256("plaza/spend/v1" ‖ asp ‖ destination ‖ fee_recipient ‖ mint ‖ amount ‖ fee_bps), first byte set to 0amount is a little-endian u64 and fee_bps a little-endian u16. For SOL, mint is the system program address. For a private transfer, amount is 0. Zeroing the first byte keeps the hash below the BN254 field order.
What transact checks
In order, before any money moves:
- The SPP transaction is a one-input, two-output transfer in the shape Plaza expects, or the program refuses with
InvalidWire. - If the spend pays out and the destination is a registered venue, the venue accepts this ASP (
VenueRefused). rootis in the ASP's window (RootOutsideWindow).nullifierand both outputs match the SPP transaction,exitLabelis0, andintentmatches the accounts and the configured fee (InvalidBinding).- The Groth16 proof verifies against Plaza's verifying key (
InvalidProof). - Plaza calls SPP's transact with its ring authority as signer. SPP verifies its own proof and records the nullifier.
- For a withdrawal, Plaza's payout account received exactly
amount(InvalidSettlement), and Plaza pays it out to the destination and the fee recipient.
The ragequit path
ragequit verifies the same circuit with three differences: root must be the deposit tree's current root, or one of the roots its last 32 deposits replaced, instead of a set's, exitLabel must be the label the program rebuilds from the deposit's facts and the destination, and the spend has no outputs and pays no fee. See Ragequit.
Proof encoding
The proof travels as the PolicyProof argument of transact: a (64 bytes), b (128 bytes), c (64 bytes) and signals, seven 32-byte big-endian field elements. Through the API, the same bytes go base64-encoded as policyProofBase64 on POST /relay.