Fee sharing hook on Base
Uniswap v4 Hook Contract 0xea9d4a6c0d32fb8eea9468ef9751d171b121a8cc on Base · Fee sharing
- Volume (24h)
- $4.00
- Value locked (TVL)
- $7.43
- All-time volume
- $4.00
- Pools using this hook
- 1
- Swaps (24h)
- 11 (1 traders)
- Total swaps
- 11
What it does
A single-pool hook that charges a fixed protocol fee on every swap for a set fee recipient and lets governance-linked contracts gate or disable trading and liquidity adds, while LPs can always withdraw freely.
How it works step by step
- Runs a single dedicated pool and checks pool settings when the pool is created.
- Charges a protocol fee on swaps through return deltas, tracks it, and lets anyone or governance collect it to a fixed fee recipient.
- Gates adding liquidity and swapping through an external permissions/allowlist check and a 'swapping enabled' switch, likely tied to an order book or vault sleeve contract.
- Governance can change the sleeve address and stage a new order book address with a delay-style pending/accept flow.
- Swap behaviour
- Before and after each swap the hook checks that swapping is enabled and that the trader or router is allowed, then can take a protocol fee from the swap amounts. The exact fee rate is a hard-coded constant (PROTOCOL_FEE_BPS) whose value is not visible from the decoded data.
- Liquidity behaviour
- Adding liquidity is checked by the hook and may be restricted to approved callers. Remove-liquidity callbacks are disabled, so LPs can always withdraw freely.
- Fee behaviour
- A protocol fee set by a constant in basis points is taken from swaps, accumulated, and sent to a fixed fee recipient when collectFees is called; the exact percentage cannot be confirmed from bytecode.
- Owner & admin controls
- Governance (two-step transfer) can set the sleeve contract and propose/accept a new order book address, which likely influence permissions and whether swapping is enabled. The fee rate and recipient appear to be immutable constants.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: validates the pool configuration; beforeAddLiquidity: gates who can add liquidity; beforeSwap: checks swapping is enabled and trader permissions; afterSwap: records and takes the protocol fee; beforeSwapReturnDelta/afterSwapReturnDelta: let the hook adjust swap amounts to collect the fee.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: A governance address controls the sleeve and order book references, which can effectively pause or gate swaps and liquidity additions. It does not appear able to change the fee constant or touch LP principal.
Risk to user funds: The hook can take a protocol fee from swap amounts at a fixed but unconfirmed rate and sends it to a fixed recipient. LP principal cannot be locked or drained because withdrawal callbacks are disabled.
Security findings
- [medium] Swap gating via external contracts: Swaps and liquidity adds depend on an external permission check and a swappingEnabled flag, so governance-controlled contracts can block trading or restrict who can trade.
- [low] Return-delta fee with unverified rate: The hook can deduct a fee from swaps via return deltas; the rate is a constant but its value is not verifiable from bytecode.
- [info] LP withdrawals unrestricted: Remove-liquidity callbacks are disabled, so LPs can always withdraw principal.
Contract details
- Verified source
- No
- Bytecode size
- 10,436 bytes
- Upgradeable proxy
- No
- Detected patterns
- access-control, fee-sharing, liquidity-management, moves-currency, return-delta, self-unlock
Pools using Fee sharing hook
- v4ysUSDC / USDC (0.30% fee) — 24h volume $4.00, TVL $7.43, 11 swaps today