Dynamic fee hook on Robinhood Chain

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

Volume (24h)
$1.69
Value locked (TVL)
$173
All-time volume
$4.96M
Pools using this hook
31
Swaps (24h)
7 (7 traders)
Total swaps
45,081

What it does

A dynamic-fee hook that sets swap fees from a default, tiered and per-pool schedule, taking a return-delta share of swaps that the owner can withdraw.

How it works step by step

  • Sets a default fee for pools and maintains three fee tiers (tierOne, tierTwo, tierThree)
  • Tracks swap counts per pool and selects a fee tier based on activity
  • Supports per-pool fee overrides that the owner can set or clear
  • Takes a share of swap output via afterSwapReturnDelta and transfers it with take()
  • Owner can withdraw accumulated tokens and adjust a gas threshold
Swap behaviour
beforeSwap sets or adjusts the fee based on pool swap count and tier configuration; afterSwap updates counters and may take a return delta from the swap output.
Liquidity behaviour
beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity selectors exist but are not enabled in the permissions, so no liquidity callbacks are active.
Fee behaviour
Fees are determined by a default fee plus tiered fees (tierOneFee, tierTwoFee, tierThreeFee) and per-pool overrides keyed by pool id; swapCount per pool likely drives tier selection, and the hook can overwrite the pool's fee via the swap path, with a MAX_FEE cap and FeeTooHigh guard.
Owner & admin controls
Owner (slot 0) can set the default fee (setDefaultFee), tier fees via setters, a gas threshold (setGasThreshold), per-pool fee overrides (setPoolFeeOverride-style selector 0x9c14f085 and clearPoolFeeOverride), an unnamed config setter 0x330adf21 that writes fee tiers, and a flag setter 0x1d9e182f; owner can withdraw tokens held by the hook (withdraw), and ownership transfers use a two-step pendingOwner flow (transferOwnership/acceptOwnership).

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap, afterSwapReturnDelta

beforeSwap: adjusts or sets the dynamic fee for the swap; afterSwap: updates per-pool swap counters and may apply a return delta; afterSwapReturnDelta: lets the hook take a share of the swap output as a delta, which is then moved using take().

Security & trust assessment

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

Who controls it: The owner can change all fee parameters, override fees for individual pools, withdraw tokens the hook holds, and reconfigure fee tiers at will, so a compromised owner key could set high fees and drain accrued hook balances.

Risk to user funds: The hook can hold tokens taken through return deltas on swaps and the owner can withdraw them; the hook can also set swap fees affecting trader output, but cannot block swaps based on the visible code.

Security findings

  • [medium] Owner withdrawal of hook-held tokens: Owner can call withdraw(address,address,uint256) to move tokens held by the hook contract, which may include fees taken via return deltas.
  • [medium] Owner-controlled fee parameters: Setter functions (setDefaultFee, tier and pool overrides, setGasThreshold) let the owner change fees with no visible timelock; the MAX_FEE guard limits but does not prevent high fees.
  • [medium] Return delta takes currency on swaps: afterSwapReturnDelta and the take() call mean the hook can move currency from the pool on swaps, extracting a portion of swap output.
  • [info] Two-step ownership transfer: Ownership uses a two-step transfer (transferOwnership then acceptOwnership), which reduces accidental transfer risk.
  • [info] Unverified source: Source is unverified, so function purposes are inferred from selectors and storage writes only.

Contract details

Verified source
No
Bytecode size
7,976 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, ownable, return-delta

Pools using Dynamic fee hook