Likely fee sharing hook on Robinhood Chain

Uniswap v4 Hook Contract 0xb90e8b668de4fc0592100f6f40af33035147c044 on Robinhood Chain · Fee sharing

Volume (24h)
$0
Value locked (TVL)
$1.64B
All-time volume
$11
Pools using this hook
2
Swaps (24h)
0 (0 traders)
Total swaps
5

What it does

A swap tax hook that takes a configurable buy and sell fee from each swap and sends it to a treasury address.

How it works step by step

  • Stores separate buy and sell tax rates in storage slots 1 and 2.
  • Stores a treasury recipient address in slot 0.
  • Computes the tax in afterSwap based on swap direction.
  • Returns the tax as an afterSwapReturnDelta so it is deducted from swap output.
  • Transfers collected tax to the treasury through the pool manager take call.
  • Exposes setTax and setTreasury for updating parameters.
Swap behaviour
After each swap, afterSwap computes a tax using buyTaxBps or sellTaxBps, returns it as a delta, and transfers that amount to the treasury through the pool manager.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Charges a configurable tax on swaps: buyTaxBps and sellTaxBps, capped by MAX_TAX_BPS, are read in afterSwap. The tax is taken as an afterSwap return delta and the collected amount is sent to the treasury address via a take call to the pool manager.
Owner & admin controls
Owner-style control: setTax(uint256,uint256) sets buyTaxBps and sellTaxBps (storage slots 1 and 2), and setTreasury(address) changes the treasury address (slot 0). No pause or upgrade function was identified in the dispatched selectors. The access check on setTax and setTreasury could not be confirmed from decoded bytecode alone.

Enabled Uniswap v4 callbacks

afterSwap, afterSwapReturnDelta

afterSwap: reads tax settings and treasury, and computes the tax to collect. afterSwapReturnDelta: lets the hook return a delta so the tax amount is taken from the swap output and routed to the treasury.

Security & trust assessment

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

Who controls it: A privileged key can set buy and sell tax rates (bounded by MAX_TAX_BPS, if enforced) and redirect all tax revenue by changing the treasury address. This affects swap pricing for all traders on pools using this hook.

Risk to user funds: The hook takes a share of swap output on every swap via a return delta and sends it to the treasury. Its takes are limited by the configured tax rates, so the hook does not directly hold pool funds, but a high tax or a changed treasury could divert a large portion of trader proceeds.

Security findings

  • [medium] Unverified access control on parameter setters: setTax and setTreasury are nonpayable and write storage slots that afterSwap reads. Whether they are restricted to an owner could not be confirmed from bytecode.
  • [medium] Treasury can be changed by privileged key: The treasury address is a single mutable slot. A compromised or malicious owner could redirect all collected tax to an address they control.
  • [medium] Tax rate ceiling depends on setTax validation: Tax rates are set by a privileged function. If MAX_TAX_BPS is not enforced in setTax, the owner could set a very high tax and extract most swap output.
  • [info] Hook moves swap currency by design: The hook uses afterSwapReturnDelta and takes currency from the pool, so it can move user swap proceeds to the treasury.

Contract details

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

Pools using Likely fee sharing hook