VolatilePairHook on Robinhood Chain

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

Volume (24h)
$0
Value locked (TVL)
$5.95
All-time volume
$0
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
0

What it does

An upgradeable dynamic-fee hook that charges direction-specific LP fees, making backrunners and traders chasing large in-block moves pay more while calm trades pay about half the resting spread, with all fees going to LPs and withdrawals never blocked.

How it works step by step

  • Sets a separate dynamic LP fee for buys and sells on every swap, based on how the price has moved within and across blocks.
  • Leans fees: the side the price has been moving toward gets a higher permanent fee, within a configured spread.
  • Charges extra to traders who trade back against a recent price move (backrunners/arbitrageurs), capturing part of that profit for LPs.
  • Gradually raises fees for trades that keep pushing price further in the same direction within a block.
  • Pools can only be created through the hook by an authorized pool initializer; the contract is an upgradeable proxy run by Uniswap-style governance roles.
Swap behaviour
Before each swap the hook computes a direction-specific LP fee from the pool's price movement since the block open and the previous block, and overrides the pool fee with it; it never takes tokens from the swap. Backrun trades against a recent move and trades continuing a big move pay more, while ordinary trades in calm markets pay roughly half the resting spread.
Liquidity behaviour
Add-liquidity callbacks do nothing and always succeed. Remove-liquidity callbacks are disabled in the hook address, so LPs can always withdraw freely, even after any upgrade.
Fee behaviour
Fees are per pool and per direction: buy and sell permanent fees sum to a configured resting spread, and temporary backrun and continuation surcharges are added on top, all clamped to a hard maximum of about 99.9998%. All fees go to LPs (plus any v4 protocol fee on top); config parameters are set by the config manager.
Owner & admin controls
The default admin can upgrade the implementation (validated to keep the same PoolManager and permission flags) and manage roles; the config manager can change each pool's fee parameters, with the resting spread and fee caps allowed up to near 100%. The pool initializer role decides which pools are created.

Enabled Uniswap v4 callbacks

beforeInitialize, afterInitialize, beforeAddLiquidity, afterAddLiquidity, beforeSwap, afterSwap

beforeInitialize blocks direct pool creation so pools must go through the hook; afterInitialize is enabled but unused; beforeAddLiquidity and afterAddLiquidity are inert pass-throughs; beforeSwap computes and overrides the dynamic LP fee; afterSwap is an inert pass-through.

Security & trust assessment

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

Who controls it: Admin, pool initializer and config manager roles are held by addresses set at initialization; the admin can upgrade the logic and the config manager can raise fees up to nearly 100% per swap. None of them can withdraw LP principal or redirect fees to themselves through this hook.

Risk to user funds: The hook holds no funds and cannot deduct tokens via deltas; it only sets the LP fee, which can range from near 0% up to about 99.9998% depending on configuration and price movement. LP withdrawals are unrestricted.

Security findings

  • [medium] Upgradeable proxy with fixed permissions: The admin can swap the implementation, but address bits keep swap and liquidity return-deltas and remove-liquidity callbacks disabled, so upgrades can only change fee logic or swap gating, not take funds or block withdrawals.
  • [medium] Config manager can set very high fees: Validation allows per-side fees up to the clamp of about 99.9998%, so a config manager could make swaps extremely expensive; fees still go to LPs, not the admin.
  • [info] LP withdrawals always open: Remove-liquidity callbacks are disabled at the address level, so LP principal can never be locked by this hook.

Contract details

Verified source
Yes (VolatilePairHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
135 bytes
Upgradeable proxy
Yes
Detected patterns
dynamic-fee, ownable, upgradeable

Pools using VolatilePairHook