Limit orders hook on Robinhood Chain

Uniswap v4 Hook Contract 0x1cb37aeb18e9e92d8a1308218e43ffe1568d0040 on Robinhood Chain · Limit orders

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$4.20K
Pools using this hook
4
Swaps (24h)
0 (0 traders)
Total swaps
82

What it does

A single-sided limit order hook that lets LPs place resting orders at price buckets which fill as swaps move the pool price through them, with a protocol fee taken on fills.

How it works step by step

  • Stores user limit orders as price buckets keyed by pool and tick range
  • Uses afterSwap to detect price movement and fill crossed orders
  • Lets owners realize, claim or claimBoth proceeds from filled orders
  • Takes a protocol fee on fills tracked per token in protocolAccrued
  • Lets authorized withdrawal of accrued commission via withdrawCommission
  • Exposes market, order and bucket views (getOrder, listOrders, getBucket, lastPrice)
Swap behaviour
afterSwap checks the post-swap price and settles any limit orders crossed by the move, moving tokens between the hook, the pool and order owners.
Liquidity behaviour
Functions such as realize, claim, claimBoth, c25d6637 and 82f49eb3 manage per-order bucket state and order records (orders, nextOrder, getOrder, listOrders, orderCount), indicating users place single-sided limit orders as liquidity that is later filled or claimed.
Fee behaviour
Fee policy is exposed via feePolicy(), getPoolConfig and orderFeeBps selectors; the hook appears to take a protocol fee on order settlement and accrue it per token (protocolAccrued, withdrawCommission), with MAX_FEE_BPS as a cap. Exact fee math is not determinable from bytecode alone.
Owner & admin controls
Storage slot 0 and 1 hold addresses/parameters written by owner-style setters (0x56337013, 0x3e993775, 0xf4944098, 0x82f49eb3, 0xb66f0998, 0xc25d6637 write to slots 0,1,7,10,11,12); a registrar and manager and treasury getter exist, suggesting privileged roles that can configure markets and fee policy. Exact owner gating cannot be confirmed without source.

Enabled Uniswap v4 callbacks

afterSwap

afterSwap is the only enabled callback; it is used to check price movement after each swap and trigger fills of resting limit orders at crossed price buckets (inferred from the afterSwap selector signature and the bucket/lastPrice storage).

Security & trust assessment

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

Who controls it: Privileged roles (registrar, manager, treasury) appear to control market configuration and fee policy; a malicious or compromised key could change fee settings or redirect protocol fee withdrawals.

Risk to user funds: The hook holds order proceeds and accrued protocol/commission balances and transfers tokens during swap-triggered settlement and claims, so user limit-order funds are in the hook's custody until filled or claimed.

Security findings

  • [medium] Hook moves pool currency in afterSwap: The hook uses take and transferFrom and moves currency during afterSwap settlement, so it actively holds and transfers pool tokens rather than only reading state.
  • [medium] Accrued balances withdrawable through hook: Commission accrued per address is withdrawable via withdrawCommission; withdrawal and claim paths hold order proceeds, so a logic bug could strand or misallocate funds.
  • [info] Self-unlock pattern: Bytecode contains unlockCallback and unlock selectors, meaning the hook re-enters the PoolManager unlock flow; this increases the surface for reentrancy-style ordering bugs if callbacks are not guarded.
  • [info] Unverified access control on configuration setters: Several admin-looking setters write core config slots; without source, the access check on these functions cannot be confirmed.

Contract details

Verified source
No
Bytecode size
27,312 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, self-unlock

Pools using Limit orders hook