VolatileFeeHook on Robinhood Chain
Uniswap v4 Hook Contract 0x00e2e5c5d838f7bdefb6ae34915dae1c8f5090cc on Robinhood Chain · Fee sharing · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $8.13
- All-time volume
- $113
- Pools using this hook
- 19
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 58
What it does
A Uniswap v4 hook that charges a volatility-dependent fee of 1% to 6.6% on ETH-denominated swaps and sends 100% of it to a designated recipient wallet rather than to liquidity providers.
How it works step by step
- Requires the pool's currency0 to be native ETH and rejects pools that are not.
- Computes the fee as baseFeeBps plus a volatility-weighted share of (maxFeeBps minus baseFeeBps), capped at maxFeeBps.
- Tracks volatility as accumulated absolute tick movement per swap, capped at VOL_FULL per swap and decaying linearly over time.
- Takes the fee from the ETH leg of each swap via poolManager.take and sends it to the pool's feeRecipient.
- Forces the LP fee to zero so no portion of trading fees reaches liquidity providers.
- Emits FeeTaken on each collection and PoolFeeChanged when the owner adjusts pool fees.
- Swap behaviour
- beforeSwap and afterSwap together take a fee in native ETH on all four swap combinations (exact-input or exact-output, buy or sell), using take() and a matching return delta; swaps are not blocked if the fee cannot be taken.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Dynamic fee in bps between baseFeeBps and maxFeeBps, scaled linearly by decayed volatility (tick movement accumulated, decaying at 2 ticks per second, saturating at VOL_FULL=2000). The whole fee is taken in native ETH via poolManager.take and sent to feeRecipient; LP fee is forced to zero, so no fee reaches liquidity providers. Fee is taken on both buys and sells across exact-input and exact-output modes, via beforeSwap or afterSwap depending on the case.
- Owner & admin controls
- Owner (a single EOA or multisig set in the constructor) can transfer ownership, including to address(0) which permanently freezes fees; owner can set the factory once; owner can call setPoolFee to change baseFeeBps and maxFeeBps for any registered pool within the hard band [1%, 6.6%]; the recipient of fees cannot be changed after registration; no pause, no upgrade proxy and no per-user blocking functions were found in the decoded interface.
Enabled Uniswap v4 callbacks
afterInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
afterInitialize records the initial tick and timestamp and requires native ETH as currency0. beforeSwap takes the fee in the specified currency for exact-input buys and exact-output sells and returns a matching positive delta. afterSwap takes the fee in the unspecified currency for exact-input sells and exact-output buys, updates the volatility state, and returns the fee as a delta. beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to take a cut of the swap.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: A single owner key can transfer ownership or freeze it at address(0), and can set any pool's base and max fee anywhere inside the 1% to 6.6% band, which directly changes what traders pay and what the recipient receives. The owner also controls the one-time factory binding, which gates pool registration. The recipient address is immutable per pool once registered, so the owner cannot redirect existing fees.
Risk to user funds: The hook can take up to 6.6% of the ETH side of any swap through take() and return deltas, but it cannot custody user tokens or block swaps. It holds no balance of its own; fees flow directly to feeRecipient. Users trading the pool are exposed to the fee; LPs are exposed to impermanent loss with no fee income.
Security findings
- [medium] Hook takes up to 6.6% of every swap on the ETH side: Fee is taken as a delta via take() and return deltas on every swap; users pay up to 6.6% of the ETH leg of every swap, and the fee cannot be disabled by the user.
- [medium] Volatility-based fee can be manipulated to extract fees: Volatility is driven by swap-induced tick movement that anyone can cause; a large swap raises volatility and the next trader pays a higher fee. The fee recipient (typically the pool owner) benefits most from this manipulation.
- [low] Owner can change pool fees within the 1% to 6.6% band: The owner can set baseFeeBps and maxFeeBps for any registered pool within the band, so fees can be moved between 1% and 6.6% at will, and transferOwnership to address(0) freezes them permanently.
- [info] Fee collection fails open when PoolManager ETH is short: If the PoolManager's ETH balance is below the fee amount, the fee is silently skipped rather than reverting, so swaps always succeed but the recipient may receive nothing on those swaps.
- [info] Liquidity providers receive no fees: LP fee is forced to zero, so liquidity providers earn nothing from the pool and bear impermanent loss without compensation.
Contract details
- Verified source
- Yes (VolatileFeeHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 5,928 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, moves-currency, ownable, return-delta
Pools using VolatileFeeHook
- ETH / PONS (0.90% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / BUN (0.90% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / ORDO (0.25% fee) — 24h volume $0, TVL <$0.01, 0 swaps today
- ETH / STANDARD (Dynamic fee) — 24h volume $0, TVL $2.00, 0 swaps today
- ETH / SPIDERBRAIN (0.50% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / RPUNK (0.00% fee) — 24h volume $0, TVL $0.46, 0 swaps today
- ETH / RHtardios (0.00% fee) — 24h volume $0, TVL $0.46, 0 swaps today
- ETH / Phantom Hood (0.00% fee) — 24h volume $0, TVL $0.46, 0 swaps today
- ETH / HOJAK (0.00% fee) — 24h volume $0, TVL $0.69, 0 swaps today
- ETH / PRSV (Dynamic fee) — 24h volume $0, TVL <$0.01, 0 swaps today
- ETH / PULP (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / ORBLIVION (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / USELESS (5.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / musebook (0.50% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / musebook (0.25% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / SPIDERBRAIN (0.25% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / CON (0.25% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / STANDARD (4.00% fee) — 24h volume $0, TVL $0, 0 swaps today