Launchpad hook on Ink

Uniswap v4 Hook Contract 0x9c40b912c8aa15538357406c40c072e340906a80 on Ink · Launchpad

Volume (24h)
$3.90K
Value locked (TVL)
$16
All-time volume
$3.90K
Pools using this hook
3
Swaps (24h)
67 (13 traders)
Total swaps
67

What it does

This launchpad hook charges a higher sniper fee on swaps soon after a pool launches and then a standard fee set by its configuration, so early traders on new pools pay more while later traders pay the normal rate.

How it works step by step

  • Exposes a launchpad() getter and a NotLaunchpad() error, indicating the hook is meant to be used by a launchpad contract that registers and configures pools.
  • Stores per-pool configuration (configs(bytes32)) and a current fee (currentFees(bytes32)) keyed by pool id, with a dedicated fee setter (selector 0xb0914f07) that writes to the fee storage.
  • Tracks lastSwapBlock(bytes32) per pool and updates it during beforeSwap, enabling same-block or block-based sniper detection.
  • Applies a sniper fee in the early period after launch, bounded by MAX_SNIPER_DURATION and MAX_SNIPER_FEE_BPS, then falls back to a normal fee capped by MAX_FEE_BPS.
  • Validates pools in beforeInitialize and beforeSwap, reverting with UnknownPool() for pools that are not registered with the hook.
  • Gates liquidity callbacks (beforeAddLiquidity, beforeRemoveLiquidity) so that liquidity changes can be restricted to the launchpad flow.
Swap behaviour
beforeSwap is nonpayable and writes lastSwapBlock for the pool. Swaps in the early launch window appear to pay a higher sniper fee, while later swaps pay the configured current fee. Exact fee amounts depend on storage values not visible in the decoded input, so the direction of any price effect cannot be fully confirmed.
Liquidity behaviour
beforeAddLiquidity and beforeRemoveLiquidity are present and view-only in the decoded signatures, suggesting they check permissions or pool registration and then revert or allow the action without changing hook state.
Fee behaviour
The hook returns a dynamic fee: a sniper fee for swaps in the launch window (bounded by MAX_SNIPER_FEE_BPS) and a stored currentFees value afterwards (bounded by MAX_FEE_BPS). The fee is set through the nonpayable selector 0xb0914f07 that writes storage slot 0.
Owner & admin controls
The fee-setting selector 0xb0914f07 is nonpayable and writes to storage, so some privileged caller (likely the launchpad or an owner) can update fees. The access-control check on this function could not be confirmed from bytecode; no pause or upgrade mechanism was identified.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap

beforeInitialize registers and validates the pool at creation. beforeAddLiquidity and beforeRemoveLiquidity gate liquidity changes. beforeSwap applies the dynamic fee and records the last swap block for sniper detection.

Security & trust assessment

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

Who controls it: A privileged key controlling the fee setter or the launchpad address could change fees on registered pools within the configured caps, and could affect which pools are accepted.

Risk to user funds: The hook does not appear to take custody of tokens or use return deltas. Its main exposure is fee adjustment on swaps and possible reverts that block swaps or liquidity actions for registered pools.

Security findings

  • [medium] Unverified fee setter access control: A nonpayable function (0xb0914f07) writes the fee storage slot, and the decoded bytecode does not make clear whether it is restricted to the launchpad. If unrestricted or weakly restricted, anyone could set fees on pools.
  • [medium] Dynamic fee can be raised up to configured caps: Fees are bounded by MAX_FEE_BPS and MAX_SNIPER_FEE_BPS constants, which limits but does not eliminate the impact of a privileged fee change on swappers.
  • [info] Launch-window sniper gating by block: lastSwapBlock is used to identify early or same-block trading, a neutral mechanism that depends on block timing and can be bypassed or affected by block builders.
  • [info] Pool registration dependency: UnknownPool and NotLaunchpad reverts mean the hook only serves pools it recognises, so misconfiguration could block swaps or liquidity changes for specific pools.

Contract details

Verified source
No
Bytecode size
4,124 bytes
Upgradeable proxy
No
Detected patterns
launchpad, mev-protection

Pools using Launchpad hook