Dynamic fee hook on Robinhood Chain

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

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

What it does

A dynamic-fee hook that prices swap fees off an oracle price deviation and may take a share of swap amounts into a treasury for traders and LPs.

How it works step by step

  • Reads a price from an external oracle using a feed ID
  • Computes a tax from price deviation with taxFromDeviation, clamped between FEE_MIN and FEE_MAX
  • Validates the fee quote and reverts if it is below the required fee
  • Uses beforeSwapReturnDelta and afterSwapReturnDelta to take amounts from swaps
  • Tracks swap state in storage slots 0 to 3 across beforeSwap and afterSwap
Swap behaviour
beforeSwap quotes a deviation-based dynamic fee validated against a required minimum, and afterSwap can settle an amount via return deltas and take() calls.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Computes a dynamic fee from oracle price deviation via taxFromDeviation(int256,bool), bounded by FEE_MIN and FEE_MAX and reported against a FEE_ANCHOR; the quoted fee is validated against a required fee and mismatches revert.
Owner & admin controls
No admin controls found. No owner or setter selectors were decoded; configuration appears to be fixed or read from storage without an access-control check identified in the decoded functions.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeSwap computes and applies the dynamic fee quote, afterSwap adjusts state and may settle an amount via a return delta, beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to take or redirect swap amounts.

Security & trust assessment

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

Who controls it: No privileged key selectors were decoded, so the immediate centralization risk is not evident from the bytecode; a key controlling the oracle or treasury address would be a concern if such a setter exists outside the decoded set.

Risk to user funds: The hook can take currency from swaps through return deltas and transfers to a treasury, so swap amounts are partly controlled by hook logic; without source the exact amounts and destinations cannot be verified.

Security findings

  • [medium] Hook takes currency via return deltas: The hook enables both beforeSwapReturnDelta and afterSwapReturnDelta and calls take(), so it can move currency out of the pool during swaps.
  • [medium] Swap execution depends on external oracle: The hook reads an external oracle through getPrice and reverts on invalid price or liquidity, so swaps depend on oracle liveness and correctness.
  • [info] Treasury destination for taken amounts: Decoded selectors include a treasury getter and a USDC getter, suggesting fee or currency routing to a treasury address whose setter could not be confirmed.
  • [low] Swaps can revert under certain conditions: Multiple revert paths (NotEnoughLiquidity, InvalidFeeQuote, FeeBelowRequired, PriceOverflow) can block swaps when conditions are not met.

Contract details

Verified source
No
Bytecode size
12,778 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, return-delta

Pools using Dynamic fee hook