LaunchHook on Base

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

Volume (24h)
$0
Value locked (TVL)
$1.30
All-time volume
$124.48K
Pools using this hook
18
Swaps (24h)
0 (0 traders)
Total swaps
1,583

What it does

A Uniswap v4 hook for a token launchpad that takes a 1% protocol fee plus creator and module fees on every trade and holds those funds in escrow for claimants.

How it works step by step

  • Enforces that only the launchpad can initialize pools and only full-range liquidity can be added by non-protocol users
  • Takes a 1% protocol fee plus creator fee and optional module cuts on every buy and sell
  • Sets dynamic LP fees per swap through approved modules, capped at 40%
  • Donates a portion of quote cuts to in-range liquidity and burns a share of tokens bought
  • Escrows module and creator fees and lets claimants withdraw them via claim functions
  • Maintains price checkpoints and USD market cap snapshots for modules and oracle use
Swap behaviour
Launchpad-controlled pools call the hook on each swap, which sets dynamic LP fees, takes quote-side cuts through return deltas, donates part of the cut back to the pool, burns a share of bought tokens, and emits trade events; exempt senders skip these rules.
Liquidity behaviour
Only the launchpad or approved modules can add liquidity freely; other users may only add full-range positions. Removal is not blocked. Liquidity callbacks for remove, donate and their after-hooks revert with HookNotImplemented.
Fee behaviour
Every trade pays a 1% protocol fee plus a creator fee (up to 10%) and any module cuts; quote-side cuts are taken from the swap via afterSwap return deltas, some portion is donated back to the pool. During a pool swap the LP fee is overridden by a base fee plus optional module fees, capped at 40%.
Owner & admin controls
Owner (Ownable) can approve modules once, disable any module via disableModule which stops it from taking cuts or enforcing rules everywhere, and withdraw accumulated protocol balances via withdrawProtocol. Owner can set the oracle via setOracle and the launchpad/router once via setPeriphery. Owner cannot directly change creator fees or token balances, and the contract is not behind a proxy in the source shown.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize restricts pool creation to the launchpad. beforeAddLiquidity enforces full-range-only positions for non-protocol senders and runs module liquidity checks. beforeSwap checkpoints prices, sets the dynamic LP fee and returns a before-swap delta for exact-output buy cuts. afterSwap takes quote cuts, donates a portion to the pool, burns a share of bought tokens and distributes the cut to creator, modules and protocol. beforeSwapReturnDelta and afterSwapReturnDelta let the hook take or give currency during swaps.

Security & trust assessment

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

Who controls it: The owner can disable any module at will, which removes its rules and fees and, for modules holding funds, lets anyone send escrowed funds to creators. The owner can withdraw protocol balances and change the oracle, which affects USD market cap and module logic that depends on it.

Risk to user funds: The hook holds quote currency and tokens in escrow for creators, modules and the protocol, takes cuts via return deltas on every swap, and burns bought tokens. Owner-controlled disableModule and withdrawProtocol can redirect or withdraw protocol-held balances.

Security findings

  • [medium] Owner can disable module rules globally: The owner can call disableModule on any approved module, which stops that module from taking cuts or enforcing rules across all tokens, and per the source comment lets anyone redirect escrowed funds to creators.
  • [low] Complex fund flow through pool manager claims: Swaps and cuts depend on pool manager balances; when the pool manager lacks the currency the hook mints ERC-6909 claims and later redeems them via unlock, which adds moving parts to fund accounting.
  • [info] Hook alters swap deltas: Hook takes quote and token amounts through return deltas and burns tokens bought on the pool, so user trade amounts differ from the raw pool swap amounts.
  • [info] Hook custodies escrowed funds: Per the source, the contract holds protocol and module escrow balances in its own custody and only the owner can withdraw protocol balances; escrowed user claims are held until owners claim.

Contract details

Verified source
Yes (LaunchHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
23,011 bytes
Upgradeable proxy
No
Detected patterns
donates, erc20, launchpad, moves-currency, oracle, ownable, return-delta, rewards, self-unlock

Pools using LaunchHook