Access control hook on Robinhood Chain

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

Volume (24h)
<$0.01
Value locked (TVL)
$0
All-time volume
<$0.01
Pools using this hook
1
Swaps (24h)
1 (1 traders)
Total swaps
1

What it does

This hook restricts who can initialize pools, add liquidity and swap through allowlist and factory checks, and it can take a fee from swaps via return deltas, though the exact fee amount and which trades pay more cannot be confirmed without source.

How it works step by step

  • Gates pool initialization, liquidity additions and swaps by checking addresses against factory, liquidity-adder and allowlist mappings
  • Maintains an owner-managed factory registry and a liquidity-adder whitelist, with an admin address that can add factories and set adders
  • Records per-pool configuration (configs mapping) at registration and tracks registered pools with a redeem path
  • Uses return deltas in beforeSwap and afterSwap, and calls the pool manager unlock/take functions through unlockCallback, so it can move currency during swaps
  • Fee bounds are constrained by MIN_FEE_BPS and MAX_FEE_BPS and validated with FeeOutOfRange errors, suggesting a configurable fee split on swaps
Swap behaviour
beforeSwap and afterSwap are enabled with return deltas. The hook checks the sender against the allowlist and factory state, and may take or settle currency through the pool manager during the swap. Exact fee effects cannot be determined from bytecode alone.
Liquidity behaviour
beforeAddLiquidity restricts additions to registered liquidity adders or allowlisted addresses. beforeRemoveLiquidity and afterRemoveLiquidity are present as selectors but their permission flags are not enabled, so removal is not hooked.
Fee behaviour
Fee bounds are defined by MIN_FEE_BPS and MAX_FEE_BPS and a FeeOutOfRange error exists, which suggests the hook can take a fee or split of swap output, with per-pool values stored in configs. The exact formula and which party receives the fee cannot be confirmed from decoded bytecode.
Owner & admin controls
A factoryAdmin address (storage slot 2) can be changed by setFactoryAdmin and can add factories through addFactory. Liquidity adders are set by setLiquidityAdder, and the allowlist is maintained by the contract. No pause or upgrade function was found, but the factory admin is a single privileged key.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize registers pool configuration. beforeAddLiquidity gates liquidity additions. beforeSwap gates swaps and can take a return delta. afterSwap settles a return delta after the swap. beforeSwapReturnDelta and afterSwapReturnDelta let the hook alter the amounts the pool settles.

Security & trust assessment

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

Who controls it: The factory admin can register new factories and change the factory admin, which can shape who may initialize, add liquidity or swap through the hook.

Risk to user funds: The hook can take or settle currency through return deltas and pool manager calls during swaps, so it can affect the amounts moved for traders and LPs.

Security findings

  • [medium] Hook takes currency via return deltas: beforeSwapReturnDelta and afterSwapReturnDelta are enabled and the bytecode calls take and unlock on the pool manager, so the hook can alter swap settlement and move user funds.
  • [medium] Single factory admin key: factoryAdmin in slot 2 can be changed by setFactoryAdmin and can add factories, which then gain registry influence over pool access.
  • [low] Swap access gated by allowlist and factory state: beforeSwap reads the allowlist and factory mappings, so a misconfigured or changed list could block swaps for users.
  • [info] No source verification: Analysis is from decoded bytecode only, so exact fee math and role boundaries are inferred and may be incomplete.

Contract details

Verified source
No
Bytecode size
9,738 bytes
Upgradeable proxy
No
Detected patterns
access-control, moves-currency, return-delta, self-unlock

Pools using Access control hook