LimitOrderHook on Arbitrum
Uniswap v4 Hook Contract 0x9efb54c35dd77700e72ccef88458cd6dad8dd040 on Arbitrum · Limit orders · Verified contract
- Volume (24h)
- $427
- Value locked (TVL)
- $1.17K
- All-time volume
- $6.66K
- Pools using this hook
- 1
- Swaps (24h)
- 67 (29 traders)
- Total swaps
- 1,024
What it does
Traders swapping through a pool with this hook pay the pool's normal fee and have their swap fill any limit orders it crosses, while order placers receive converted principal but no LP fees, which go to the protocol treasury.
This read was written for the hook 0x5e17…9040 on Base and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.
How it works step by step
- Lets users place one-tick-range out-of-range liquidity positions that act as limit orders via placeOrder, which unlocks the PoolManager and adds liquidity out of range.
- Fills an order in afterSwap once the pool tick has fully crossed its range, removing the order liquidity and separating realized LP fees from converted principal.
- Records converted principal proceeds as ERC-6909 claims held by the hook, and lets each order placer redeem a proportional share via withdraw.
- Lets an order placer cancel before fill via cancelOrder, returning their principal directly to the recipient.
- Routes all realized LP fees to an immutable protocol treasury as ERC-6909 claims for placement, cancellation and fill operations.
- Rejects native currency pools at initialization in afterInitialize and validates that PoolKey references this hook.
- Swap behaviour
- afterSwap computes the ticks crossed by the swap and fills any eligible limit orders in those ticks; the swapper's own swap amounts are not altered by the hook (no return deltas enabled).
- Liquidity behaviour
- Liquidity is added through placeOrder (out-of-range one-tick positions) and removed through cancelOrder (before fill) or automatically on fill; withdraw redeems converted principal claims after fill. No beforeAddLiquidity or beforeRemoveLiquidity callbacks are enabled, so direct LP operations by others are not gated by the hook.
- Fee behaviour
- The hook does not set or charge a swap fee; it uses the pool's fee. Realized LP fees earned by the hook-owned positions are not distributed to order placers but are minted to the immutable treasury as ERC-6909 claims.
- Owner & admin controls
- No owner, pause, upgrade or parameter-setting functions were found. The treasury address is immutable and set in the constructor.
Enabled Uniswap v4 callbacks
afterInitialize, afterSwap
afterInitialize: records the initial lower tick per pool and rejects pools whose currency0 is native. afterSwap: detects crossed ticks and fills eligible limit orders.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: No privileged role exists in the verified source; the treasury cannot alter hook behaviour, only receives fee claims, and its redemption is outside the hook.
Risk to user funds: The hook holds converted principal as ERC-6909 claims on behalf of order placers and can move it only through withdraw; it can also take user principal to the recipient on cancel. Fee routing uses claims and cannot block cancellation.
Security findings
- [medium] Fills execute inside afterSwap: Order fills call poolManager.modifyLiquidity and mint claims within afterSwap, so any revert in fill logic (e.g. UnexpectedFillDelta) would block the triggering swap; the code guards this with explicit delta checks.
- [low] Immutable treasury receives all LP fees: ProtocolFeesRouted sends all realized fees on hook-owned positions to the treasury as ERC-6909 claims; placers do not receive fees, which is disclosed in the source comments.
- [low] Principal rounding and token assumptions: Withdrawal amounts use FullMath.mulDiv with rounding down; the source explicitly states fee-on-transfer, rebasing and blacklistable tokens are unsupported and cannot be enforced on-chain.
- [info] Verified source matches stated design: The verified source is a fork of OpenZeppelin uniswap-hooks LimitOrderHook with documented modifications for ERC-6909 fee routing and remaining-total accounting.
Contract details
- Verified source
- Yes (LimitOrderHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 18,486 bytes
- Upgradeable proxy
- No
- Detected patterns
- limit-orders
Pools using LimitOrderHook
- WETH / USDC (0.05% fee) — 24h volume $427, TVL $1.17K, 67 swaps today