Learn
What are Hook Blocks?
Rules a pool runs on every swap, chosen by its creator and frozen when the pool opens: how reel does on Solana what Uniswap v4 hooks do on Ethereum.
Where the idea comes from
On Uniswap v4, a pool can name a hook: a separate contract the pool calls at fixed points, before and after a swap or a liquidity change. hookr built a set of reusable pieces, Hook Blocks, and let a creator compose them into one hook per pool instead of writing a contract from scratch.
reel rebuilds that on Solana. The blocks keep their names and jobs: Anti-Snipe, Dynamic fees, Auto Burn, LP Rewards, King of the Pool and the rest. What changes is where they run.
Why the blocks live inside the pool program
Solana has no per-pool callback contract like a v4 hook. A program can call itself, but it cannot be re-entered through another program: if A calls B and B calls A, the transaction fails. A separate "hook program" called by the pool, and calling the pool back, isn't possible.
So reel puts the whole block pipeline inside its own pool program. Each pool stores a PoolParams record: a bitmask of the blocks it runs plus every block's settings. The record is written once, at PoolInit, and nobody can change it afterwards, the admin included.
What a swap goes through
Every swap runs the same steps, and each block takes part only where its bit is set:
- Advance state. Release any streamed LP income, step the dynamic-fee reference, roll the Storm sample, lapse an expired managed fee.
- Gates. Refuse the swap if buys are paused, sells are locked, an exact-out buy comes during the launch guard, a non-feeder buys a zap target, an agent check fails, or a required price feed is stale.
- Charges. Each fee is computed on the swap's gross amount and rounded up. The protocol's share of block fees is split off first.
- Recapture. If the pool runs it and the swap closes a gap with a reference price, part of that profit is charged.
- Settle. The curve prices what is left; Auto Burn burns its share of the tokens bought.
- Book-keeping and transfers. Wallet Cap tallies, the King of the Pool podium, stats and the event, then the token moves, then checks that every vault still covers what the pool owes.
Because the order is fixed, a pool's total cost is predictable from its frozen settings.
Why the token's own hook can't tax
Token-2022 lets a mint name a transfer hook: a program that runs on every transfer of the token. It sounds like the place for taxes, but it can't do that. The hook runs after the balances have already changed, sees the accounts read-only, can't call back into the token program and can't change the amount.
So reel uses the hook only to allow or refuse a transfer. Tokens launched on reel point their hook at reel-hook, a small separate program that holds no funds. It can:
- keep a canonical-venue token moving only between wallets and reel's vaults;
- refuse transfers to other venues during a sell lock;
- cap any wallet's balance while the launch guard lasts (Wallet Cap);
- require every receiver to be a registered agent (agent-only tokens);
- record how long each holder has held, which Exit Clock reads.
Every fee and tax runs in the pool, where the money is.
Frozen, bounded and readable
Each block's settings have bounds the program checks at PoolInit, and some combinations are refused. The program also caps the totals: LP fees on one swap can't exceed 60%, quote-side takes 35% and sell-side charges 20%, and a pool carries at most one advisory block.
All of it is public. Anyone can read a pool's PoolParams from chain and know exactly what a swap there will pay before sending one.
What runs today
The catalog lists 48 blocks: 21 in the program, 6 launch option, 4 in reel-vaults, 8 partial, 7 periphery, coming, 2 not on reel. "In the program" means a per-pool block frozen at PoolInit. A launch option is set once for the whole launch. Partial blocks run part of what hookr's do, and each says which part. Blocks marked "in reel-vaults" sit beside the pool in reel's periphery program, reel-vaults, on mainnet; periphery blocks still marked coming wait for a module that isn't in its deployed build yet. A few hookr blocks have no Solana equivalent.
This deployment is configured with the reel program, verified end to end on Solana mainnet. Each block's page in the catalog shows its status and the reason.
Costs and limits
- Each block adds compute and sometimes accounts to a swap. A token with reel-hook needs seven extra accounts on every transfer, which the SDK adds for you.
- Exact-out swaps are priced with every fee at its ceiling and can come in a few units over the amount asked for. During the launch guard they are refused.
- A swap that closes a recapture gap is best sent as exact-in.
- Because nothing can be changed later, a mistake in a pool's settings stays. Use the builder to check a board before launching.
Related
- Hook Blocks catalog: every block, its status and its settings
- Builder: place blocks and see what a swap would pay
- Core blocks: the blocks in the program and their ranges
- Architecture: reel, reel-hook and reel-vaults
- reel pools