LiquidHookStaticFeeV2 on Base
Uniswap v4 Hook Contract 0x9811f10cd549c754fa9e5785989c422a762c28cc on Base · Dynamic fee · Verified contract
- Volume (24h)
- $50
- Value locked (TVL)
- $33.37K
- All-time volume
- $5.89M
- Pools using this hook
- 11,225
- Swaps (24h)
- 58 (23 traders)
- Total swaps
- 152,268
What it does
A Liquid Protocol hook that applies a fixed per-direction LP fee (up to 10%) to token pools, skims 20% of that fee for the protocol factory on the paired token, and runs a short anti-sniping MEV module right after pool creation.
How it works step by step
- Pools are created only through the hook's own initializePool (factory) or initializePoolOpen (anyone) functions. Direct PoolManager initialization reverts with UnsupportedInitializePath.
- Each pool stores a liquidFee and a pairedFee, each capped at 100000 (10%). On every swap the hook calls updateDynamicLPFee with one of them, depending on whether the swap buys or sells the Liquid token.
- The hook takes a protocol fee equal to 20% of the LP fee in the paired token, using before/after swap return deltas. It mints the amount as ERC-6909 claims and later burns them and sends the tokens to the factory.
- For factory pools, an MEV module can raise the swap fee up to 80% during the first 2 minutes after creation. Liquidity adds are blocked while the module is operational.
- For factory pools, it triggers the LP locker to collect rewards before each swap and optionally calls an allowlisted pool extension after each swap. Extension failures are caught and do not revert the swap.
- Swap behaviour
- beforeSwap sets the LP fee from the liquid or paired fee config and sets protocolFee to 20% of it. It then sweeps accumulated hook fee claims to the factory, asks the LP locker to collect rewards (if one is set), and runs the MEV module (if operational). For exact-input buys of the Liquid token and exact-output sells, it takes the protocol fee on the specified amount through the beforeSwap delta. afterSwap takes the fee on the unspecified amount in the other two cases, then calls the pool extension in a try/catch unless the sender is the locker.
- Liquidity behaviour
- beforeAddLiquidity reverts with MevModuleEnabled while the pool's MEV module is operational (the first 2 minutes for factory pools). Otherwise adds go through. Removals have no callback.
- Fee behaviour
- The fee is dynamic. The fee in each direction is fixed at pool creation (liquidFee or pairedFee, max 10%) and applied per swap. The hook adds a protocol fee of 20% of the LP fee, taken in the paired token as hook claims and forwarded to the factory on the next swap. The MEV module can temporarily raise the LP fee up to 80% in the first 2 minutes, and only upward.
- Owner & admin controls
- No owner, pause or upgrade functions exist in the hook (it is not an upgradeable proxy). The immutable factory address can create factory pools, set the locker, MEV module and pool extension, and call initializeMevModule. It also receives all protocol fees. Anyone can create open pools. The MEV module assigned to a pool can raise that pool's fee. The extension allowlist contract controls which extensions may be registered. Per-pool fee parameters cannot be changed after creation.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize always reverts so pools can only be created through the hook's own initializers. beforeAddLiquidity blocks liquidity adds while the MEV module is active. beforeSwap sets the fee, sweeps fees, claims locker rewards, runs the MEV module and takes the protocol fee on the specified amount. afterSwap takes the protocol fee on the unspecified amount and runs the pool extension. beforeSwapReturnDelta and afterSwapReturnDelta let the hook take the protocol fee out of swap amounts.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The factory is the main privileged party. It chooses each pool's locker, MEV module and pool extension (subject to the allowlist), and receives all protocol fees. A malicious module could charge up to 80% in the first 2 minutes. A reverting locker or module could block swaps on that pool. The factory cannot change the fee settings of an existing pool or withdraw pool liquidity through this hook.
Risk to user funds: The hook holds no balances beyond transient ERC-6909 claims of the paired token, which are burned and sent to the factory on the next swap. It can take 20% of the LP fee from swappers through return deltas. It does not custody LP positions. Swaps could be blocked by a reverting locker or MEV module, and liquidity adds are blocked briefly at launch. Removals are not hooked.
Security findings
- [info] Protocol fee taken via return deltas: beforeSwap and afterSwap return deltas and mint ERC-6909 claims to the hook, which later sends them to the factory. This adds 20% of the LP fee on top of the pool fee, so the total cost is higher than the LP fee alone.
- [medium] MEV module can set a fee of up to 80%: mevModuleSetFee lets the pool's assigned module raise the LP fee up to MAX_MEV_LP_FEE (800000) within 2 minutes of pool creation. The module is an external contract chosen by the factory, so swaps in that window can be very expensive.
- [medium] External calls in the swap path: beforeSwap calls the LP locker's collectRewardsWithoutUnlock and the MEV module's beforeSwap without try/catch. A faulty or malicious locker or module chosen by the factory could revert swaps for that pool. Pool extension calls are wrapped in try/catch and cannot block swaps.
- [low] Liquidity adds blocked at launch: beforeAddLiquidity reverts while the MEV module is operational. This lasts at most 2 minutes after pool creation, and only for factory pools with a module enabled.
- [info] Fee configuration is immutable per pool: liquidFee and pairedFee are set once in initializePool and capped at 10%. No setter exists afterwards, so there is no owner-driven fee change outside the MEV window.
Contract details
- Verified source
- Yes (LiquidHookStaticFeeV2)
- Compiler
- solc 0.8.28+commit.7893614a
- Bytecode size
- 16,517 bytes
- Upgradeable proxy
- No
- Detected patterns
- access-control, dynamic-fee, mev-protection, return-delta
Pools using LiquidHookStaticFeeV2
- LIQPAD / WETH (Dynamic fee) — 24h volume $48, TVL $67, 8 swaps today
- JAKARAL / WETH (Dynamic fee) — 24h volume $1.02, TVL $0.91, 8 swaps today
- WETH / Bitbank (Dynamic fee) — 24h volume $0.15, TVL $0.15, 3 swaps today
- LIQ0 / WETH (Dynamic fee) — 24h volume $0.13, TVL $0.80, 1 swaps today
- GER / WETH (Dynamic fee) — 24h volume $0.08, TVL $0.07, 6 swaps today
- WETH / stLIQ (Dynamic fee) — 24h volume $0.06, TVL $0.05, 1 swaps today
- WETH / AMC (Dynamic fee) — 24h volume $0.06, TVL $0.05, 1 swaps today
- WETH / MRRRZM (Dynamic fee) — 24h volume $0.05, TVL $0.15, 4 swaps today
- WETH / JAIL (Dynamic fee) — 24h volume $0.03, TVL <$0.01, 2 swaps today
- Brick / WETH (Dynamic fee) — 24h volume $0.02, TVL $855, 4 swaps today
- PHARAOH / WETH (Dynamic fee) — 24h volume $0.02, TVL <$0.01, 2 swaps today
- WETH / ZH (Dynamic fee) — 24h volume <$0.01, TVL $0.01, 2 swaps today
- WETH / Anansi (Dynamic fee) — 24h volume <$0.01, TVL $0.29, 2 swaps today
- BTCD / WETH (Dynamic fee) — 24h volume $0, TVL $37, 0 swaps today
- WETH / BBF (Dynamic fee) — 24h volume $0, TVL $118, 0 swaps today
- WETH / MRLG (Dynamic fee) — 24h volume $0, TVL $0.01, 0 swaps today
- WETH / DEGA (Dynamic fee) — 24h volume $0, TVL $29, 0 swaps today
- WETH / LSCK (Dynamic fee) — 24h volume $0, TVL $48, 0 swaps today
- WETH / COCAINE COWBOYS (Dynamic fee) — 24h volume $0, TVL $0.13, 0 swaps today
- WETH / SATANSWORKERS (Dynamic fee) — 24h volume $0, TVL $0.25, 0 swaps today