ERC8404FeeHook on Robinhood Chain

Uniswap v4 Hook Contract 0x625591a8aba062e93e8547be32ea5c6abd8900cc on Robinhood Chain · Fee sharing · Verified contract

Volume (24h)
$6.99
Value locked (TVL)
$12.40K
All-time volume
$132.94K
Pools using this hook
1
Swaps (24h)
2 (1 traders)
Total swaps
1,786

What it does

A quote-currency fee hook for one ERC8404 pool that charges a configurable swap fee (capped at 25%) to a fee collector while leaving ERC8404 token transfers fee-free.

How it works step by step

  • Charges a swap fee only when the quote currency (e.g. ETH) is the specified or unspecified side of a swap
  • Sends the collected fee directly to an immutable feeCollector address via poolManager.take
  • Restricts validity to a single pool with fixed quote and project currencies, lpFee and tickSpacing
  • Lets the owner lower the fee to as low as zero but never raise it
  • Disables all liquidity add, remove and donate operations via revert
  • Keeps ERC8404 project token transfers fee-free
Swap behaviour
On each swap, a fee of swapFeeBps on the quote currency is taken to the feeCollector, applied before the swap for exact-input on the quote side and after the swap for the unspecified quote side.
Liquidity behaviour
No liquidity callbacks. Add and remove liquidity hooks revert with HookNotEnabled.
Fee behaviour
Charges a hook fee of swapFeeBps (initially set at deployment, max 25%) on the quote currency only, taken via poolManager.take to the immutable feeCollector. The fee is computed on the specified side for exact-input and on the unspecified side for exact-output swaps. Fee can only be reduced by the owner. ERC8404 project token transfers are fee-free.
Owner & admin controls
Owner (Ownable2Step) can call setSwapFeeBps to lower the swap fee down to 0 but can never raise it again (capped at MAX_SWAP_FEE_BPS of 2500 bps at construction). Ownership can be transferred or renounced in two steps. No pause, no upgrade path, and feeCollector and quoteCurrency are immutable.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeSwap: takes the quote-currency fee before the swap and returns a before-swap delta. afterSwap: takes the quote-currency fee on the unspecified side after the swap and returns an after-swap delta. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to adjust the swap's net currency amounts to account for the fee.

Security & trust assessment

Risk level: low (verified source, high confidence).

Who controls it: The owner can set the fee anywhere from 0 to the current value, which only lowers costs for traders; it cannot raise the fee or redirect the fee collector. The owner cannot pause swaps or move funds held by the hook, and can only transfer or renounce ownership.

Risk to user funds: The hook never holds user funds; it only takes a fee in the quote currency (e.g. ETH) directly to feeCollector during swaps. Liquidity operations are disabled, so LP funds are not touched by this hook. Project token transfers are unaffected.

Security findings

  • [info] Fee ratchet is one-way: Fee is capped at 25% (2500 bps) at construction and owner can only decrease it, so the owner cannot set a punitive fee.
  • [info] Swappers pay the hook fee on quote-currency legs: Fee is pulled from pool liquidity via poolManager.take to the feeCollector on every quote-currency swap, so swappers pay the hook fee on top of the pool LP fee.
  • [low] Swap-blocking depends on feeCollector address: Hook calls poolManager.take and returns return deltas for swaps; if feeCollector is an address that reverts on receive, swaps would revert, but the collector is a plain address set at deployment.

Contract details

Verified source
Yes (ERC8404FeeHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
5,149 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, ownable, return-delta

Pools using ERC8404FeeHook