Fee sharing hook on Base
Uniswap v4 Hook Contract 0x4d4044d6f5c62389d7f79cf86435a220b7bb2888 on Base · Aggregator
- Volume (24h)
- $1.01
- Value locked (TVL)
- $0
- All-time volume
- $1.01
- Pools using this hook
- 3
- Swaps (24h)
- 1 (1 traders)
- Total swaps
- 1
What it does
An aggregator hook that fills v4 swaps from an external market-making pool for a capped hook fee plus protocol share, restricts adding v4 liquidity, and lets a registrar disable pools without ever blocking withdrawals.
How it works step by step
- Routes swaps on a Uniswap v4 pool through an external market-making pool (a 'Metric' OMM pool) instead of normal v4 liquidity, settling the trade atomically.
- Charges a hook fee (feePips with a hard-coded MAX_FEE_PIPS constant) plus a protocol fee share, sent to a fee recipient or token jar.
- Restricts pools to an allowed token pair and registers a canonical pool per external pool.
- Blocks direct liquidity adds to the v4 pool, since liquidity lives in the external pool.
- A registrar role can disable a linked pool.
- Swap behaviour
- On each swap the hook quotes and executes the trade against the external pool, using a return delta to take the trader's input and deliver the output through the PoolManager. A fee is deducted and split with the protocol; disabled pools likely cannot be swapped.
- Liquidity behaviour
- The hook checks liquidity additions and appears to reject or restrict them, as pricing comes from the external pool. Remove-liquidity callbacks are disabled, so any existing LP positions can always be withdrawn.
- Fee behaviour
- A hook fee set by feePips, capped by a MAX_FEE_PIPS constant whose exact value cannot be read from bytecode, plus a protocol fee portion directed to a fee recipient / token jar. Exact percentages are unknown.
- Owner & admin controls
- A registrar can disable pools, which would stop swaps routing through them. Fee values appear fixed or read from external factory/controller contracts; no fee-setting function is exposed on the hook itself.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta
beforeInitialize: validates the pool tokens and links it to an external pool; beforeAddLiquidity: restricts adding liquidity; beforeSwap: quotes and routes the swap externally; beforeSwapReturnDelta: replaces the v4 swap amounts with the external fill and collects fees.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: A registrar address can disable pools, and fee parameters may depend on external factory or protocol fee controller contracts. They cannot block LP withdrawals.
Risk to user funds: The hook handles trader swap input and output during each swap and deducts a fee whose exact cap is unknown. It does not touch LP withdrawals and is not upgradeable.
Security findings
- [medium] Swap amounts set by hook: The hook uses swap return deltas to fill trades from an external pool, so traders rely on its pricing and fee logic; fee cap value is not verifiable from bytecode.
- [low] Registrar can disable pools: A registrar role can disable a pool, halting swaps through this hook for it.
- [info] LP withdrawals unaffected: Remove-liquidity callbacks are disabled, so the hook can never block withdrawals.
Contract details
- Verified source
- No
- Bytecode size
- 14,161 bytes
- Upgradeable proxy
- No
- Detected patterns
- aggregator, dynamic-fee, erc6909-claims, fee-sharing, moves-currency, return-delta
Pools using Fee sharing hook
- WETH / USDC (0.00% fee) — 24h volume $1.01, TVL $0, 1 swaps today
- WETH / cbBTC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / cbBTC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today