Dynamic fee hook on Robinhood Chain

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

Volume (24h)
$0
Value locked (TVL)
<$0.01
All-time volume
$14.60M
Pools using this hook
3
Swaps (24h)
0 (0 traders)
Total swaps
5,462

What it does

A dynamic-fee hook that adjusts swap fees by tier, pool and trader status, with owner controls for pausing, whitelisting and withdrawing funds it holds.

How it works step by step

  • beforeSwap returns a dynamic LP fee chosen from tiered, floor, default and bot fee values stored in the hook
  • Per-pool fee overrides and per-address fee overrides can replace the default tier fee
  • afterSwap records a swap count per pool and can take a return delta from the swap
  • afterAddLiquidity and afterRemoveLiquidity use return-delta flags to account for liquidity changes
  • Owner can pause swaps, toggle whitelist-only mode and manage trusted routers
  • Owner can withdraw tokens held by the hook
Swap behaviour
beforeSwap computes and applies a dynamic fee override based on stored fee tiers and overrides; afterSwap updates swap counters and may take or return a delta from the swap.
Liquidity behaviour
afterAddLiquidity, afterRemoveLiquidity and their return-delta variants are enabled, so the hook can account for or take a delta on liquidity changes; beforeAddLiquidity and beforeRemoveLiquidity selectors are present in the dispatch table, and the hook can interact with its pool manager via take.
Fee behaviour
beforeSwap reads fee configuration from storage (tier one, two and three fees, floor, default, bot fee, pool-specific overrides and swap-count based tiers) and returns a dynamic fee override for the swap; the fee is capped by a FEE_CAP constant. Per-pool and per-address overrides can replace the tiered fee.
Owner & admin controls
Owner (two-step ownership via transferOwnership/acceptOwnership, renounceOwnership available) can pause and unpause swaps via setPaused, toggle whitelistOnly, set fee tiers and fee cap via 0x2d398609, 0xf62ab668, 0x5d2988eb and 0xb6852851, set per-address fee overrides via setFeeOverride, manage trusted routers via setTrustedRouter, set an exempt address, and withdraw tokens held by the hook via withdraw. Also an address-gated setter 0xa8f4d212 and 0x72359bd3/0xf1e6cd24 toggles exist with unverified names.

Enabled Uniswap v4 callbacks

afterAddLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap, afterSwapReturnDelta, afterAddLiquidityReturnDelta, afterRemoveLiquidityReturnDelta

beforeSwap sets dynamic fees per swap; afterSwap and afterSwapReturnDelta track swap counts and may take a return delta from swaps; afterAddLiquidity and afterRemoveLiquidity with their return-delta flags may take or credit deltas on liquidity changes; afterAddLiquidityReturnDelta and afterRemoveLiquidityReturnDelta allow the hook to alter the liquidity deltas.

Security & trust assessment

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

Who controls it: The owner can pause swaps, change fee tiers and the fee cap, set per-pool and per-address fee overrides, toggle whitelist-only mode, and withdraw tokens held by the hook, so a compromised key could raise fees arbitrarily or drain accrued balances.

Risk to user funds: The hook takes and can withdraw tokens via return deltas and take calls, and the owner can pause or restrict swaps and raise fees, so user and LP proceeds are exposed to hook-controlled accounting.

Security findings

  • [high] Owner-controlled fee parameters: Owner can change tier fees, fee cap and per-pool overrides, so swap fees can be raised substantially for any pool without user consent.
  • [high] Owner withdrawal of hook-held tokens: withdraw(address,address,uint256) allows the owner to move tokens the hook holds, including any return-delta proceeds.
  • [medium] Pause and whitelist can block trading: setPaused and setWhitelistOnly can block swaps or restrict them to whitelisted addresses, and whitelistOnly gates trusted router access.
  • [medium] Hook takes value via return deltas: Return-delta flags plus take usage mean the hook can take a portion of swap and liquidity amounts, so user proceeds depend on hook logic that is not verified.
  • [info] Unverified source: Without verified source, function names and exact fee math are inferred from selectors and storage, so behaviour could differ from the summary.

Contract details

Verified source
No
Bytecode size
18,508 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, ownable, pausable, return-delta

Pools using Dynamic fee hook