Fee sharing hook on Robinhood Chain

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

Volume (24h)
$2.98
Value locked (TVL)
$0
All-time volume
$2.98
Pools using this hook
1
Swaps (24h)
12 (3 traders)
Total swaps
12

What it does

A Uniswap v4 hook that charges a configurable buy or sell tax on swaps, sends the tax to a receiver address, and can override the pool LP fee.

This read was written for the hook 0xf230…0088 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

  • Applies a separate buy tax and sell tax, expressed in basis points, on swaps through the pool
  • Takes the tax as a currency delta using beforeSwapReturnDelta and take()
  • Sends collected tax to a configurable tax receiver
  • Overrides the LP fee for the pool with a configurable lpFeeBps value
  • Restricts tax and fee changes to the owner, with two-step ownership transfer
Swap behaviour
beforeSwap takes a buy or sell tax from the swap via return delta and take(), and applies an LP fee override before the pool executes the swap.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
beforeSwap applies a buy or sell tax (buyTaxBps / sellTaxBps, capped by MAX_TAX_BPS) that is taken as a currency delta and sent to a tax receiver, and sets an LP fee override (lpFeeBps, capped by MAX_LP_FEE_BPS) for the swap.
Owner & admin controls
Owner (Ownable2Step, pending owner via transferOwnership/acceptOwnership) can call setBuyTax, setSellTax, setLpFee and setTaxReceiver; owner can also renounceOwnership. Tax and LP fee are bounded by MAX_TAX_BPS and MAX_LP_FEE_BPS constants (exact values not decoded).

Enabled Uniswap v4 callbacks

beforeSwap, beforeSwapReturnDelta

beforeSwap: charges the buy/sell tax and LP fee override on each swap. beforeSwapReturnDelta: returns a delta so the hook can take a portion of the swap amount as tax before the pool swap executes.

Security & trust assessment

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

Who controls it: The owner can change buy tax, sell tax and LP fee at any time and redirect the tax receiver, so a privileged key could raise taxes up to the cap on every swap or redirect collected tax to an arbitrary address.

Risk to user funds: The hook can take a percentage of each swap's input or output currency through return deltas and take(), up to the owner-set tax cap. Funds are not held long term by the hook beyond transit to the tax receiver, but the owner can change the rate and destination.

Security findings

  • [medium] Owner-adjustable tax and fee: Owner can raise buy and sell tax up to MAX_TAX_BPS and LP fee up to MAX_LP_FEE_BPS, taking effect immediately for all swaps.
  • [medium] Owner-controlled tax receiver: setTaxReceiver lets the owner redirect all collected tax to any address.
  • [info] Hook takes currency from swaps: The hook uses beforeSwapReturnDelta and calls take() to move currency, so it directly withdraws part of user swap amounts into the tax path.
  • [low] Unclear additional logic: Bytecode references limitsExempt(address) and a _hookEntropy view, suggesting launchpad-style logic; the exact effect on swaps could not be fully determined without source.

Contract details

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

Pools using Fee sharing hook