How a run works
One run is one Solana transaction. This page takes a swap of 100 USDC through jupiter.swap apart, from the notes it spends to what an explorer shows afterwards. The amounts are an example.
Your notes
A private balance is made of notes. A note is an amount of one asset inside Solana Privacy Rings, owned by two things together: Pook’s authority, and a one-time key that only you hold. Pook’s program signs for the first only against a valid proof. The proof shows you hold the second.
The hook
A hook is an account on chain that describes one instruction of a program that already exists: the program, the bytes of the instruction with slots marked in them, the list of accounts with slots marked in it, the mints in and out, and its author. A run fills the slots. Everything else was fixed when the hook was published, and a published hook never changes.
For jupiter.swap the route is a caller argument, filled from Jupiter’s own quote. Read its record.
Proof
Your browser builds a proof and hands it to a relayer. The relayer pays the network fee and submits the transaction, so your wallet signs nothing and appears nowhere. Pook verifies the proof first. It binds seven things to this one transaction:
- the hook
- the accounts and data
- the amount in
- the minimum out
- the owner of the output
- the relayer’s fee
- an expiry
A relayer cannot change any of them. A proof past its expiry is refused, and a relayer that never submits costs you nothing: the same proof can go to another relayer until it expires.
Spend
Pook calls the Solana Privacy Program. The notes you chose are nullified, the change comes back as a new note, and the amount in moves to the stage: token accounts owned by a Pook address that hold a run’s funds for the length of one transaction.
Call
Pook calls Jupiter exactly as the hook describes, signing as the stage. Jupiter sees a caller with 100 USDC and swaps it. Jupiter’s program was not changed for this.
The protocol is handed the stage accounts and no others, so the most a hook can touch is one run’s input.
Check
Pook measures what arrived in the stage’s out account. If it is less than the minimum out your proof fixed, the whole transaction fails and your notes are as they were.
Deposit
The run fee and the relayer’s fee come off what arrived, in SOL, because SOL is what the run produced. The rest is deposited into Rings as a new note for the owner your proof fixed.
What an explorer shows
- What you knowYou know who ran it, which notes paid for it and what you hold now.
- What the chain keepsThe hook, the amounts in and out, and the relayer that paid.
- What stays yoursWho ran it and what anyone holds inside Pook are encrypted. Your wallet shows only when you enter from it or leave to it.
- Who ran it
- you
- Notes spent
- 60 + 75 USDC
- Fee payer
- a relayer
- Hook
- jupiter.swap
- In
- 100 USDC
- Out
- 0.6034 SOL
- Your balance
- 35 USDC, 8.1 SOL
- Who ran it
- Notes spent
- Fee payer
- a relayer
- Hook
- jupiter.swap
- In
- 100 USDC
- Out
- 0.6034 SOL
- Your balance
Example amounts.
Why it fits in one transaction
- 4,096
- bytes in a Solana transaction
- 64
- addresses it can name
- 1,400,000
- compute units it can spend
The private spend takes about 140,000 compute units and verifying the proof about 95,000. The rest of the budget goes to the protocol being called.