Dynamic fee hook on Robinhood Chain

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

Volume (24h)
$21.51K
Value locked (TVL)
$28.03K
All-time volume
$47.22K
Pools using this hook
1
Swaps (24h)
129 (94 traders)
Total swaps
288

What it does

A dynamic-fee Uniswap v4 hook that sets swap fees from volatility-related state and can route part of the fee to a dev address, with owner and keeper controls over parameters.

How it works step by step

  • Stores a configurable fee set (uint24 fee parameters and a uint16 share) controlled by the owner or keeper
  • Reads volatility-related state to compute dynamic fees in beforeSwap and quoteFee
  • Uses return deltas to adjust swap amounts taken from or given to swappers
  • Donates or takes tokens in afterSwap to route value between pool, LPs and a dev address
  • Gates or conditions liquidity additions in beforeAddLiquidity
  • Exposes view functions for fees, volatility, pool id and state for off-chain reads
Swap behaviour
beforeSwap computes a dynamic fee (and may apply a return delta), and afterSwap performs post-swap accounting and fee handling, possibly donating or taking tokens.
Liquidity behaviour
beforeAddLiquidity is implemented and may restrict or condition liquidity additions; the hook also appears to donate to the pool (donate selector present), which moves value into LP positions. Exact conditions not determined.
Fee behaviour
Fees appear to be dynamic and owner-tunable: the hook stores a fee configuration (uint24 fields and a uint16 share, plus a dev share in basis points) and reads volatility-related state (vol) when quoting fees in beforeSwap and quoteFee. A portion of fees may be routed to a dev address. Exact formula not determined from bytecode.
Owner & admin controls
Owner (Ownable, two-step transfer via transferOwnership/acceptOwnership, renounceOwnership) can change fee parameters (0x0eab3b55, 0x352ec6c8, 0xfbb0a4db, 0xccfb5a81, 0x98c40e85), set the keeper (0x748747e6), set dev/treasury addresses (0xcec6df00) and run a poke/rebalance function (0x18178358). Owner-only selectors inferred from decoded functions; exact access checks not verified.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize: pool setup and storage initialisation. beforeAddLiquidity: check or gate liquidity additions. beforeSwap: compute dynamic fee and possible rebalancing/return delta. afterSwap: post-swap accounting, fee tracking and possible donation or take of tokens. beforeSwapReturnDelta and afterSwapReturnDelta: the hook can take or give currency deltas on swaps, so it can alter swap amounts.

Security & trust assessment

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

Who controls it: The owner and keeper can change fee parameters, the dev/fee recipient and trigger rebalancing, which can shift fee income and the economics of swaps for traders and LPs. Ownership is two-step, reducing accidental transfers, but there is no evidence of a timelock.

Risk to user funds: The hook can take or donate tokens through return deltas and donate calls, so swap and LP amounts are influenced by its logic. It does not appear to hold user principal indefinitely, but fee and delta logic directly determines what users receive.

Security findings

  • [medium] Hook takes and redirects tokens via return deltas: Hook uses return deltas and moves currency (take and donate selectors present), so it can alter amounts taken from or given to swappers and LPs.
  • [medium] Privileged fee and recipient control: Owner and keeper can change fee parameters and recipient addresses; no timelock or fee cap was identified in the decoded selectors.
  • [low] Keeper can trigger state changes: Contract has Ownable two-step ownership and a keeper role with a poke function that triggers state changes.
  • [info] Unverified source: No source is verified; behaviour is inferred from selectors and storage, so exact fee formulas and access checks are unconfirmed.

Contract details

Verified source
No
Bytecode size
21,863 bytes
Upgradeable proxy
No
Detected patterns
donates, moves-currency, ownable, return-delta

Pools using Dynamic fee hook