Fee sharing hook on Ethereum

Uniswap v4 Hook Contract 0xed66e75874907c38b304239a2b9579c09f94c0cc on Ethereum · Fee sharing

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

What it does

This hook takes a basis-point fee from swaps through the pool manager, so traders pay that extra amount on each swap and the fees accumulate for a designated recipient to claim.

How it works step by step

  • Hook exposes a fee rate in basis points via feeBps() and a running total via totalFees(), and tracks accumulated fees in storage slot 0
  • beforeSwap and afterSwap both write slot 0, so the hook updates fee accounting on each swap
  • Uses beforeSwapReturnDelta and afterSwapReturnDelta, so it can take a currency delta from the swap and settle it through the pool manager via take(address,address,uint256)
  • Holds a recipient address and a token address and sends collected fees to the recipient through claim()
  • Reads the pool manager address from POOL_MANAGER() and is gated by it for callbacks
Swap behaviour
On swaps the hook runs beforeSwap and afterSwap, computes a fee in basis points, takes that amount of the swap currency through return deltas and records it in storage; the exact direction and size of the fee for buys versus sells cannot be fully determined from bytecode alone.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Fee is taken from swaps as a basis-point amount (feeBps), accumulated into totalFees, and forwarded to a recipient on claim(); it is not a pool-level static fee.
Owner & admin controls
No owner or admin selector was decoded. The recipient address appears to be set at deployment or in storage; whether it can be changed is unknown from the decoded functions.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeSwap is used to compute and take the fee before the swap executes; afterSwap is used to record fee accounting after the swap; beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to take currency from the swap delta.

Security & trust assessment

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

Who controls it: Cannot be fully determined; if the recipient or fee rate can be changed by a privileged key, that key could set a high fee or redirect collected fees.

Risk to user funds: The hook takes a fee on swap deltas through return-delta permissions and can hold accumulated fee tokens until claim() is called, so user swap amounts are reduced by the fee.

Security findings

  • [medium] Hook takes currency via return deltas: Both before and after swap return-delta permissions are enabled and take() is called, so the hook can divert part of every swap's output or input to itself.
  • [low] Fee recipient can claim accumulated fees: claim() transfers accumulated fees to the stored recipient; if the recipient or claim logic is mutable, funds could be redirected.
  • [medium] Source not verified: Without verified source, the exact fee formula, access checks on claim() and the owner or upgrade model cannot be confirmed.

Contract details

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

Pools using Fee sharing hook