Fee sharing hook on Robinhood Chain

Uniswap v4 Hook Contract 0x4468322dccd822a0d81c95d25e5dc51e45551afc on Robinhood Chain · Fee sharing

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

What it does

This hook charges a fee on swaps through return deltas and tracks each pool's accrued fees and oracle data, but without verified source the exact direction and size of the fee for each trade cannot be confirmed.

How it works step by step

  • Hook is registered for a pool via registerPool and tracks per-pool configuration (poolConfig, poolKey, registered, initialized) keyed by pool id.
  • Uses beforeSwap, afterSwap and swap return deltas (beforeSwapReturnDelta, afterSwapReturnDelta) to take a share of swap flows as hook fees.
  • Maintains a price oracle: observations, observeTruncated, increaseObservationCardinalityNext and oracleState, initialized in afterInitialize.
  • Accrues fees per pool and per address (settledFees, pendingFees, pendingTreasurySweeps, aggregateLiabilities, aggregateManagerClaims) and exposes collectFees and checkpointFees.
  • Gates liquidity additions and removals through beforeAddLiquidity and beforeRemoveLiquidity, and has a liquidity locker and liquidity manager reference.
  • Includes a pool opening phase (completePoolOpening, openingCompletedAt, openingSqrtPriceX96) and an unlockCallback that performs pool manager accounting.
Swap behaviour
beforeSwap and afterSwap run on every swap and can adjust the swap via return deltas, taking a hook fee from swap flows; the exact fee direction and which trades pay more or less cannot be fully determined from bytecode alone.
Liquidity behaviour
beforeAddLiquidity and beforeRemoveLiquidity are called on every liquidity change and may revert or be gated during the opening phase; accrued fees are checkpointed for the liquidity provider.
Fee behaviour
Hook fees are taken on swaps via return deltas and accrued per pool and address; fee settlement is tracked in storage (settledFees, pendingFees, pendingTreasurySweeps) with a minimum hook fee (minimumHookFeePips) and a fee sensitivity parameter (feeSensitivityPipsSecondsPerTick) that appears to be dynamic.
Owner & admin controls
A strategyOwner, registrar, liquidityManager, and authorFeeBps / treasury sweep functions exist; the registrar and owner appear able to register pools and set parameters, though exact permissions could not be confirmed without source.

Enabled Uniswap v4 callbacks

afterInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeDonate, afterDonate, beforeSwapReturnDelta, afterSwapReturnDelta

afterInitialize sets up oracle and pool state; beforeAddLiquidity and beforeRemoveLiquidity gate and checkpoint LP positions; beforeSwap and afterSwap run swap logic and oracle updates; beforeDonate and afterDonate track donations; beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to take a share of swap amounts.

Security & trust assessment

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

Who controls it: A privileged owner or registrar may be able to register pools, set fee and oracle parameters, and sweep treasury balances, which could affect the fees users pay.

Risk to user funds: The hook takes currency on swaps through return deltas and holds accrued fees and liabilities, so it can move pool and user funds, though the exact amounts and conditions are unconfirmed from bytecode.

Security findings

  • [medium] Return-delta fee capture: The hook uses beforeSwapReturnDelta and afterSwapReturnDelta to take currency from swaps, so it can alter the net amounts traders receive.
  • [medium] Privileged registration and parameters: Registrar and strategy owner roles can register pools and adjust fee parameters, which could change fees paid by users if those roles are compromised.
  • [info] Possible upgradeability: Proxy-like selectors and an unlockCallback suggest the contract may be upgradeable or self-unlocking; this could not be verified from bytecode.
  • [info] Unverified source: No verified source is available, so exact access control and fee formulas are inferred from decoded selectors and storage only.

Contract details

Verified source
No
Bytecode size
23,945 bytes
Upgradeable proxy
No
Detected patterns
erc20, fee-sharing, moves-currency, oracle, return-delta, self-unlock

Pools using Fee sharing hook