Limit orders hook on Ethereum
Uniswap v4 Hook Contract 0x89964d94bc548a8faf4615f87434abc01d9d9040 on Ethereum · Limit orders
- Volume (24h)
- $3.92K
- Value locked (TVL)
- $26.74K
- All-time volume
- $668.30K
- Pools using this hook
- 5
- Swaps (24h)
- 2 (2 traders)
- Total swaps
- 691
What it does
A limit order hook that lets users place single-sided orders at a chosen tick which are filled when a swap moves the pool price across that tick.
How it works step by step
- Records the initial tick of the pool in afterInitialize
- Places limit orders as liquidity at a user-chosen tick via placeOrder and swapAndPlaceOrder
- Tracks each order's liquidity per owner in nested storage mappings
- Fills crossed orders in afterSwap when the pool tick moves past them
- Lets owners cancel orders or withdraw filled proceeds
- Swap behaviour
- afterSwap checks the tick movement after each swap and fills any limit orders crossed by the new price.
- Liquidity behaviour
- Limit orders are placed as single-sided liquidity positions by the hook through the pool manager; orders can be cancelled or withdrawn by the owner, and afterInitialize records the initial tick. beforeAddLiquidity and beforeRemoveLiquidity are present as selectors but their permissions are not enabled.
- Fee behaviour
- Uses the pool's static fee.
- Owner & admin controls
- No admin controls found.
Enabled Uniswap v4 callbacks
afterInitialize, afterSwap
afterInitialize: records the pool's starting tick for later order placement. afterSwap: runs after each swap to check whether the tick moved past stored limit order ticks and fills orders accordingly.
Security & trust assessment
Risk level: medium (decoded bytecode, medium confidence).
Who controls it: No owner or privileged role was identified in the decoded functions, so no single key was found that could change parameters or pause the hook.
Risk to user funds: The hook holds limit order liquidity and the per-owner balances recorded in its storage mapping, and withdraw and cancelOrder move those funds to recipients chosen by the caller, so bugs in ownership checks could expose funds.
Security findings
- [info] Swap-time order execution: afterSwap is enabled and can fill orders during swaps, so swap execution depends on the hook's order-filling logic completing correctly.
- [medium] User funds held in hook storage: Order state is stored in mappings keyed by order id and by owner, and withdraw and cancelOrder release funds from those mappings based on caller-supplied parameters.
- [medium] Unverified source: No verified source is available, so the correctness of tick comparison and fill accounting cannot be confirmed from the bytecode alone.
Contract details
- Verified source
- No
- Bytecode size
- 19,512 bytes
- Upgradeable proxy
- No
Pools using Limit orders hook
- stkAAVE / AAVE (0.30% fee) — 24h volume $3.92K, TVL $25.68K, 2 swaps today
- GHO / USDC (0.001% fee) — 24h volume $0, TVL $2.84, 0 swaps today
- GHO / AAVE (0.001% fee) — 24h volume $0, TVL $500, 0 swaps today
- BOLD / USDC (0.001% fee) — 24h volume $0, TVL $201, 0 swaps today
- GHO / SKY (0.001% fee) — 24h volume $0, TVL $350, 0 swaps today