Swapping and quoting
Read how to route a swap through the Universal Router or the Hookr router, the price limit, and getting a matching quote.
On this page
Introduction
A Hookr pool on Hookr's shared hook is an ordinary Uniswap v4 pool whose PoolKey.hooks is HookrRoot. Any v4 caller can trade it. There are two ways in, the Universal Router and Hookr's own HookrRouter, and HookrQuoter quotes either one. Their addresses, and every other address, render below from the release book the app ships; none is typed into this page.
Hookr’s core and own-hook contracts
HookrRoot is the hook every Hookr pool names, and each pool records the Rules it opens with. The core, HookrRules, carries every Hook Block in one Rules contract, with six parts pinned by code hash and a key for each block HookrRoot admits.
HookrOwnedRootFactoryV2 deploys a hook of your own with its own lane, and the two swap modules are admitted under the combined core, HookrRules 0x8AD0…e52e. Each is verified on chain; the table below lists these contracts.
Hookr’s contracts
The table lists Hookr’s 34 core contracts, rendered from the release book the app ships, source commit 412960b37a631ce145d49fb4a1887f04a4d1fa74: HookrRoot, the hook every Hookr pool names, first, then the contracts a swap passes through, then the rest in the order they were deployed.
Each one’s source is verified on RobinScan, on Sourcify as an exact match and on Blockscout as a full match. The arb recapture table below repeats HookrLane and adds What The Hook’s executor. None of the contracts they add is in the release book.
Arb recapture
The registry opened the lane on HookrRoot on 2026-10-07. The executor is What The Hook’s contract, not Hookr’s.
| Contract | Address |
|---|---|
| HookrLane, the arb recapture lane on HookrRoot | 0x9A8a1006469BA196f8FEfc017a53505C83A060BB |
| What The Hook's arb recapture executor, 25% of each arb recapture's profit | 0x4B4c16681401454140a9dBca55e5c186BBE8D728 |
Through the Universal Router
Nothing special is required. Build a V4_SWAP command against the pool's PoolKey and send empty hookData.
Commands.V4_SWAP
Actions.SWAP_EXACT_IN_SINGLE (key, zeroForOne, amountIn, amountOutMinimum, hookData = "")
Actions.SETTLE_ALL (inputCurrency, amountIn)
Actions.TAKE_ALL (outputCurrency, amountOutMinimum)An ERC-20 input is pulled through Permit2, so the payer approves the token to Permit2 and then approves the Universal Router as a Permit2 spender with an amount and an expiry. A plain ERC-20 approval to the Universal Router is not read, and the swap fails to settle.
Every Hook Block the pool froze at launch applies, whichever way the swap arrives.
Through HookrRouter
HookrRouter carries the payer to the root, settles exact amounts and returns unused ETH. Its swap(Swap params, address engagement, uint256[] campaigns) takes the Swap, and address(0) and an empty array for no engagement or campaign:
struct Swap {
PoolKey key;
bool zeroForOne;
int128 amountSpecified; // negative for exact input
uint128 amountBound; // minimum out for exact input, maximum in for exact output
uint160 sqrtPriceLimitX96;
address recipient;
uint256 deadline;
}For a native input, send msg.value equal to the input. For an ERC-20 input, approve the router directly: it pulls with transferFrom and does not read Permit2. swapAllowance in hookr-sdk returns the approval, and buildSwap builds the call. The builders refuse a swap without an amount bound, a price bound and a deadline within the next hour, and refuse a pool whose hooks is not a root the release book names: Hookr's hook, or a hook of your own added to it.
Quoting
HookrQuoter answers in the shape of Uniswap's V4Quoter, so an aggregator that already quotes v4 pools quotes a Hookr pool the same way:
| Function | Returns |
|---|---|
quoteExactInputSingle(Quote | amountOut, gasEstimate |
quote | amountIn, gasEstimate |
QuoteExactSingleParams is V4Quoter's own struct: the pool key, the direction, the exact amount and hookData, which must be empty. Use these for a swap routed through the Universal Router.
For a swap routed through HookrRouter, quote the router's own call: quote(Swap, payer) returns the receipt the swap will settle, and quoteDetailed(Swap, payer) adds the payer's arb recapture claim and the simulation's gas. buildQuote builds that call from the same Swap that buildSwap sends.
Each quote runs the real hook callbacks and then reverts with its result, so none of them is a view function: call it with eth_call, or with a static call from another contract. A revert that is not the quote's result bubbles up unchanged, so a swap the pool would refuse reaches you as the same error the swap would throw. A quote simulates the pool's accounting; it does not prove approvals, balances or gas.
The Lane Gas Floor
On a pool with arb recapture on, a swap must carry the lane's gas floor plus its own gas: laneGasFloor in the SDK, or gasFloor from laneOf(id) on the root. The floor is 6,802,619 at the lane's 3,000,000 gas cap. eth_estimateGas includes the floor, about 7.5 million for a buy now. Send the estimate plus a sixth, never less than the estimate. A fixed limit should be at least 8.8 million. Unused gas is refunded.
What a Trader Pays
A pool's fee is its base LP fee, plus every Hook Block charge it froze at launch: Hookr dynamic fees up to their ceiling, Anti-Snipe's tax during its window, Auto Burn and LP Rewards on a buy, and on a new pool Swap Cut, Exit Clock (a sell only), Storm Fee and Sandwich Guard, up to 20% of the swap together. A creator royalty comes out of LP Rewards, so a trader pays the same with or without it. Quote before every swap during a new token's Anti-Snipe window: its limits are per block and shared by every trader.
Next Steps
Read Providing liquidity for the LP side of the same pool, and SDK, router and quoter for the builders.