Dynamic fee hook on Robinhood Chain

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

Volume (24h)
$1.65K
Value locked (TVL)
$15
All-time volume
$1.65K
Pools using this hook
1
Swaps (24h)
108 (75 traders)
Total swaps
108

What it does

A launch-pool hook that charges a volatility-based swap fee between fixed minimum and maximum rates, paying more when price has moved quickly, with fees routed to a fixed collector and treasury and liquidity managed by the launch locker.

This read was written for the hook 0x765e…9afc on Robinhood Chain and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.

How it works step by step

  • Charges a hook fee on every swap that moves between a creator-set minimum and maximum based on how fast the price has recently moved, using a built-in price oracle.
  • Fee is taken in the input token (or only in the quote token if configured) and held as claims in the PoolManager until collected.
  • A fixed collector contract can redeem accrued fees, with an optional protocol treasury share set at deployment; no author royalty is charged.
  • Liquidity is restricted to the launch's liquidity locker until opening completes, and optionally permanently if external liquidity is disabled.
  • Records a truncated price oracle that other contracts can read.
Swap behaviour
Each swap pays a hook fee at a rate frozen before the swap, between the deployment-fixed minimum and maximum (maximum can be up to 100% per constructor check), rising with recent tick movement. Exact-input swaps are precharged and must fill completely or they revert.
Liquidity behaviour
Add and remove liquidity calls are only allowed from the launch liquidity locker before opening completes, and if external liquidity is disabled only the locker can ever add or remove. The hook checkpoints the locker's LP fees but takes no LP principal.
Fee behaviour
Hook fee rate ranges from the immutable minimumHookFeePips to hookFeePips (both fixed at deployment, max allowed 100%), scaling with price velocity; LP fee is 0. Collected fees go to the fixed collector, with a treasury share of roughly 12.5% to 31.25% of fees when a protocol denominator of 4 to 10 is set.
Owner & admin controls
No owner can change fees after deployment; all fee bounds, treasury and recipients are immutable or set once by the registrar. The registrar binds the collector once and marks opening complete once.

Enabled Uniswap v4 callbacks

afterInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeDonate, afterDonate, beforeSwapReturnDelta, afterSwapReturnDelta

afterInitialize: starts the oracle and checks the planned opening price; beforeAddLiquidity/beforeRemoveLiquidity: gate LP callers to the locker and update the oracle; beforeSwap: freezes the dynamic rate and takes input-side fee; afterSwap: verifies full fill and takes output-side fee; beforeDonate/afterDonate: checkpoint locker LP fees; beforeSwapReturnDelta/afterSwapReturnDelta: deduct the hook fee from swaps.

Security & trust assessment

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

Who controls it: No owner key exists; the registrar only performs one-time registration and opening completion. Fee bounds and recipients are frozen at deployment.

Risk to user funds: The hook deducts its dynamic fee (between the deployment-fixed minimum and maximum, up to 100% allowed) from swaps and cannot touch LP principal. Withdrawals are restricted to the locker address, which holds the launch liquidity.

Security findings

  • [medium] Fee ceiling set at deployment, not hard-capped: The maximum hook fee is chosen at deployment and may be anywhere up to 100%; it cannot be changed later, so check the pool's configured hookFeePips before trading.
  • [medium] Liquidity gated to locker: Before opening completes, or permanently if external liquidity is disabled, only the launch locker can add or remove liquidity, so outside LPs cannot provide liquidity directly.
  • [info] Immutable fee recipients: Fees can only be paid to the fixed collector and treasury; there is no sweep of pool principal.

Contract details

Verified source
No
Bytecode size
24,043 bytes
Upgradeable proxy
No
Detected patterns
erc20, erc6909-claims, moves-currency, return-delta, self-unlock

Pools using Dynamic fee hook