Concepts
Fees and POOK
A run pays two fees, both taken from what the run returns and both in the asset it returns: the run fee and the relayer’s fee. The run fee is split between the author of the hook and the protocol, and the protocol's part buys POOK and burns it.
What comes off a run
| Fee | What it is | Who receives it |
|---|---|---|
| Run fee | A share of what a run returns, taken in the out asset. | Split in two, below. |
| Author’s share | The part of each run fee that goes to the author of the hook the run used. | The hook's author. |
| Protocol share | The rest of each run fee. It buys POOK through Jupiter and burns it. | The fee recipient set in the program's config. |
| Relayer’s fee | What the relayer names for submitting a run, in the out asset, fixed by the proof. | The relayer that submitted the run. |
A run that returns no asset, such as a repayment into a seat, pays neither fee. Entering pays no fee to Pook: your wallet pays the network fee. Leaving pays the relayer's fee and no run fee. Publishing a hook costs the rent of its account.
The fees are taken in the asset out because that is the asset you are holding at that moment. Pook works in any mint Solana Privacy Rings supports and fixes none.
How the amounts are worked out
Two rates live in the program's Config account, both in basis points (1 basis point is 0.01%): run_fee_bps and author_share_bps. The API returns the current values as runFeeBps and authorShareBps from GET /v1/config.
With out as the amount the protocol returned to the stage:
run_fee = floor(out × run_fee_bps / 10,000)
protocol_fee = floor(run_fee × (10,000 − author_share_bps) / 10,000)
author_fee = run_fee − protocol_fee
you receive = out − run_fee − relayer_feeThe protocol's part rounds down, so an odd unit goes to the author.
The run fee is a share of the result, so it scales with the run. The relayer's fee is a fixed amount the relayer quotes for the run. If the two together are as large as the result, the run fails with OutputBelowFees and nothing is spent.
The quote for a run lists each amount before you prove, under fees: runFeeAmount, its two parts authorShareAmount and protocolShareAmount, and relayerFeeAmount. netOut is what you receive at the expected price, and minimumNetOut the least you can receive. The run's minimum out is checked before the fees come off. A hook's run screen shows the same figures above the Run button.
The author's share
Whoever publishes a hook is its author, and every run through that hook pays them. The share is paid inside the run, in the same instruction that takes the fee.
It collects in an account the program keeps for each pair of author and asset. One author's hooks all pay into the same account for a given asset. SOL sits in the account itself, and a token sits in the account's token account.
The author claims at any time with claim_author_fees, one asset per claim. Only the author can sign it, and it pays out everything collected for that asset. Publish a hook from an IDL shows the claim in the app and in the SDK.
The protocol share
The protocol's part of every run fee is paid inside the run to the fee recipient, in the asset out. A service called the crank then swaps what has collected to POOK through Jupiter and burns the POOK the swap delivered. It repeats on an interval, whatever assets the runs returned.
POOK
Pook's token is POOK. Its supply is 1,000,000,000. All of the supply is in the public launch. The developer allocation is bought in that launch on the same terms as every buyer.