Dynamic fee hook on Robinhood Chain

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

Volume (24h)
$806
Value locked (TVL)
$806
All-time volume
$8.27K
Pools using this hook
1
Swaps (24h)
50 (32 traders)
Total swaps
368

What it does

A Uniswap v4 hook that sets a dynamic swap fee for its pool based on a stored fee schedule and time-of-day market sessions, so traders pay a fee that varies by market hours.

How it works step by step

  • Initializes pool-specific fee data in beforeInitialize
  • Reads a per-market fee value from storage (marketFees, feeAt)
  • Determines the current trading session from sessionAt and daylight-saving logic (isDaylightSaving)
  • Returns a dynamic LP fee in beforeSwap, bounded by MAX_BASE_FEE
  • Pushes fee updates to the pool manager via updateDynamicLPFee
Swap behaviour
beforeSwap is a view function that returns a dynamic fee override read from the fee mapping and session schedule for the current time; no token transfers or return deltas are made by the hook.
Liquidity behaviour
No liquidity callbacks are enabled; beforeAddLiquidity and related selectors are present in the dispatcher but the hook permissions show only beforeInitialize and beforeSwap are active.
Fee behaviour
The hook returns a dynamic LP fee from beforeSwap, computed from a per-market fee mapping (marketFees, feeAt) and a session/time schedule (sessionAt, isDaylightSaving, OPEN/CLOSE windows); the 0x14b320d1 function writes a uint24 fee value to storage slot 2 and the bytecode references updateDynamicLPFee, suggesting fee values are pushed to the pool manager. A MAX_BASE_FEE constant bounds the base fee.
Owner & admin controls
No admin controls found. The decoded selectors show no owner, pause, or upgrade functions; the 0x14b320d1 nonpayable function appears to write fee state (slot 2) and may be callable by anyone or restricted in ways not visible without source.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap

beforeInitialize: validates or sets up the pool when it is initialized, and reads the market parameters. beforeSwap: returns a dynamic fee override for each swap based on the stored fee schedule and time-of-day session.

Security & trust assessment

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

Who controls it: The fee schedule parameters appear to be stored in mutable mappings and written by the 0x14b320d1 function; if that function is not access-controlled, anyone could alter the fee for a market, and if it is controlled by a single key, that key could set fees up to the maximum base fee on swaps.

Risk to user funds: The hook does not take custody of tokens or use return deltas, so it cannot directly hold or move user funds; its exposure is limited to setting the swap fee, which affects the amount traders receive.

Security findings

  • [info] Unused hook entry points: Only beforeInitialize and beforeSwap are enabled, but the dispatcher contains liquidity and donate hook selectors; these are unused by the enabled permissions.
  • [medium] Fee state writable by an unverified function: Storage slot 2 (uint24) is written by selector 0x14b320d1 with no visible owner check in the decoded selectors; whether it is access-controlled cannot be confirmed without source.
  • [medium] Hook controls swap fees: The hook calls updateDynamicLPFee on the pool manager based on its own computed fee, so a malfunction or manipulated schedule could change swap pricing for all traders in the pool.
  • [low] Time-based fee schedule: Fee values depend on time-of-day sessions and daylight-saving logic (isDaylightSaving, OPEN/CLOSE windows), which could be manipulated by block timestamp within tolerance or produce unexpected fees at window boundaries.

Contract details

Verified source
No
Bytecode size
8,127 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee

Pools using Dynamic fee hook