Fee sharing hook on Ethereum

Uniswap v4 Hook Contract 0xf1033ae8610a70f123086439c0e83dfcb2a6e888 on Ethereum · Fee sharing

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

A Uniswap v4 hook that routes swaps through an external Fluid-style liquidity layer and takes a protocol fee via a token jar, with its own return-delta control over swap amounts.

How it works step by step

  • Enables beforeInitialize, beforeAddLiquidity, beforeSwap and beforeSwapReturnDelta callbacks
  • Routes swap execution through external swap and liquidity selectors (swapIn, swapOut, getPoolReserves)
  • Takes currency through return deltas using take, settle and transfer calls
  • Exposes protocol fee controls (protocolFeeMultiplier, protocolFeeFlags, protocolFeeController)
  • Directs collected fees to a token jar (tokenJar, pollTokenJar, TOKEN_JAR)
Swap behaviour
beforeSwap runs custom logic and beforeSwapReturnDelta lets the hook adjust swap deltas, with calls that look like swapIn/swapOut routed to an external pool and fees possibly taken into a token jar. Exact behavior requires source.
Liquidity behaviour
beforeAddLiquidity is enabled and afterAddLiquidity/afterRemoveLiquidity/beforeRemoveLiquidity selectors exist, but without source it is unclear whether they revert or only observe. Reads of pool TVL (pseudoTotalValueLocked) suggest liquidity is accounted for externally, possibly against a Fluid liquidity layer (fluidLiquidity, fluidPool selectors).
Fee behaviour
Protocol fee multiplier and flags are exposed via protocolFeeMultiplier, protocolFeeFlags and protocolFeeController selectors, and fees may be routed to a token jar (TOKEN_JAR, tokenJar, pollTokenJar). The exact fee calculation and split cannot be confirmed from the bytecode alone.
Owner & admin controls
No owner or pause function decoded. Storage slot 0 (an address) is written by 3f7d1179 (pollTokenJar) and cd272714 (quote), so the address behaves like a token jar or fee destination that can be re-pointed by the logic; who can trigger those writes is not determinable without source. Admin role is unclear.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta

beforeInitialize: runs when the pool is initialized, likely to record pool parameters. beforeAddLiquidity: gates or validates liquidity additions. beforeSwap: runs custom logic before each swap and may return a delta, so the hook can take or supply currency. beforeSwapReturnDelta: allows the hook to override part of the swap amounts, letting it take a cut of the swap.

Security & trust assessment

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

Who controls it: The hook writes to an address slot and exposes token jar and protocol fee controller hooks; a privileged controller could redirect fees or alter the fee multiplier, but no decoded owner-only check was confirmed.

Risk to user funds: The hook can take or supply currency through return deltas and external swap/liquidity calls, so user swap proceeds and pool funds may be affected by the hook's logic; the exact amounts and conditions are not determinable from decoded bytecode.

Security findings

  • [medium] Hook can modify swap deltas and move currency: beforeSwapReturnDelta is enabled and the bytecode contains transfer/take/settle and swap-related selectors, so the hook can alter or redirect swap amounts and move currency during swaps.
  • [medium] Swaps may be routed to an external liquidity source: Selectors for a fluid liquidity/pool layer (swapIn, swapOut, estimateSwapIn/Out, getPoolReserves) indicate swaps may be routed to an external pool rather than the Uniswap pool, which affects execution price and where funds sit.
  • [low] Token jar destination may be changeable: A writable address slot and token jar selectors mean fees or accumulated balances may be sent to an address set by a privileged party; access control on pollTokenJar and quote could not be verified.
  • [info] Unverified source: No verified source is available, so access control, upgrade paths and exact fee math cannot be confirmed.

Contract details

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

Pools using Fee sharing hook