Fair-launch on Uniswap v4 — in one transaction.
TokenLaunchHook enforces anti-snipe, dynamic buy/sell tax, conditional liquidity lock, and an optional whitelist — without touching your ERC-20. This studio launches a campaign and shows you exactly which hook callback enforces each rule. It is a live demo of the hook.
What the hook does
During the window, caps the per-transaction buy size to maxBuyAmountIn and blocks exact-out buys. Sells are never restricted.
Returns a dynamic LP fee per swap, computed from the linear tax decay (asymmetric buy vs sell). Requires the pool's dynamic-fee flag.
_afterSwap accumulates pair-side volume; _beforeRemoveLiquidity blocks the governance NFT from exiting until the time/volume unlock conditions (AND/OR) are met.
Until whitelistEndTime, rejects swaps and liquidity adds from non-whitelisted addresses. Removing liquidity is always allowed.