Launchpad hook on Ethereum

Uniswap v4 Hook Contract 0xaf6efdad65c9c10637e203f6563122a326fedacc on Ethereum · Launchpad

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$0
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
0

What it does

This launchpad hook charges an elevated swap fee in the early launch window and a lower normal fee afterwards, takes dev and vault fees from swaps, and lets exempt addresses trade under different terms, so early traders pay more than later traders while exempt addresses pay less.

How it works step by step

  • Initializes a pool with a launch window: the fee in the early period is set from a launch fee tied to launchTimestamp and launchSqrtPriceX96, then falls back to a normal fee.
  • Takes a dev fee and a vault fee from the swap flow using return deltas, with a fixed POOL_FEE and DEV_FEE/VAULT_FEE constants.
  • Keeps an exempt address list (mapping stored in slot 5) that is consulted during swaps and afterSwap, likely to waive fees or hook logic for listed addresses.
  • Tracks a seeded flag, and the ETH-is-currency0 flag, to decide how the launch price and liquidity are interpreted.
  • Gates liquidity additions and removals in beforeAddLiquidity and beforeRemoveLiquidity, which can restrict when LPs may enter or exit.
  • Exposes a rescue function that can move tokens held by the hook out to an address chosen by the caller.
Swap behaviour
beforeSwap and afterSwap are both enabled with return deltas, so the hook can adjust the swap amount and take a cut of the trade; during the launch window the fee is elevated (bounded by maxLaunchFee and MAX_LAUNCH_FEE_CAP), then drops to normalFee; exempt addresses are treated differently, so trades by exempt addresses likely pay less or none of the hook fee, while ordinary traders pay the launch or normal fee.
Liquidity behaviour
beforeAddLiquidity and beforeRemoveLiquidity are gated by the hook, and afterAddLiquidity and afterRemoveLiquidity selectors exist in the bytecode but are not enabled in the permissions; the hook can revert liquidity actions based on its state.
Fee behaviour
Fees are not purely static: the swap fee is set from normalFee during normal operation and a higher launch fee during the launch window (capped by MAX_LAUNCH_FEE_CAP, configured via maxLaunchFee), with dev and vault fees taken on top via return deltas.
Owner & admin controls
Owner (Ownable) can call setNormalFee, setMaxLaunchFee, setExempt, emergencyRescue, transferOwnership and renounceOwnership; the owner can therefore change fees, decide which addresses are exempt and withdraw hook-held tokens. No pause or upgrade function was found in the decoded selectors.

Enabled Uniswap v4 callbacks

afterInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

afterInitialize records the launch parameters and seeds the pool state; beforeAddLiquidity and beforeRemoveLiquidity gate LP actions; beforeSwap and afterSwap set and take the dynamic fee and divert part of the flow; beforeSwapReturnDelta and afterSwapReturnDelta let the hook take currency from swaps.

Security & trust assessment

Risk level: high, estimated (decoded bytecode, medium confidence).

Who controls it: A single owner key controls fee levels, the exempt list, rescue of accumulated funds and ownership transfer, so a compromised or malicious owner could extract accrued fees or change trading costs for everyone.

Risk to user funds: The hook takes currency via return deltas and holds fee balances, and emergencyRescue can move them, so user and pool funds are exposed to owner action.

Security findings

  • [medium] Owner-set fee rates: setNormalFee and setMaxLaunchFee let the owner change the swap fee; the cap MAX_LAUNCH_FEE_CAP limits the launch fee but the decoded bytecode does not clearly show a bound on normalFee, so a high value could make swaps very expensive.
  • [high] Emergency rescue of hook-held funds: emergencyRescue(address) lets the owner move tokens the hook holds, which includes fees taken via return deltas; users depend on the owner not abusing this.
  • [medium] Return-delta fee capture: beforeSwapReturnDelta and afterSwapReturnDelta let the hook take currency during swaps, so pool flows are altered by hook logic rather than pool fees alone.
  • [low] Owner-controlled exemptions: setExempt grants exempt status that changes swap treatment, so the owner can favour specific addresses.

Contract details

Verified source
No
Bytecode size
8,496 bytes
Upgradeable proxy
No
Detected patterns
launchpad, liquidity-management, moves-currency, ownable, return-delta

Pools using Launchpad hook