AtomicLimitOrderHook on Ethereum
Uniswap v4 Hook Contract 0x4a00c91f7f1dc905211a4b8e931607d72c2f1040 on Ethereum · Limit orders · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $55
- Pools using this hook
- 7
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 46
What it does
Lets traders place limit orders on Uniswap v4 pools and atomically combine a swap with order placement in one transaction.
How it works step by step
- Places limit orders at a chosen tick that fill when the pool price crosses that tick
- swapAndPlaceOrder executes a swap and places an order atomically to avoid front-running between two transactions
- cancelOrder returns unfilled liquidity and recovers previously accrued ERC-6909 claims
- withdraw lets users claim the output tokens from filled orders
- Tracks last tick per pool in afterInitialize and afterSwap to determine which orders to fill
- Swap behaviour
- afterSwap checks for tick crossings and fills limit orders whose range has been crossed. swapAndPlaceOrder performs its own swap via a self-unlock with a minimum-output check.
- Liquidity behaviour
- Liquidity is not added by the hook to the pool itself; users place limit orders via placeOrder and swapAndPlaceOrder which record liquidity against the order ID. Orders are cancellable with cancelOrder and withdrawable with withdraw after fill.
- Fee behaviour
- Uses the pool's static fee; no fee logic in the hook.
- Owner & admin controls
- No admin controls found. The hook has no owner, pause or upgrade functions; parameters are fixed at deployment (only the pool manager is set via constructor).
Enabled Uniswap v4 callbacks
afterInitialize, afterSwap
afterInitialize records the initial tick lower for each new pool. afterSwap detects tick crossings and fills eligible limit orders when the price moves through them.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: No privileged role was found in the verified source, so no single key can alter user orders or pool behaviour through the hook.
Risk to user funds: The hook holds ERC-6909 claims and order liquidity on behalf of users and moves tokens on swap settlement and recovery; funds are returned to users via cancel, withdraw and recover flows, and no owner withdrawal path was found.
Security findings
- [medium] Hard-coded storage slot writes: The hook writes _tickLowerLasts and checkpoint storage directly via assembly at hard-coded slots inherited from LimitOrderHook; any storage layout change in the base contract would silently corrupt order accounting.
- [low] Caller-chosen order tick after swap: swapAndPlaceOrder performs an unprotected swap then places an order; the order placement depends on the post-swap tick being in range, which is validated but relies on the caller-supplied tickLower.
- [info] Checkpoint clamping override: cancelOrder and withdraw overrides rely on base-contract accounting; clamping checkpoints in withdraw means the stored checkpoint can be silently adjusted, which could hide accounting mismatches.
Contract details
- Verified source
- Yes (AtomicLimitOrderHook)
- Compiler
- solc 0.8.33+commit.64118f21
- Bytecode size
- 21,523 bytes
- Upgradeable proxy
- No
- Detected patterns
- limit-orders
Pools using AtomicLimitOrderHook
- STACK / USDT (2.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- SRC / USDC (0.90% fee) — 24h volume $0, TVL $0, 0 swaps today
- SRC / USDC (3.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / SRC (5.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- msUSD / USDC (0.25% fee) — 24h volume $0, TVL $0, 0 swaps today
- SRC / USDC (0.0075% fee) — 24h volume $0, TVL $0, 0 swaps today
- V4STR / USDC (10.00% fee) — 24h volume $0, TVL $0, 0 swaps today