LimitOrderHook on Robinhood Chain

Uniswap v4 Hook Contract 0xf4f48bf7c0333ab56d418bdd5118d48674d6d040 on Robinhood Chain · Limit orders · Verified contract

Volume (24h)
$1.39K
Value locked (TVL)
$2.68K
All-time volume
$29.99K
Pools using this hook
2
Swaps (24h)
296 (108 traders)
Total swaps
4,435

What it does

Adds limit-order functionality to a Uniswap v4 pool, letting users place, cancel and withdraw orders that fill as the price crosses a chosen tick.

How it works step by step

  • Records the pool's starting tick in afterInitialize
  • Lets users place a limit order at a chosen tick and direction via placeOrder
  • Assigns each order an id derived from the pool key, tick and direction (getOrderId)
  • Tracks per-order liquidity in a nested mapping keyed by order id and owner
  • Checks price movement in afterSwap and updates or fills orders that the price crossed
  • Lets owners cancel orders via cancelOrder and withdraw filled proceeds via withdraw
Swap behaviour
afterSwap is enabled and reads the last recorded tick and order mappings to detect crossings and fill or update orders; beforeSwap is dispatched but its permission is not enabled.
Liquidity behaviour
beforeAddLiquidity and beforeRemoveLiquidity are present as view selectors; afterAddLiquidity and afterRemoveLiquidity are also dispatched. Order-related storage is written on placeOrder, cancelOrder and withdraw, which suggests limit orders are represented as single-sided liquidity positions tracked per order id.
Fee behaviour
Uses the pool's static fee.
Owner & admin controls
No admin controls found. The treasury() getter exists but no owner or setter selectors were decoded.

Enabled Uniswap v4 callbacks

afterInitialize, afterSwap

afterInitialize: records the initial tick for the pool (writes tick-last storage). afterSwap: reads the stored tick, checks whether the price crossed order ticks and updates order state accordingly.

Security & trust assessment

Risk level: medium (decoded bytecode, medium confidence).

Who controls it: No privileged owner was identified from the decoded selectors. Users depend only on the contract logic and the pool manager's behaviour.

Risk to user funds: The hook holds liquidity for open limit orders in the form of pool positions and tracks each order's amount in storage. Funds can be retrieved through withdraw and cancelOrder. No pause or owner-withdraw path was identified.

Security findings

  • [info] Hook custodies order liquidity: Order liquidity and order state are stored in the hook and settled through the pool manager, so funds sit with the hook while orders are open.
  • [medium] Accounting correctness not verifiable from bytecode: withdraw and cancelOrder transfer order-owned balances; correctness depends on the order-id accounting in mappings shared with placeOrder, which cannot be fully verified without source.
  • [low] Unlock callback reentrancy surface: The hook implements an unlockCallback and interacts with the pool manager to move tokens, a common source of settlement bugs if callback guards are missing.

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