Dynamic fee hook on Robinhood Chain

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

Volume (24h)
$0.36
Value locked (TVL)
$45
All-time volume
$20.13M
Pools using this hook
2
Swaps (24h)
2 (2 traders)
Total swaps
16,305

What it does

A dynamic-fee hook that charges tiered, owner-configurable fees on swaps and collects a share of swap output as hook fees that the owner can withdraw.

How it works step by step

  • Computes a dynamic swap fee from a default fee and tiered fee settings in beforeSwap
  • Applies per-address fee overrides for specific callers
  • Takes a share of swap output as hook fees via afterSwapReturnDelta and take
  • Accumulates fee balances in the hook contract
  • Lets the owner withdraw accumulated hook fees through withdrawHookFees
  • Supports two-step ownership transfer for administration
Swap behaviour
beforeSwap determines the applicable fee tier for the swap, afterSwap settles the hook's fee portion through return deltas, and the hook takes tokens accordingly.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Fees are set dynamically: a default fee and tiered fees (tierOneFee, tierTwoFee, tierThreeFee) with BPS-based parameters, plus per-address fee overrides. The hook takes a portion of swap value as hook fees via take and return deltas, which accumulate and can be withdrawn by the owner.
Owner & admin controls
Owner (Ownable with two-step transfer: transferOwnership, pendingOwner, acceptOwnership) can set the default fee (setDefaultFee), configure tiered fee parameters (ca14a65b), set a per-address fee (d7c94211), toggle a bool flag and a uint16 parameter (8de578f0, d6ca116c, 4df5e99a), and withdraw accumulated hook fees (withdrawHookFees). Upgrade or pause mechanisms were not identified.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap, afterSwapReturnDelta

beforeSwap: computes the dynamic fee applied to the swap based on the fee configuration. afterSwap: performs post-swap accounting and fee collection, returning a delta that adjusts the swap's settled amounts. afterSwapReturnDelta: lets the hook take a share of the swap output as its fee.

Security & trust assessment

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

Who controls it: The owner can change the default and tiered fees, set per-address fees, toggle hook parameters, and withdraw all accumulated hook fees. A malicious or compromised owner could raise fees sharply on swaps or redirect accrued fee balances.

Risk to user funds: The hook holds accumulated fee balances and can take a share of swap output, so it does touch user swap value. The owner can withdraw those fees and change fee rates, but the decoded bytecode shows no mechanism to freeze swaps or seize pool principal.

Security findings

  • [info] Hook takes swap output via return delta: afterSwapReturnDelta with take and transfer selectors means the hook captures part of each swap's output and can move tokens out of its balance.
  • [medium] Owner-controlled fee levels: Owner can set fees via setDefaultFee and tier configuration; the bytecode does not show an obvious upper bound check in the decoded selectors, though an LPFeeTooLarge error exists.
  • [medium] Owner can withdraw accrued hook fees: withdrawHookFees lets the owner move accumulated fee tokens to any address.
  • [low] Single privileged owner key: Ownable with a two-step ownership transfer; no timelock or multisig requirement is visible in the bytecode.

Contract details

Verified source
No
Bytecode size
8,946 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, ownable, return-delta

Pools using Dynamic fee hook