LaunchHook on Ethereum

Uniswap v4 Hook Contract 0x215051e0a0473e07ff6b59b499ff60f0632768cc on Ethereum · Launchpad · Verified contract

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

What it does

LaunchHook is a launchpad hook where traders pay a fee on every swap (buys on the quote input, sells on the quote output), with an anti-snipe fee that starts high and decays to the launch's normal 1 to 3 percent fee over a fixed number of blocks, the creator and platform splitting the fee and no one able to add or remove liquidity outside the hook.

How it works step by step

  • Hosts every launch pool: beforeInitialize only admits pool creation initiated by the hook itself (NotSelf otherwise), and openLaunch (factory-only) initializes the pool and seeds a single-sided liquidity position that the hook owns.
  • beforeAddLiquidity reverts for any sender other than the hook, so no outside liquidity can be added to launch pools.
  • There is no remove-liquidity path in the hook; beforeRemoveLiquidity and afterRemoveLiquidity are unimplemented, so the seeded position cannot be withdrawn through the hook.
  • beforeSwap takes the trade fee on the quote-currency input side by returning a positive beforeSwap delta and minting the same amount as ERC-6909 claims to itself; buys (quote in) pay the fee here.
  • afterSwap takes the fee on sell trades (quote out) by returning a positive afterSwap delta and minting ERC-6909 claims, then credits the fee split (creator, referrer, platform) to the escrow.
  • Fee rate decays linearly from an anti-snipe start fee to the launch's normal fee over a fixed number of blocks; one configured dev buyer can be exempted from the fee via transient storage in the opening transaction.
Swap behaviour
Exact-output swaps revert. Buys (quote in, token out) pay the current fee rate taken from the quote input in beforeSwap; sells (token in, quote out) pay the same rate taken from the quote output in afterSwap. Trades during the anti-snipe window pay a higher fee that decays linearly to the normal fee. The configured dev buyer pays the normal fee rate instead of the anti-snipe rate, once, in the opening transaction. Swaps in pools not opened by this hook revert with UnknownPool.
Liquidity behaviour
Only the hook itself can add liquidity (during openLaunch); any other add reverts with LiquidityLocked. Removal is not implemented in the hook, so the seeded single-sided position has no code path to be withdrawn.
Fee behaviour
Each launch has a fixed normal fee chosen from three tiers (1%, 2%, 3%). The platform takes 0.5% of 1% tier, 1% of the 2% and 3% tiers; the rest goes to the creator (fee recipient). An optional referral cut of the base platform fee goes to a referrer address supplied in hookData (with a no-self-referral check), and any anti-snipe excess goes to the platform. Fees are credited to the escrow; if holder rewards are enabled, the creator share is also notified to the fee recipient contract in a try/catch. Pool LP fee is zero.
Owner & admin controls
No owner, no admin functions, no pause, no upgradeability visible in the source. Parameters are fixed per launch by the factory at creation time. Note the factory is an immutable address that is the only caller allowed to open launches, so its behaviour governs which launches exist.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize: restricts pool creation to the hook's own openLaunch. beforeAddLiquidity: blocks all external liquidity adds. beforeSwap: rejects exact-output, applies the dynamic fee by minting and taking a quote-side delta, and records the fee in transient storage. afterSwap: settles the sell-side fee, credits the escrow, and emits trade events; it returns a delta for sell fees. beforeSwapReturnDelta and afterSwapReturnDelta: enabled so the hook can take fees via return deltas.

Security & trust assessment

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

Who controls it: No privileged key is visible in the hook. The only restricted caller is the immutable factory, which alone can open launches; its own code (not provided) controls which pools and parameters are created.

Risk to user funds: The hook holds ERC-6909 fee claims on the PoolManager and mints/burns them during swaps and sweeps; it does not hold ordinary token balances beyond the transient settle flow. The seeded liquidity position is owned by the hook and cannot be withdrawn, and the hook has no mechanism to block existing swaps other than the exact-output and unknown-pool reverts.

Security findings

  • [info] Fee taken via return deltas: beforeSwap and afterSwap return positive deltas so the PoolManager settles fees from the swapper's flow; the fee rate is computed from immutable launch parameters and block number, not from any admin input.
  • [low] Permissionless sweep and fee dependence on escrow: sweep() is callable by anyone and moves accrued ERC-6909 claims to the escrow; correctness depends on the escrow contract being trusted, which is not verified here.
  • [info] Unverified trader attribution in events: Trade events and referrer come from caller-supplied hookData; the contract comments warn that these must not be used for payouts, and the referrer does receive a payout when set, so a direct caller can redirect the referral share of fees to any address.
  • [info] Dev-buy exemption via transient storage: A single dev buyer address can pay the normal rather than anti-snipe fee, but only within the opening transaction, limited by transient storage.
  • [info] Single-sided position cannot be removed: Liquidity added in openLaunch cannot be withdrawn by any code path in this hook, so the market is effectively permanent; the trade-off is that liquidity is locked by design.

Contract details

Verified source
Yes (LaunchHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
11,405 bytes
Upgradeable proxy
No
Detected patterns
launchpad, return-delta, self-unlock

Pools using LaunchHook