Dynamic fee hook on Robinhood Chain

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

Volume (24h)
$740.42K
Value locked (TVL)
$42.57K
All-time volume
$740.42K
Pools using this hook
65
Swaps (24h)
5,997 (1,130 traders)
Total swaps
5,997

What it does

This hook takes a dynamic, configurable fee from swaps and credits it to creators or other recipients, with the exact fee range unverified, while LPs can always withdraw freely.

This read was written for the hook 0x42b4…30c4 on Robinhood Chain and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.

How it works step by step

  • Charges a per-pool fee on swaps, taken from the swap output using its swap return-delta permission.
  • Fee level appears dynamic, with a quote function, oracle data and per-pool configuration feeding the calculation.
  • Accrues collected fees to recipients such as pool creators, who can claim them later.
  • Includes a guardian role, a registry, per-pool fee setting and bounty payouts, whose exact limits cannot be confirmed from bytecode.
  • Never runs on liquidity removal, so LPs can always withdraw.
Swap behaviour
Before and after each swap the hook computes a fee and can deduct it from the swap amount via return deltas. The exact fee size and any conditions or restrictions cannot be verified from bytecode.
Liquidity behaviour
No liquidity callbacks are enabled, so the hook never runs on adds or withdrawals. LPs can add and withdraw freely.
Fee behaviour
A hook fee, apparently dynamic and settable per pool, is taken from swaps and credited to creators or other recipients to claim later. The fee range and any hard cap are unknown from bytecode.
Owner & admin controls
Functions exist to set per-pool fees, set creator payout addresses, pay bounties and change configuration, plus a guardian role with an expiry. Who can call them and the exact fee caps cannot be confirmed from bytecode.

Enabled Uniswap v4 callbacks

beforeInitialize, afterInitialize, beforeSwap, afterSwap, afterSwapReturnDelta

beforeInitialize: validates new pools; afterInitialize: registers pool configuration; beforeSwap: prepares or checks fee data; afterSwap: computes and records the fee; afterSwapReturnDelta: deducts the fee from swap amounts.

Security & trust assessment

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

Who controls it: A guardian or pool creators appear able to set fees, payout addresses and configuration. The upper bound on fees they can set is not verifiable from bytecode.

Risk to user funds: The hook can take a fee from swap amounts of unknown maximum size and holds accrued fees for claimants. LP principal cannot be locked or taken since withdrawals bypass the hook.

Security findings

  • [medium] Unverified fee-taking hook: The hook can deduct tokens from swaps via return deltas and has a fee setter, but the maximum fee cannot be verified without source.
  • [low] Guardian and config controls: A guardian role and several configuration setters exist; their exact powers and limits are unknown.
  • [info] LP withdrawals unrestricted: Remove-liquidity callbacks are disabled, so the hook cannot block or charge LP withdrawals.

Contract details

Verified source
No
Bytecode size
27,785 bytes
Upgradeable proxy
No
Detected patterns
fee-sharing, return-delta

Pools using Dynamic fee hook