ExclusiveFeeHook on Base

Uniswap v4 Hook Contract 0xbd53d10cc87127a6dcc38cbf285688e8dacf6acc on Base · Fee sharing · Verified contract

Volume (24h)
$218
Value locked (TVL)
$528
All-time volume
$997
Pools using this hook
9
Swaps (24h)
226 (100 traders)
Total swaps
915

What it does

Private-custody exclusive-liquidity pool hook that charges a fixed 1% fee on swaps in one designated currency and forwards those fees to a fixed recipient.

How it works step by step

  • Lets only a designated liquidityManager contract register pools, add liquidity and remove liquidity, so LP custody is private.
  • Keeps swaps public and charges a 1% hook fee on one currency chosen per pool at registration (never ESHARE).
  • Implements the fee via beforeSwap specified-currency deltas or afterSwap unspecified-currency deltas, and reverts on specified-side partial fills.
  • Mints collected fees as ERC6909 claims inside PoolManager so they are accounted for without transfers during swaps.
  • Lets anyone call collectFees to burn claims and transfer them to the immutable feeRecipient, with per-call caps.
Swap behaviour
On every swap the hook takes a fee of 1% of the gross amount in the registered fee currency, implemented as a specified-currency delta in beforeSwap or an unspecified-currency delta in afterSwap, and mints the fee as ERC6909 claims to the hook.
Liquidity behaviour
Liquidity add and remove are restricted to the liquidityManager: beforeAddLiquidity, beforeRemoveLiquidity and beforeInitialize revert for any other sender. Public LPs cannot add or remove liquidity directly through this hook; custody is private to the liquidity manager.
Fee behaviour
Each pool registers one currency as the hook fee currency, which is never the ESHARE token. The hook fee is 1% of the gross fee-currency amount (exact input output, or input/99 for exact output, or specified-side equivalents), taken on top of the pool's static LP fee and any protocol fee. Fees are minted as ERC6909 claims to the hook and can be forwarded to feeRecipient by anyone via collectFees.
Owner & admin controls
No owner or pause controls found. The immutable poolManager, liquidityManager and feeRecipient are set once in the constructor. Anyone can call collectFees, but the destination is always the immutable feeRecipient. Pool registration is restricted to the liquidityManager address, which is not upgradeable from within the hook.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize and beforeAddLiquidity/beforeRemoveLiquidity restrict callers to the liquidity manager and validate the pool is bound to this hook. beforeSwap returns a specified-currency delta equal to the hook fee on swaps where the fee currency is the specified currency. afterSwap mints ERC6909 fee claims and, when the fee is on the unspecified side, returns an unspecified delta equal to the fee. beforeSwapReturnDelta and afterSwapReturnDelta enable these fee deltas. Donate and afterInitialize/afterAdd/afterRemove callbacks are disabled and revert.

Security & trust assessment

Risk level: medium (verified source, high confidence).

Who controls it: No privileged admin key can change fees, pause swaps or move funds. The only privileged role is the liquidityManager address, which alone can initialize pools and add or remove liquidity; if that contract were compromised or misconfigured it could control LP custody for every registered pool.

Risk to user funds: The hook holds no user tokens directly; swap fees are minted as ERC6909 claims inside PoolManager and forwarded only to the immutable feeRecipient. Users trading in the pool pay the extra 1% fee on the chosen currency, and LP funds are controlled by the liquidityManager rather than public LPs.

Security findings

  • [info] Hook fee taken via return deltas: The hook takes 1% of gross swap output or input in the chosen fee currency via beforeSwap and afterSwap return deltas and ERC6909 minting, on top of the LP fee.
  • [low] Partial fills on specified-currency fee revert: Exact-output swaps where the fee is specified revert if the core amount plus fee exceeds the representable range or if the swap only partially fills, so some swaps will fail rather than be charged partially.
  • [medium] Liquidity custody relies on immutable liquidityManager: Pool registration and liquidity operations depend on a single liquidityManager contract address fixed at deploy; there is no pause or upgrade path, so a bug there cannot be patched in this hook.
  • [medium] Explicitly unaudited development candidate: The source is self-described as a development candidate and not audited or approved for production.
  • [info] Fee collection is capped and permissionless: collectFees pays at most int128.max raw units per currency per call; repeated calls are needed for larger balances, and a failing recipient only blocks collection, not swaps.

Contract details

Verified source
Yes (ExclusiveFeeHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
5,903 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, return-delta, self-unlock

Pools using ExclusiveFeeHook