Liquidity management hook on Robinhood Chain

Uniswap v4 Hook Contract 0x419e4d8ef9a35bd97ca53dcbf4abafc5526f2ac0 on Robinhood Chain · Access control

Volume (24h)
$77
Value locked (TVL)
$11.64K
All-time volume
$77
Pools using this hook
8
Swaps (24h)
70 (2 traders)
Total swaps
70

What it does

A Uniswap v4 hook with swap and liquidity callbacks that appears to gate routing, pause and liquidity access, and settle balances through its own unlock flow, with admin controls over trusted routers, keepers and residue funds.

How it works step by step

  • Gates swaps through a global pause flag and a trusted router allowlist
  • Runs gas policy checks before and after swaps using stored gas parameters
  • Holds and moves tokens via take, transfer and sweep operations during callbacks
  • Restricts liquidity additions and removals, with a third-party liquidity block error present
  • Routes leftover balances to a configurable residue recipient
  • Uses keeper and quoter allowlists for privileged operations
Swap behaviour
beforeSwap and afterSwap callbacks run on each swap; beforeSwap likely checks the global pause, trusted routers and gas policy, and the hook uses self-unlock and currency movement during these callbacks.
Liquidity behaviour
beforeAddLiquidity and beforeRemoveLiquidity callbacks are enabled. The presence of a ThirdPartyLiquidityBlocked error selector suggests the hook may restrict liquidity additions or removals from parties other than an allowed set, but this is inferred from selectors only.
Fee behaviour
Could not be determined from decoded bytecode; no fee-setting function is clearly identified. The hook may interact with pool fees through the uniswapV3SwapCallback and router logic, but this is not confirmed.
Owner & admin controls
An admin address (slot 0) can set the admin via setAdmin, toggle a global pause via setGlobalPaused, manage trusted routers and quoters (setTrustedRouter, setTrustedQuoter), manage keepers (setKeeper), set the residue recipient (setResidueRecipient) and set gas policy parameters (setGasPolicy). Admin-gated functions also include sweep and withdrawFloat style recovery functions, though exact access checks could not be confirmed without source.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap

beforeInitialize: runs when a pool is initialized, likely to validate pool configuration. beforeAddLiquidity: runs before liquidity is added, likely to gate or validate LP entry. beforeRemoveLiquidity: runs before liquidity is removed, likely to gate or validate LP exit. beforeSwap: runs before each swap, likely to apply routing, gas or pause checks and to unlock the pool for hook-driven rebalancing. afterSwap: runs after each swap, likely to settle balances or update state.

Security & trust assessment

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

Who controls it: The admin key can pause the hook globally, change trusted routers and quoters, manage keepers, redirect residue funds to a chosen recipient and alter gas policy. A compromised admin could redirect residual funds or block swaps and liquidity actions.

Risk to user funds: The hook can take and transfer currency during swap and liquidity callbacks and includes sweep and withdraw functions, so it can hold tokens and move them. The admin can pause swaps and redirect residue funds. Exact exposure cannot be confirmed without verified source.

Security findings

  • [medium] Hook holds and moves tokens: The hook can move currency through take and transfer selectors and includes a sweep function callable under admin logic, so it can hold and move tokens on behalf of the pool.
  • [medium] Admin pause can block swaps: A globalPaused flag checked in beforeSwap can halt swaps for all users when set by the admin.
  • [medium] Admin-settable residue recipient: The residueRecipient address receives leftover balances and is settable by admin, so a malicious or compromised admin could redirect residual funds.
  • [info] Self-unlock pattern: The contract uses self-unlock via unlock and unlockCallback selectors, meaning it calls back into the pool manager during swap and liquidity flows, adding reentrancy and accounting complexity.
  • [info] Keeper and router allowlists: Bytecode suggests the hook has a privileged keeper role and trusted router allowlist that restrict who can trigger certain flows.

Contract details

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

Pools using Liquidity management hook