B20LaunchHook on Base

Uniswap v4 Hook Contract 0x71028ea6999e2c415b46cc022ed0a9fdca2e2044 on Base · Launchpad · Verified contract

Volume (24h)
$872
Value locked (TVL)
$1.86K
All-time volume
$905.00K
Pools using this hook
2
Swaps (24h)
30 (17 traders)
Total swaps
6,562

What it does

A launchpad hook that only lets its vault open ETH/token pools, takes a fixed 1% fee on swaps, and splits accumulated fees between the protocol and the token creator, with optional buybacks that burn tokens.

How it works step by step

  • Gates pool initialization so only the launchpad vault can open a pool that uses this hook, and only with native ETH as currency0
  • Takes a fixed 1% (HOOK_FEE_BPS) of each swap's unspecified side and accumulates it per token
  • Settles accumulated fees: protocol receives PROTOCOL_SHARE_BPS, creator receives the rest, minus any creator-configured buyback share
  • Executes permissionless ETH-to-token buybacks bounded by a 150 bps price limit and sends bought tokens to the dead address
  • Exposes pull-based claims (claimEth, claimToken and their For variants) for protocol and creator balances
Swap behaviour
In afterSwap, takes 1% of the unspecified-currency amount into the hook via PoolManager.take, records it as a pending fee for the token, and returns it as a positive return delta. Buyback swaps are excluded from the fee.
Liquidity behaviour
No liquidity callbacks. The hook does not add or remove liquidity; liquidity in the launch pool is seeded and managed by the vault.
Fee behaviour
Takes a fixed 1% (HOOK_FEE_BPS=100) of the unspecified-currency side of every swap in the launch pool, taken via PoolManager.take into pending accumulators. settle() splits pending fees: protocol gets PROTOCOL_SHARE_BPS, creator gets the remainder, and creator ETH may be diverted to a buyback fund per buybackBps. Buybacks are capped at 150 bps of sqrt-price movement per execution.
Owner & admin controls
No owner or pause functions in the hook. Immutable parameters are set at deploy: POOL_MANAGER, VAULT, FEE_RECIPIENT, PROTOCOL_SHARE_BPS. HOOK_FEE_BPS is a constant at 100 bps. Per-token buybackBps is set only by the VAULT via configureToken (creator-controlled share of creator fees). Pool opening is restricted to the VAULT.

Enabled Uniswap v4 callbacks

beforeInitialize, afterSwap, afterSwapReturnDelta

beforeInitialize: gates pool creation so only the VAULT can initialize pools using this hook with native ETH as currency0. afterSwap: skims 1% of each swap's unspecified side. afterSwapReturnDelta: lets the hook take that 1% from the swap delta so it is settled to the hook.

Security & trust assessment

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

Who controls it: No privileged owner key in the hook. The VAULT can configure per-token buyback percentages and open pools. Anyone can call settle, executeBuyback (with caller-supplied minTokensOut, bounded by price limit), and claim functions. Creator address is read from the vault, so vault correctness is critical.

Risk to user funds: The hook holds accumulated protocol and creator fee balances (ETH and launch tokens) until settled and claimed, and burns buyback tokens to the dead address. It takes a 1% cut from swap deltas. It cannot move LP liquidity directly and has no pause or upgrade path. Swaps depend on the return-delta behaviour being correct.

Security findings

  • [medium] Return-delta sign not verified on-chain: afterSwap takes 1% of every swap in the launch pool and returns it as a positive return delta; the sign convention is inferred from v4 sources and is noted in the code as unverified on-chain, so a wrong sign would revert swaps rather than steal funds.
  • [low] Permissionless buyback is sandwichable within price bound: executeBuyback is permissionless and buys tokens with accumulated ETH, sending them to the dead address; slippage is bounded by a price limit of 150 bps derived from the same-transaction spot price, which an attacker can move in a sandwich, limiting but not eliminating loss per call.
  • [low] Stray ETH cannot be recovered: ETH sent directly to the contract via receive() is unrecoverable; no rescue function exists. Pending accounting ignores the contract balance.
  • [info] Vault can set buyback share to 100% of creator ETH: The VAULT can set buybackBps up to 10000 per token, diverting all creator ETH fees into token buybacks and burns.
  • [info] Address-bound permissions: Hook address must have the matching 14 low bits (CREATE2-mined) and is bound to constructor arguments; mismatch causes deploy failure rather than runtime risk.

Contract details

Verified source
Yes (B20LaunchHook)
Compiler
solc 0.8.20+commit.a1b79de6
Bytecode size
7,470 bytes
Upgradeable proxy
No
Detected patterns
launchpad, liquidity-management, moves-currency, return-delta, self-unlock

Pools using B20LaunchHook