Skip to content

What the withdrawal costs ​

Alice’s deposit paid no protocol fee. The fee is on the way out, in the same asset as the note. It has three parts.

text
protocol fee = sum over fee wallets of floor(amount × walletBps / 10,000)
relayer rate = floor(amount × relayerBps / 10,000)
network fee  = the SOL the relayer spends on this withdrawal, charged in the note's asset
fee          = protocol fee + relayer rate + network fee
recipient gets amount − fee

The protocol fee. walletBps is the feeSplit of each platform wallet in network state. Today there is one wallet, the Team Treasury 4VBPr3hbtQeE2pLSa4TdLSDMWjXJN7sAuEGmDgjQHrnQ, at 15 basis points: 0.15%. Each wallet’s share is floored on its own. The program pays those shares first. A proof whose fee cannot cover them is refused.

The relayer rate. relayerBps comes from the relayer Alice’s client selected. Each relayer publishes its rate. The live devnet relayer publishes 0.1%. That is also today’s limit: a relayer may keep at most 10 basis points of the amount on top of its costs. The limit is a setting in the network config. The configuration authority can change it, and after the handover the DAO votes on it, between 0.05% and 0.5%; the program never accepts more than 0.5%. A relayer can publish a lower rate. It cannot get a withdrawal through at a higher one.

The network fee. The relayer signs the withdrawal and pays for it. It pays the signature fee, and it pays rent for the two small nullifier accounts that mark the note as spent. That rent never comes back. When Alice sends a token to an address that does not hold that token yet, the relayer also pays the rent of the recipient’s token account. The network fee repays exactly those costs. For a SOL withdrawal it is 1,386,760 lamports, about 0.0014 SOL: two nullifier accounts at 690,880 lamports each, plus the 5,000 lamport signature fee. It does not grow with the amount, so it weighs more on a small withdrawal.

For a token, the relayer converts the network fee at a current price: USDC at the SOL price signed into the Wormhole Executor’s quote, and VEILIX at the Raydium pool price. It adds a 10% margin to the quote, because the price can move before the job runs.

The cap the program enforces ​

The program checks the relayer’s share on every withdrawal, swap, and bridge:

text
relayer share ≤ floor(amount × 10 / 10,000)
              + (2 × nullifier rent + 10,000 lamports + lamports the relayer paid inside the instruction),
                converted at the tree's price

The 10,000 lamports allow for two signatures. For SOL the conversion is one to one. For a token, each tree stores a price cap: the most token base units per SOL at which a relayer may charge its SOL costs. On devnet the caps were set at three times the market price on 11 November 2026: 251.88 USDC per SOL, and 32,324.6 VEILIX per SOL. A tree with no cap lets a relayer keep only its rate. A relayer that asks for more than the cap fails with RelayerFeeTooHigh, and the note is not spent.

If the fee is greater than or equal to the withdrawn amount, the withdrawal is refused. Very small amounts cannot clear.

The public withdrawal leaves the treasury. Address B is credited amount − fee. Each configured platform wallet is credited its share. The relayer is credited the rest of the fee. A change note is not a fee. It stays in the tree until it is spent.

A partial withdrawal uses the formula on the amount being withdrawn, not on the whole note. Withdrawing 2 SOL from a 10 SOL note fees the 2 SOL. The 8 SOL change note is uncharged until Alice spends it.

The quote Alice sees before she signs ​

Before any wallet window opens, the app asks the selected relayer for a quote: the protocol fee, the relayer rate, the network fee, the total, and what address B will receive. The client checks the rate against what the relayer publishes, and for SOL it checks the network fee against the program’s cap, before it shows the quote. The program checks every fee against the cap again.

The fee Alice sees is the most she pays. The fee is bound into the proof, so nobody can raise it after she confirms. A token price can move while the review screen is open, so the app asks for a fresh quote every 30 seconds. If the relayer’s cost has risen above the fee on screen by the time she confirms, the client stops before proving, or the relayer refuses the job before it sends anything. Nothing is spent. The app shows the new fee and waits for her to confirm again.

The charge on one devnet withdrawal ​

One devnet SOL withdrawal shows today’s rates. It was included on 11 November 2026. The signature is 3wdSijnZvXAUsnRLHNy1rwRF48QQbJCrveXtKkmFrR3wrLxntwnqd7J6PWA6Yksg8oFzeuLHC2ewPMPebZ5RhCnF. The treasury paid out 50,000,000 lamports, which is 0.05 SOL.

ShareRuleLamportsSOL
Protocol, to the Team Treasury15 basis points (0.15%)75,0000.000075
Relayer rate10 basis points (0.10%)50,0000.00005
Network fee, to the relayerTwo nullifier rents and the signature1,386,7600.00138676
RecipientThe remainder48,488,2400.04848824

floor(50,000,000 × 15 / 10,000) is 75,000. floor(50,000,000 × 10 / 10,000) is 50,000. The relayer’s share was 1,436,760 lamports. Out of that it paid 1,381,760 lamports of rent for the two nullifier accounts and the 5,000 lamport transaction fee, so it kept 50,000 lamports: its 0.1%. The recipient was D6i7rdNjGLuZATKjAQz3qSQMaVC3HztVe9F6EcCq5poB.

Alice paid 1,511,760 lamports, about 3% of 0.05 SOL. Almost all of it was the network fee. On a larger amount the same fixed cost matters much less:

WithdrawalProtocol 0.15%Relayer 0.10%Network feeTotal feeShare of the amount
0.05 SOL0.0000750.000050.001386760.001511763.02%
0.5 SOL0.000750.00050.001386760.002636760.53%
1 SOL0.00150.0010.001386760.003886760.39%
10 SOL0.0150.010.001386760.026386760.26%
100 SOL0.150.10.001386760.251386760.25%

The first row is the transaction above. The other rows apply the same rules to other amounts, at today’s rent.

Whose money is whose ​

Three cash flows stay separate. The protocol fee is protocol revenue. The relayer rate is the relayer’s income. The network fee is not income for anyone: it repays SOL the relayer already spent. Do not add the relayer columns to protocol revenue.

The configuration authority can change the platform wallets and their basis points for a later withdrawal, never above 1% in total. It can also change the relayer cap and the private payment margin, never above the program’s ceilings of 0.5% and 0.01 SOL. Solana sets the rent. Check the quote and the transaction before you rely on a number.

A private swap and a private bridge spend a note the same way, so they pay the same protocol fee and the same capped relayer rate on the amount spent. A swap pays a network fee of the same kind. A bridge pays the cost of delivery to the other chain instead. Each has its own page later in the book.

The next page is the relayer who submits Alice’s withdrawal.