SwapFeeHook on Robinhood Chain

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

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

What it does

Every swap pays an extra 1% of the output on exact-input trades or the input on exact-output trades to the fee recipient, with the same rate in both directions, while LPs earn the pool fee as usual.

How it works step by step

  • Charges a flat 1% (FEE_BPS = 100 of 10,000) on every swap, computed on the unspecified side of the swap.
  • Computes the fee in afterSwap from the swap delta, using the output token for exact-input swaps and the input token for exact-output swaps.
  • Sends the fee to feeRecipient via poolManager.take inside the swap and returns the same amount as an afterSwap return delta so the swapper pays it.
  • Emits FeeTaken per swap with the pool id, currency and amount.
  • beforeInitialize restricts pool creation with this hook to the owner address.
Swap behaviour
Every swap pays an extra 1% of the unspecified side to feeRecipient, on top of the pool's own LP fee. The fee is not charged on exact-input swaps' input or exact-output swaps' output; both directions of trade pay the same 1% rate. Swaps that yield a fee of zero are unaffected.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Fixed 1% hook fee taken from the unspecified side of each swap and paid to feeRecipient; the pool's LP fee is separate and not modified by this hook.
Owner & admin controls
Owner can initialize pools with this hook and change feeRecipient via setFeeRecipient. Ownership transfers use a two-step process (transferOwnership then acceptOwnership). renounceOwnership is disabled. The fee rate FEE_BPS is a constant and cannot be changed. No pause or upgrade mechanism was found in the decoded interface.

Enabled Uniswap v4 callbacks

beforeInitialize, afterSwap, afterSwapReturnDelta

beforeInitialize restricts pool initialization to the owner. afterSwap takes the 1% fee and forwards it to feeRecipient. afterSwapReturnDelta lets the hook's return value charge that fee to the swapper.

Security & trust assessment

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

Who controls it: The owner controls which pools exist with this hook and where all swap fees go. A compromised owner key could redirect fees to an attacker address immediately.

Risk to user funds: The hook does not hold user funds. It moves a 1% share of each swap's unspecified-side amount to feeRecipient inside the swap via poolManager.take and return delta. Swappers bear that cost. The hook can block swaps by reverting when the recipient cannot receive the currency.

Security findings

  • [info] Hook takes a fixed fee from every swap: afterSwap calls poolManager.take for 1% of the unspecified side and returns the same amount via afterSwapReturnDelta, so the swapper pays the fee and the recipient receives it.
  • [medium] Swaps revert if feeRecipient cannot receive a currency: poolManager.take sends the fee to feeRecipient in the pool's currency; if the recipient is a contract that rejects that currency or native ETH, every swap that pays a fee reverts. The owner can change feeRecipient to address this, but that is an operational risk.
  • [medium] Owner can redirect all fees: setFeeRecipient is onlyOwner with no timelock, so the owner can point all future swap fees at any non-zero address.
  • [low] Owner is the only allowed pool creator: beforeInitialize reverts unless sender equals owner(), so only the owner can open pools using this hook.

Contract details

Verified source
Yes (SwapFeeHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
4,394 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, fee-sharing, moves-currency, ownable, return-delta

Pools using SwapFeeHook