Dynamic fee hook on Robinhood Chain

Uniswap v4 Hook Contract 0x5afd41ecfab151bf37107eb68a0dec646dff90c4 on Robinhood Chain · Dynamic fee

Volume (24h)
$5.02K
Value locked (TVL)
$10.69K
All-time volume
$300.21K
Pools using this hook
9
Swaps (24h)
317 (131 traders)
Total swaps
12,567

What it does

A dynamic-fee hook that appears to adjust swap fees per pool within a minimum and maximum bound and can modify swap settlement after each trade, based on decoded bytecode only.

How it works step by step

  • Records initial pool state when a pool is initialized (afterInitialize)
  • Runs logic before each swap (beforeSwap) and after each swap (afterSwap)
  • Returns a delta after swaps via afterSwapReturnDelta, letting the hook take or credit tokens
  • Stores per-pool fee state and configuration in keyed mappings (currentFee, poolFeeConfig, states)
  • Exposes fee bounds MIN_FEE and MAX_FEE and a priceThreshold parameter
  • Links to a controller and poolManager and exposes a windowSeconds parameter for its calculations
Swap behaviour
beforeSwap and afterSwap run on every swap, and afterSwap can return a delta that changes the amounts settled, likely used to apply the dynamic fee or price-threshold logic.
Liquidity behaviour
Liquidity add and remove callbacks (beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity) are exposed as view selectors and are not enabled in the hook permissions, so no liquidity callbacks are expected to run.
Fee behaviour
Pool fees appear to be tracked per pool via currentFee, MIN_FEE and MAX_FEE getters and a poolFeeConfig mapping, suggesting a dynamically adjusted fee bounded by a minimum and maximum; the exact update formula is not determinable without source.
Owner & admin controls
No verified source; the decoded functions show no owner or pause selector, and the controller() and poolCreator/poolFeeConfig getters suggest a controller address may set pool fee configuration, but the exact permission check cannot be confirmed from bytecode alone.

Enabled Uniswap v4 callbacks

afterInitialize, beforeSwap, afterSwap, afterSwapReturnDelta

afterInitialize records pool state at pool creation; beforeSwap and afterSwap run around each swap and afterSwapReturnDelta allows the hook to return a delta that adjusts the swap's settled amounts.

Security & trust assessment

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

Who controls it: Without source it is unclear which address controls fee parameters or the controller reference; a privileged key could potentially change fee configuration affecting all swappers in affected pools.

Risk to user funds: The hook has return-delta permission and can therefore affect the token amounts exchanged in swaps, so it can in principle shift value between swapper and pool; the exact mechanism and any cap on it cannot be determined without source.

Security findings

  • [medium] Hook can alter swap settlement via return delta: afterSwapReturnDelta is enabled, so the hook can take or give tokens after a swap, which means it can extract value from or add value to swap settlement.
  • [medium] Privileged controller reference: The bytecode includes a controller() getter and a poolCreator mapping, indicating an external or privileged controller relationship that could influence pool configuration.
  • [info] Unverified source: No verified source is available, so function logic, access checks and upgrade paths cannot be confirmed from the decoded selectors alone.

Contract details

Verified source
No
Bytecode size
9,870 bytes
Upgradeable proxy
No
Detected patterns
return-delta

Pools using Dynamic fee hook