Limit orders hook on Ethereum
Uniswap v4 Hook Contract 0x9402f4c15ab320d35af6a5cb203a1c01e7645040 on Ethereum · Limit orders
- Volume (24h)
- $0
- Value locked (TVL)
- $217
- All-time volume
- $8.26
- Pools using this hook
- 2
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 8
What it does
A limit-order hook that lets users place single-sided orders at a target tick, which are filled automatically when swaps move the price across that tick.
How it works step by step
- Stores the last observed tick per pool in afterInitialize and a mapping keyed by pool
- Accepts placeOrder calls that deposit liquidity at a specific tick for one direction (zeroForOne flag)
- Assigns each order an orderId derived from pool key, tick, and direction via getOrderId
- Fills orders in afterSwap when the price crosses the order tick
- Allows owners to cancelOrder or withdraw filled proceeds, tracked per orderId and owner
- Uses unlockCallback and the pool manager's ERC-6909 claims to settle balances
- Swap behaviour
- afterSwap checks tick movement against stored order ticks and fills orders that the swap has crossed.
- Liquidity behaviour
- Limit orders are placed by depositing a single-sided position via the pool manager at a chosen tick; orders are tracked per orderId in storage and can be withdrawn or cancelled by the owner of the order. beforeAddLiquidity and beforeRemoveLiquidity are dispatched but their handling is not confirmed from decoded code alone.
- Fee behaviour
- Uses the pool's static fee.
- Owner & admin controls
- No admin controls found.
Enabled Uniswap v4 callbacks
afterInitialize, afterSwap
afterInitialize records the initial tick for the pool; afterSwap inspects tick movement after swaps to determine which limit orders have been crossed and can be filled; beforeAddLiquidity and beforeRemoveLiquidity are implemented as view stubs in the dispatch table.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: No privileged owner role is evident in the decoded functions; no owner, pause or upgrade selectors were found. Centralization risk appears low, though this could not be verified without source.
Risk to user funds: The hook receives order deposits and holds them as ERC-6909 claims inside the pool manager, and moves currency when orders are filled, cancelled or withdrawn. Funds are exposed to any bug in order accounting; no admin path to seize funds was identified.
Security findings
- [medium] Hook custodies and moves user tokens: The hook uses unlockCallback and self-unlock with erc6909 claims and moves currency, so it holds and moves token balances on behalf of users through the pool manager during order placement, cancellation and fills.
- [medium] Unverified order fill logic: Without verified source, the correctness of tick-crossing logic in afterSwap and order fill accounting cannot be confirmed from bytecode alone; errors could misallocate order proceeds.
- [info] Source not verified: No source is published, so users cannot audit the contract directly.
Contract details
- Verified source
- No
- Bytecode size
- 15,959 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, moves-currency, self-unlock
Pools using Limit orders hook
- DMT / WETH (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- DMT / WETH (0.30% fee) — 24h volume $0, TVL $217, 0 swaps today