LiquidLaunchHook on Base

Uniswap v4 Hook Contract 0xea9346e83952840e69beb36df365c4e68de0e080 on Base · Launchpad · Verified contract

Volume (24h)
$0
Value locked (TVL)
$25.88K
All-time volume
$4.57M
Pools using this hook
14
Swaps (24h)
0 (0 traders)
Total swaps
8,897

What it does

A launchpad hook that gates pool initialization to a registered strategy and collects strategy fee deposits, optionally converting them into one preferred token during swaps before they are claimed by the designated fee recipient.

How it works step by step

  • beforeInitialize allows only the strategy registered for a pool key to initialize that pool
  • Factory registers pool keys and their authorized strategy via registerPoolKey and can update them before initialization
  • Strategy deposits collected LP fees into the hook via depositFees, recording per-currency accumulated balances
  • beforeSwap converts accumulated fees of the non-preferred token into the preferred token through a self-called pool swap
  • claimFees and batchClaimFees, callable by anyone, transfer accumulated fees to the recipient returned by the strategy
  • Owner manages strategy approvals and the factory address
Swap behaviour
In beforeSwap, if the pool's fee preference is Token0Only or Token1Only and accumulated fees of the other token exist, the hook performs a self-call swap converting those fees; failures are caught and swaps proceed normally. Otherwise no swap-side effects.
Liquidity behaviour
No liquidity callbacks. Liquidity is managed externally by the registered strategy; the hook only receives fee deposits.
Fee behaviour
Fees are accumulated per pool via depositFees from the registered strategy and claimed by anyone via claimFees or batchClaimFees to the recipient returned by the strategy's getFeeRecipientForPool. In beforeSwap, if the pool's preference is Token0Only or Token1Only, accumulated fees of the other token are converted via a self-called pool swap; the pool's static fee applies to those conversion swaps.
Owner & admin controls
Owner (Ownable) can set strategy approvals via setStrategyApproval and set the factory via setFactory; owner can renounce or transfer ownership. Owner cannot change fee preferences, pool configs or claim recipients directly. No pause or upgrade mechanism found.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap

beforeInitialize restricts pool initialization to the strategy registered for that pool key. beforeSwap triggers automatic conversion of accumulated fees into the preferred token when the pool is unlocked.

Security & trust assessment

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

Who controls it: The owner can approve arbitrary strategies and repoint the factory, which controls who may register pool keys and therefore who can initialize pools. The owner cannot directly seize accumulated fees, but a compromised factory or owner could register malicious strategies that redirect fee recipients via getFeeRecipientForPool.

Risk to user funds: The hook holds deposited fee balances for each pool and moves them via claimFees and internal conversion swaps. It does not hold LP principal, which the strategy manages. Users trading in pools with non-Both preferences trigger conversions that move fee tokens within the pool.

Security findings

  • [medium] Hook performs swaps inside user swap flow: beforeSwap calls poolManager.swap for conversions and pays/takes funds through the hook. Failures are caught, so a failing conversion does not block user swaps, but gas and price impact from conversions are borne by the swapper's pool state.
  • [medium] Fee recipient delegated to external strategy: The fee recipient is fetched from the external strategy contract at claim time, so the strategy (approved via factory registration) fully determines where fees go. A malicious or upgradable strategy could redirect all accumulated fees.
  • [medium] Fee conversion lacks slippage protection: Conversion swaps use sqrtPriceLimit set to the extreme bounds and no slippage protection, so a sandwich attacker can extract value from fee conversions on each swap that triggers them.
  • [low] Owner controls factory and strategy approvals: The owner can call setFactory to replace the factory and then register arbitrary pool keys and strategies, and setStrategyApproval is effectively unused for access control in the shown logic.
  • [info] Recursion guard slot documentation mismatch: The recursion guard uses a hardcoded transient slot value that is not derived from a keccak256 as the comment claims; this is a documentation inconsistency rather than a demonstrated exploit.

Contract details

Verified source
Yes (LiquidLaunchHook)
Compiler
solc 0.8.28+commit.7893614a
Bytecode size
9,965 bytes
Upgradeable proxy
No
Detected patterns
launchpad, moves-currency, ownable

Pools using LiquidLaunchHook