Fee sharing hook on Ethereum

Uniswap v4 Hook Contract 0xfaaad5b731f52cdc9746f2414c823eca9b06e844 on Ethereum · Fee sharing

Volume (24h)
$197
Value locked (TVL)
$1.56M
All-time volume
$113.54M
Pools using this hook
1
Swaps (24h)
22 (8 traders)
Total swaps
97,120

What it does

A fee-taking hook that skims a configurable share of swap output and distributes accumulated fees to a fee recipient, with owner-adjustable fee parameters.

How it works step by step

  • Stores a fee rate (feeBips) in slot 0 that the owner can update via updateFeeBips
  • Calculates a per-swap fee in calculateFee, with optional manual mode toggled by updateManualFees
  • Takes its fee from swap output through afterSwap with afterSwapReturnDelta enabled
  • Accumulates fees and distributes them to a feeSplit recipient via processAccumulatedFees
  • Uses ERC6909 claim balances and take/settle calls against the pool manager to settle fees
  • Enforces a fee cooldown through feeCooldown
Swap behaviour
afterSwap computes a fee (calculateFee) and returns a delta so the hook keeps part of the swap output; beforeSwap is also exposed as a view.
Liquidity behaviour
beforeAddLiquidity and afterRemoveLiquidity/afterAddLiquidity callbacks exist; beforeAddLiquidity is a view that appears to gate or check liquidity additions, and loadingLiquidity() is referenced in the bytecode.
Fee behaviour
Fees are computed by calculateFee(bool) using a stored feeBips value (uint128 in slot 0), with an optional manual fee mode and a feeCooldown; accumulated fees are split to a feeSplit recipient via processAccumulatedFees, and the hook takes a portion of swap output through afterSwap return delta.
Owner & admin controls
Owner-gated functions include updateFeeBips(uint128), updateFeeSplit(address), updateManualFees(bool), and processAccumulatedFees(); the owner() getter is referenced, so an owner key controls fee parameters and fee recipient.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, afterSwap, afterSwapReturnDelta

beforeInitialize validates pool setup, beforeAddLiquidity gates liquidity additions, afterSwap collects fees and returns a delta that the pool manager settles, and afterSwapReturnDelta lets the hook take a share of the swap's output currency.

Security & trust assessment

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

Who controls it: The owner can change the fee rate, the fee recipient split, and toggle manual fee mode, and can trigger processing of accumulated fees; a malicious owner could raise fees to high levels on swaps routed through this pool.

Risk to user funds: The hook can move and hold swap currency via the pool manager (take, settle, mint/burn of ERC6909 claims) and can retain part of swap output as a fee, and processAccumulatedFees can transfer accumulated balances to the fee recipient.

Security findings

  • [medium] Hook takes swap output via return delta: afterSwapReturnDelta is enabled, so the hook can take tokens from every swap through the pool manager and keep a share as fees.
  • [medium] Owner can change fee rate: updateFeeBips(uint128) is callable by the owner, so fees can be changed after pool creation.
  • [info] Hook moves and holds currency: Bytecode references transfer/transferFrom and ERC6909 mint/burn/take/settle, so the hook moves currency and holds claim balances on behalf of the pool manager.
  • [info] Unverified source: Only decoded bytecode was available, so function semantics and access checks are inferred from selectors and storage writes rather than verified source.

Contract details

Verified source
No
Bytecode size
14,553 bytes
Upgradeable proxy
No
Detected patterns
erc6909-claims, moves-currency, return-delta

Pools using Fee sharing hook