Fee sharing hook on Base

Uniswap v4 Hook Contract 0x932812ff52bfcd8c3fd753602f78a93363406888 on Base · Fee sharing

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$0
Pools using this hook
89
Swaps (24h)
0 (0 traders)
Total swaps
64

What it does

A Uniswap v4 hook that charges a protocol fee on swaps via return deltas and forwards it to a token jar, while restricting liquidity additions.

How it works step by step

  • Records initialized pools in an on-chain list
  • Restricts liquidity additions to pools using this hook
  • Takes a protocol fee on swaps via beforeSwapReturnDelta
  • Calculates the fee using a protocol fee multiplier and flags
  • Forwards collected fees to a token jar contract
  • Exposes quote and pseudo TVL views for integrators
Swap behaviour
beforeSwap and beforeSwapReturnDelta run on every swap; the hook takes a share of the swap amount as protocol fee and moves it through the pool manager to the token jar.
Liquidity behaviour
beforeAddLiquidity is implemented and returns a revert-style error (LiquidityNotAllowed selector present), suggesting liquidity additions are restricted; beforeRemoveLiquidity and afterAddLiquidity/afterRemoveLiquidity exist as stubs.
Fee behaviour
Hook reads a protocol fee multiplier and flags via protocolFeeMultiplier and protocolFeeFlags, and interacts with a token jar (tokenJar, TOKEN_JAR, pollTokenJar, take/settle selectors), suggesting it skims a protocol fee from swaps into a token jar; exact fee math cannot be determined from bytecode alone.
Owner & admin controls
Storage slot 0 holds an address that is written by pollTokenJar and quote paths; no owner or pause function is decoded. Likely a token jar address set at deployment or by the protocol fee controller; cannot confirm who may change it without source.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta

beforeInitialize: validates or records pool initialization and tracks initialized pools. beforeAddLiquidity: likely blocks or restricts liquidity provision. beforeSwap: runs custom logic on swaps and may move currency. beforeSwapReturnDelta: lets the hook take a share of swap amounts, which is how the protocol fee is captured.

Security & trust assessment

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

Who controls it: Protocol fee controller and token jar addresses appear to be configurable; a privileged party could redirect the fee destination if such setters exist, but none are clearly decoded.

Risk to user funds: The hook can take currency from swaps through return deltas and move it to a token jar, so traders pay the protocol fee on each swap routed through it.

Security findings

  • [medium] Hook takes tokens on swaps: beforeSwapReturnDelta with currency movement (take/settle calls) means the hook can take a portion of every swap's input or output token.
  • [info] Liquidity additions restricted: The hook reverts adds of liquidity through a LiquidityNotAllowed error, so LPs cannot provide liquidity to pools using it.
  • [low] Dependence on external fee contracts: Calls to protocolFeeController and a token jar indicate fee routing depends on external contracts whose behaviour is not verified here.

Contract details

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

Pools using Fee sharing hook