Fee sharing hook on Ethereum

Uniswap v4 Hook Contract 0xf1bd38fe246818a809f186f55f2b2c908b6f2888 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 liquidity pool and takes a return delta on each swap, likely to collect protocol fees for a token jar.

How it works step by step

  • Enables beforeSwap with beforeSwapReturnDelta so it can override swap amounts and take currency from the pool
  • Calls external Fluid liquidity contracts (swapIn, swapOut, estimateSwap) to price and execute swaps
  • Uses take, settle and sync against the PoolManager to move tokens
  • Reads and possibly forwards protocol fee settings via protocolFeeController and protocolFeeMultiplier
  • Routes fee proceeds to a TOKEN_JAR contract via pollTokenJar
  • Gates liquidity additions in beforeAddLiquidity
Swap behaviour
beforeSwap is enabled with return delta, so the hook can take currency and settle swaps against the external Fluid pool, with functions such as swapIn, swapOut and estimateSwap called on external contracts.
Liquidity behaviour
beforeAddLiquidity is enabled and may revert with LiquidityNotAllowed; no remove-liquidity hook is enabled in the permission bits.
Fee behaviour
Unclear from decoded input. The hook references protocolFeeController, protocolFeeMultiplier and protocolFeeFlags and a token jar, which suggests it routes a protocol fee portion of swap output into a TOKEN_JAR contract via a return delta.
Owner & admin controls
Storage slot 0 holds an address read and written by pollTokenJar and quote paths, suggesting a configurable token jar or owner-like address; no explicit owner-only modifier can be confirmed from selectors alone. Parameter changes cannot be determined from the decoded input.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta

beforeInitialize runs setup on pool creation; beforeAddLiquidity can gate liquidity provision; beforeSwap is used together with beforeSwapReturnDelta to take a delta from swaps, likely to route protocol fees or a Fluid-linked liquidity swap through the hook.

Security & trust assessment

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

Who controls it: A privileged key controlling the stored address or the protocol fee settings could redirect fee proceeds or change the fee split, but this cannot be confirmed without verified source.

Risk to user funds: The hook takes and settles currency through return deltas on swaps and may route value to a token jar or external Fluid liquidity, so user swap funds pass through hook-controlled accounting.

Security findings

  • [medium] Hook moves user currency during swaps: beforeSwapReturnDelta is enabled and the bytecode contains take, settle, sync and transfer selectors, so the hook can take and move currency during swaps.
  • [medium] Swap pricing depends on external liquidity contract: The contract calls swapIn, swapOut and estimate functions on an external liquidity venue (fluidLiquidity, fluidPool) and handles external callbacks, so its pricing depends on an external contract.
  • [low] Mutable configuration address: Selectors for protocolFeeController and tokenJar setters are not present, but storage slot 0 is written by pollTokenJar and quote paths, indicating mutable configuration.
  • [info] Liquidity gating: beforeAddLiquidity can revert with LiquidityNotAllowed, so the hook may restrict who can provide liquidity.

Contract details

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

Pools using Fee sharing hook