HookrModularHookV6 on Robinhood Chain

Uniswap v4 Hook Contract 0xb3ca29cf721380cee8b8e4755f3865ebc68fe8cc on Robinhood Chain · Custom pricing · Verified contract

Volume (24h)
$13.74M
Value locked (TVL)
$2.59K
All-time volume
$344.46M
Pools using this hook
45
Swaps (24h)
870 (860 traders)
Total swaps
18,161

What it does

A modular swap hook that charges a configured quote-token fee on swaps in pools it manages, routes that fee to registered recipients as claims, and can run an optional fail-open arbitrage correction through a fixed executor.

How it works step by step

  • Initializes a pool only when the coordinator calls beforeInitialize, and marks the stack as initialized in the external stack registry.
  • On beforeSwap, reads the frozen stack for the pool, runs each registered module's pre-swap logic, and sums their surcharges and quote-take rates against the stack caps.
  • Takes the quote-token fee through the beforeSwap return delta and the afterSwap hook delta, then mints claim tokens to each module recipient and calls their claim-sink credit function.
  • Can run a stateful module once per phase with a codehash-pinned CALL, and can donate part of the quote fee to the pool.
  • Optionally dispatches a signed correction plan to an immutable arbitrage executor after a swap. Failures are logged and swallowed, so the user's swap still completes.
  • Restricts hook data to a trusted router or quoter identified by codehash; other callers must send empty hook data.
Swap behaviour
beforeSwap computes module surcharges and quote takes, applies an LP fee override, and returns a specified-currency delta when fees apply. afterSwap settles deferred donations, validates the realized amounts, mints claims to module recipients, emits HookFee, and returns the unspecified-side hook delta. Swaps must use the dynamic fee flag and the pool's registered subject and quote tokens.
Liquidity behaviour
beforeAddLiquidity is view-only: it runs each registered module's pre-liquidity check, and any module can revert the add. No remove-liquidity or donate callbacks are enabled, and they revert if called.
Fee behaviour
The LP fee is the stack's base fee plus module surcharges, capped by the stack's maximum LP fee. Module quote takes are charged on top, capped by stack limits, and paid as claims to module recipients. syncBaseFee can be called by anyone to push the base fee into the PoolManager's cache.
Owner & admin controls
No owner, pause, or upgrade functions appear in the visible source or ABI. The accounting kernel, stack registry, coordinator, trusted router and quoter, and correction executor are all immutable references, and their code hashes are checked at runtime. Fee caps, module set, and recipients are fixed per pool in the external registry, which is not in the provided source. The coordinator controls which pools can be initialized.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize restricts pool setup to the coordinator and records the pool in the stack registry. beforeAddLiquidity runs module checks and can block liquidity adds. beforeSwap and afterSwap run module logic, apply the LP fee override, and take quote-token fees through return deltas. beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to take or credit tokens during swaps.

Security & trust assessment

Risk level: medium (verified source, medium confidence).

Who controls it: The coordinator can initialize pools and record them in the registry. The external registry, which is not visible, can set or change configuration if it has admin controls, and the correction signer can authorize arbitrage plans. No function in the visible hook lets an owner change fees or pause swaps.

Risk to user funds: The hook can take quote-token fees from swaps via return deltas and mint claim tokens to module recipients. It can also trigger external arbitrage, and stateful module actions can donate or take tokens. Funds are not held by the hook itself beyond transient settlement, but the amounts and recipients depend on frozen registry settings and external modules.

Security findings

  • [medium] Swaps carry a hook-taken quote fee: beforeSwap and afterSwap take quote-token fees via return deltas, with rates set by module results and capped at the stack limits. Users pay these on top of the pool fee, and the size depends on the frozen registry configuration that is not visible here.
  • [medium] Arbitrage correction runs external code during swaps: After a swap, the hook calls the immutable executor with a 2.5M gas stipend. It is fail-open, so a failed correction does not revert the user's swap. The executor can move funds on external venues, and the signer who authorizes correction plans via r, s and v is not identifiable from the provided source.
  • [medium] Stateful module can move funds in the swap path: A STATEFUL_V1 module is called with CALL, not STATICCALL, and its returned actions drive donations, claim mints and token takes. The codehash is pinned and gas is bounded, but the settlement library that executes these actions was omitted from the input, so its exact effect cannot be verified.
  • [low] Behaviour depends on an external registry: The stack configuration, module list, caps, trusted router and quoter, and correction executor are read from the stackRegistry contract, which is not in the provided source. The hook's behaviour cannot be fully verified without it.
  • [info] Correction failures are silent: Correction attempts that fail or are skipped are emitted as events, and swaps still succeed. Users may not notice when recapture does not run.

Contract details

Verified source
Yes (HookrModularHookV6)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
8,474 bytes
Upgradeable proxy
No
Detected patterns
return-delta

Pools using HookrModularHookV6