Dynamic fee hook on Robinhood Chain

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

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

What it does

This hook charges a volatility-based swap fee per pool, so trades during volatile periods pay more and calm periods pay closer to the base fee, sending the fee to a pool fee recipient while LPs can withdraw freely.

How it works step by step

  • Charges a per-pool swap fee that rises and falls with recent price movement (tick changes), between a base fee and a per-pool maximum.
  • Takes the fee directly from swaps using return deltas and sends it to a per-pool fee recipient.
  • Pools are registered by a factory, which sets the fee recipient, base fee and max fee.
  • The owner can adjust a pool's base and max fee, bounded by hard-coded MIN_FEE_BPS and MAX_FEE_BPS constants whose values are not visible from the decoded bytecode.
  • Never touches liquidity adds or withdrawals.
Swap behaviour
Before and after each swap the hook computes a volatility-based fee from how far the pool's tick moved since the last swap, and deducts that fee from the swap amounts, paying it to the pool's fee recipient. Calmer markets pay closer to the base fee; volatile periods pay more, up to the pool's max fee.
Liquidity behaviour
No liquidity callbacks; LPs can add and withdraw freely.
Fee behaviour
The hook fee is dynamic per pool, scaling between a base fee and a max fee according to recent tick volatility, and is sent to the pool's registered fee recipient. The exact percentages and global bounds are set by constants that could not be read from bytecode.
Owner & admin controls
The owner can change a registered pool's base and max fee (likely bounded by MIN_FEE_BPS/MAX_FEE_BPS constants), set the factory address, and transfer ownership. The factory registers pools and assigns fee recipients.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeSwap: computes the current volatility fee and can deduct from swap input; afterSwap: updates the tick tracking and can deduct fee from output; beforeSwapReturnDelta/afterSwapReturnDelta: let the hook take the fee tokens from the swap.

Security & trust assessment

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

Who controls it: A single owner can change pool fees and the factory address, and the factory controls pool registration and fee recipients. The worst case is higher swap fees up to the unverified MAX_FEE_BPS constant.

Risk to user funds: The hook can take a fee from each swap's amounts, between the pool's base and max fee with an unconfirmed global cap. It cannot touch LP principal, and withdrawals are unrestricted.

Security findings

  • [medium] Owner-adjustable swap fee with unverified cap: The owner can reset per-pool base and max fees; a hard-coded MAX_FEE_BPS exists but its value cannot be confirmed from bytecode.
  • [info] Fee taken via swap return deltas: The hook deducts its fee from swaps and pays it to the pool's fee recipient using standard PoolManager take calls.
  • [info] LP withdrawals unrestricted: Remove-liquidity callbacks are disabled, so LPs can always withdraw.

Contract details

Verified source
No
Bytecode size
5,902 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, fee-sharing, moves-currency, ownable, return-delta

Pools using Dynamic fee hook