Fee sharing hook on Ethereum

Uniswap v4 Hook Contract 0x09515b618114f9d90f830c6cd81dcfcd7a03a044 on Ethereum · Fee sharing

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

What it does

Every swap in pools using this hook pays a creator fee taken from the output token, so traders receive slightly less and the creator collects the fee, while liquidity providers are unaffected.

How it works step by step

  • Takes a fee on swaps after execution through afterSwap, using afterSwapReturnDelta to withhold a share of the output currency from the trader
  • Routes the withheld fee to a creator address via take() calls on the pool manager
  • Reads creatorFeeBps to determine the creator's share of the fee, capped by MAX_FEE_BPS
  • Restricts the pool to native ETH pairs, reverting with NotNativeEthPool when a pool does not qualify
  • Stores a single creator address in slot 0, which can be reassigned by setCreator guarded by NotCreator checks
  • Leaves liquidity add, remove and donate operations as pass-through with no fee logic
Swap behaviour
After each swap, afterSwap computes a creator fee and returns it as a return delta, so the swapper receives slightly less output than the pool would otherwise pay. Trades pay the creator fee; the rate is set by creatorFeeBps, and the fee applies to every swap direction in the pool.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Creator fee is taken from swap output in afterSwap and sent to the creator address; the rate is read from creatorFeeBps bounded by MAX_FEE_BPS. The pool's own LP fee is unchanged.
Owner & admin controls
The creator address can be changed via setCreator, gated by NotCreator. No pause, upgrade or other admin functions were identified in the decoded selectors.

Enabled Uniswap v4 callbacks

beforeInitialize, afterSwap, afterSwapReturnDelta

beforeInitialize restricts pool initialization to native ETH pairs. afterSwap computes and takes the creator fee from the swap output. afterSwapReturnDelta lets the hook return a delta that the pool manager applies to the swapper's settlement.

Security & trust assessment

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

Who controls it: The creator key can redirect all accrued creator fees by changing the creator address, and any change to creatorFeeBps affects the cost of every swap on pools using this hook.

Risk to user funds: The hook moves swap output currency via take() and return deltas, so a portion of each trader's output is routed to the creator; it does not appear to hold user funds beyond the transient settlement within a swap.

Security findings

  • [medium] Hook takes currency via return delta: afterSwapReturnDelta with afterSwap and take() calls means the hook withholds part of every swap output and transfers it to the creator, so the swap settles to the trader net of this fee.
  • [low] Creator can reassign itself: Slot 0 holds the creator address, written by setCreator (selector 3f516018) and read by creator(); whoever holds the creator key controls where fees are sent and can change that address.
  • [low] Fee rate set by stored parameter: creatorFeeBps is read at swap time and bounded by MAX_FEE_BPS; the exact value and whether it can be changed could not be confirmed from bytecode alone.

Contract details

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

Pools using Fee sharing hook