LaunchHook on Ethereum

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

Volume (24h)
$111.71K
Value locked (TVL)
$222.86K
All-time volume
$37.51M
Pools using this hook
124
Swaps (24h)
764 (368 traders)
Total swaps
100,979

What it does

A launchpad hook that opens a single-sided token pool with liquidity held permanently by the hook; buys during the first 20 seconds pay a fee decaying from 99% to 1%, and the fees are credited to a fee escrow where the creator gets half the base fee and the platform recipient gets the rest.

How it works step by step

  • The factory calls openLaunch, which initializes the pool and deposits the token supply as one-sided liquidity over the full range on the token side of the opening tick, owned by the hook itself.
  • Only the hook can add liquidity (beforeAddLiquidity reverts for other senders) and every remove path reverts, so LPs cannot exit and the liquidity is locked.
  • Buys (quote in) are charged a fee in beforeSwap through a before-swap return delta; the fee rate starts at 99% and falls linearly to 1% over 20 seconds after opening.
  • Sells are charged a fee on the quote output in afterSwap through an after-swap return delta, using the same time-based rate.
  • Collected fees are minted as ERC-6909 claims to the hook and credited in FeeEscrow: 50% of the base fee to the creator and the remainder to the platform recipient, with the base fee capped at the normal 1% rate.
  • A designated dev buyer gets the normal 1% fee on their first swap in the opening block only.
Swap behaviour
Only exact-input swaps are accepted; exact-output reverts. Buys charge a before-swap fee from the input, and sells charge an after-swap fee from the output. Each fee is minted to the hook and credited to the escrow. Non-launch pools revert with UnknownPool.
Liquidity behaviour
Adding liquidity is only allowed from the hook itself, which is used once during openLaunch. Removing liquidity always reverts with HookNotImplemented, so the position is permanently locked.
Fee behaviour
Fee rate is 990000 parts per million at open, decaying linearly to 10000 (1%) after 20 seconds, out of 1,000,000 denominator. The creator receives 50% of the normal-rate base fee; the platform recipient receives the rest, including any anti-snipe excess. Fees are held as ERC-6909 claims in the hook and swept to FeeEscrow by a permissionless sweep call.
Owner & admin controls
FeeEscrow is Ownable2Step. Its owner can set the platform recipient at any time, which redirects future platform fees. The owner can set the hook address only once. The hook has no owner, pause, upgrade or parameter functions; the factory address is immutable and is the only caller allowed to open launches.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize restricts initialization to the hook itself. beforeAddLiquidity restricts liquidity additions to the hook itself. beforeSwap takes the anti-snipe fee via a before-swap return delta and rejects exact output. afterSwap takes the sell fee via an after-swap return delta and emits trade events. beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to take tokens from swap amounts.

Security & trust assessment

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

Who controls it: The FeeEscrow owner can redirect all future platform fee credits to an arbitrary address and cannot change pool or user balances already credited. The factory, which is immutable in the hook, decides which tokens, quotes and dev buyers are launched; the factory's own controls are not visible in this input.

Risk to user funds: The hook holds the launch liquidity as its own position and holds fee claims as ERC-6909 balances. It can mint, burn and take currency through the pool manager, and its return deltas take part of each swap as fees. Users' swap inputs and outputs pass through these fee deltas, and the escrow holds credited fees pending claim.

Security findings

  • [medium] Platform fee recipient is owner-changeable: FeeEscrow.setPlatformRecipient lets the escrow owner redirect all future platform fee credits, which are the larger share of fees, to any address. This applies to all launches using the escrow, with no timelock in the code.
  • [low] Pool liquidity is permanently locked: beforeRemoveLiquidity and afterRemoveLiquidity revert and only the hook can add liquidity, so the launch liquidity cannot be withdrawn. This is a design choice but means liquidity providers can never exit.
  • [info] Extreme anti-snipe fee: The fee starts at 99% and falls linearly over 20 seconds, so early buyers can lose almost all of their input; this is intended behaviour but users should be aware of it.
  • [low] Dev buyer exemption depends on sender address: The normal fee rate applies to the first swap from devBuyer in the opening block based on the sender address; if the factory sets devBuyer incorrectly, that address gets the cheaper fee and the exemption cannot be revoked.
  • [info] Escrow claim depends on hook sweep: FeeEscrow.claim calls hook.sweep when its balance is short; sweep is permissionless and burns the hook's claims into the escrow, so claims can depend on anyone calling sweep first.

Contract details

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

Pools using LaunchHook