FeeHook on Robinhood Chain

Uniswap v4 Hook Contract 0x2093dfc86b1c59b120a4453a958aaed7c6ab68c4 on Robinhood Chain · Dynamic fee · Verified contract

Volume (24h)
$433
Value locked (TVL)
$486
All-time volume
$471
Pools using this hook
15
Swaps (24h)
129 (26 traders)
Total swaps
411

What it does

A shared Uniswap v4 hook that sets dynamic swap fees per market (session, surge, trade size, oracle deviation and launch window) and collects a small protocol fee for the revenue router.

How it works step by step

  • Sets a dynamic LP fee per swap from base fee, surge since the anchor tick, trade size relative to active reserve and launch-window decay
  • Adds an off-hours fee for STOCK markets outside a weekday UTC trading session
  • Adds a Market Guard fee when pool price drifts from a Chainlink oracle price, charged only on trades that move it back
  • Takes a protocol fee of up to 1% from each swap and records it per market
  • Lets anyone harvest accumulated protocol fees to the RevenueRouter, which pays the treasury and market voters
  • Blocks new liquidity and swaps while a market is paused, but never blocks liquidity removal
Swap behaviour
beforeSwap sets a dynamic LP fee override; afterSwap takes up to 1% protocol fee from the unspecified side as a return delta and mints it as claims on the hook.
Liquidity behaviour
beforeAddLiquidity reverts with MarketPaused when the market is paused; otherwise it is a pass-through. beforeRemoveLiquidity is deliberately not implemented, so withdrawals always work, even when paused.
Fee behaviour
beforeSwap computes the LP fee per swap from base fee, off-hours fee for STOCK markets, a surge component from ticks moved within a window, a trade-size component, a Market Guard oracle-deviation component and a launch-window decay, all clamped to hard caps (10% normal, 50% launch). A protocol fee of up to 1% of the unspecified side is taken in afterSwap and minted as ERC-6909 claims for later harvest.
Owner & admin controls
The hook has no owner. Configuration (fees, pause flag, oracle settings, trading session) lives in the MarketRegistry and is changed there by its owner/timelock; the hook only reads it and clamps values to FeeBounds. The registry can pause a market, which blocks new liquidity and swaps through MarketPaused. Harvest is permissionless. Upgradeability of the registry is not visible from the hook source.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, afterSwapReturnDelta

beforeInitialize: requires dynamic-fee pools and registers reserved markets via the registry. beforeAddLiquidity: blocks new liquidity while a market is paused. beforeSwap: returns the dynamic LP fee override. afterSwap: takes the protocol fee as a return delta and records it per market. afterSwapReturnDelta: lets the hook take the protocol fee from the swapper's flow.

Security & trust assessment

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

Who controls it: The hook itself has no privileged key. The registry owner (through a timelock) controls market configuration, can pause a market (blocking new liquidity and swaps), and sets the LBP initializer authorized for reserved markets. Those roles could raise fees up to the hard caps, change the protocol fee up to 1%, or change the oracle settings.

Risk to user funds: The hook holds protocol fees as ERC-6909 claims on the PoolManager (it does not hold LP principal) and moves them to the RevenueRouter on harvest. It can block swaps and new liquidity through the pause flag but cannot block withdrawals. The protocol fee is capped at 1% of the unspecified side of each swap.

Security findings

  • [medium] Pausable swaps through registry: The hook can pause a market via the registry, causing swaps and new liquidity to revert while removals still work.
  • [low] High fee ceiling set by the registry: Dynamic LP fees can reach 10% outside the launch window and 50% during it, and oracle and size components can add to them, so a configuration change could make swaps very expensive.
  • [info] Protocol fee taken via return delta: The hook returns a delta and takes up to 1% of the unspecified side of each swap, so it does hold claims on pool value until harvest, which is permissionless and forwards funds to the RevenueRouter.
  • [info] Oracle reads cannot revert swaps: Market Guard reads Chainlink feeds with a bounded gas budget and fails closed to zero extra fee on errors, so an oracle outage does not block swaps.

Contract details

Verified source
Yes (FeeHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
11,935 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, moves-currency, return-delta, self-unlock

Pools using FeeHook