Launchpad hook on Ethereum

Uniswap v4 Hook Contract 0x0e1373dad116d67b63951f6d1f14d528cb06a0cc on Ethereum · Launchpad

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

What it does

This launchpad hook lets traders buy and sell newly launched tokens, charging a dynamic fee that is highest for early snipers during the launch window and falls afterward, with the fees split between the fee recipient and the platform.

How it works step by step

  • Deploys and launches new ERC20 tokens paired against an existing token through a launch(...) entry point that initialises a Uniswap v4 pool keyed to this hook
  • Tracks each launched token with a per-token launch record, a pool key lookup, and an ordered list of launched tokens
  • Applies a dynamic fee in beforeSwap via a currentFeeBps view, with an elevated snipe-protection window controlled by SNIPE_DURATION and SNIPE_START_BPS constants
  • Accrues fees in afterSwap and tracks them per token in pendingFees, with claim(address) letting the recipient withdraw accrued amounts
  • Splits accrued fees between a fee recipient and a platform share set by platformShareBps and platformWallet, changeable through setFeeRecipient
  • Uses return deltas in beforeSwap and afterSwap, meaning the hook can take a portion of swap amounts directly and move currency through the pool manager during swaps
Swap behaviour
Swaps run a before-swap fee calculation and an after-swap fee accrual step; the hook can take a share of swap amounts via return deltas, so the taker of a swap pays the dynamic fee and any early-launch snipe surcharge while the surplus is routed to fee accounting.
Liquidity behaviour
Liquidity add and remove callbacks exist in the selector set but are view-only checks, so the hook does not itself mutate position accounting on liquidity changes.
Fee behaviour
Fees are dynamic: currentFeeBps(token) computes the active fee, starting high during the snipe window (SNIPE_START_BPS decaying over SNIPE_DURATION) and capped by MAX_FEE_BPS; the accrued fee is split between the fee recipient and the platform share.
Owner & admin controls
A privileged address can call setFeeRecipient(token, recipient) to redirect fee accrual for a token; platformWallet and platformShareBps are fixed or set in storage, but the exact authority that can change them could not be confirmed from bytecode alone.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize registers the token pool and its key; beforeSwap sets the dynamic fee and gates early snipers; afterSwap accrues fees and the after-swap return delta takes the fee amount out of the swap; beforeSwapReturnDelta and afterSwapReturnDelta let the hook alter the amounts settled with the pool manager.

Security & trust assessment

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

Who controls it: Whoever controls setFeeRecipient and the platform wallet settings can redirect fee revenue, and a launcher role may control launch parameters; no owner-only pause was observed.

Risk to user funds: The hook holds and transfers accrued fee balances (pendingFees) and moves currency through the pool manager during swaps, launches and claims, so user swap proceeds are reduced by its return-delta fee.

Security findings

  • [medium] Return delta fee capture: beforeSwapReturnDelta and afterSwapReturnDelta are enabled, so the hook can take tokens out of swaps before they settle, meaning swap outputs are reduced by the hook's fee.
  • [medium] Recipient redirection: setFeeRecipient(address,address) is an unguarded-looking state setter over the fee recipient mapping; if caller authorisation is weak, an attacker could redirect accrued fees.
  • [low] Snipe surcharge: The dynamic fee starts at SNIPE_START_BPS during SNIPE_DURATION, so early buyers pay a substantially higher fee than later traders.
  • [info] Self-unlock and currency movement: The hook calls unlock and modifyLiquidities on the pool manager and performs take/settle, so it moves currency during launches and fee claims.

Contract details

Verified source
No
Bytecode size
21,533 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, erc20, erc6909-claims, fee-sharing, launchpad, moves-currency, return-delta, self-unlock

Pools using Launchpad hook