LaunchFeeHook
EthereumLaunchFeeHook is a Uniswap v4 hook on Ethereum. Brand new: its first pool went live today. Active: 324 trades in the last week, and 1 new pool this week.
- Contract name
- LaunchFeeHook
How this hook works
Token launcherThis hook runs a launchpad's token pools. It takes a trading fee (2% by default, never more than 5%) always in ETH or the other paired asset, never in the launched token, and sends it on to be split between the token creator and the launchpad.
Fee always paid in ETH
Normally a pool takes its fee in whatever the trader pays with, so sellers would pay in the launched token. This hook always takes its fee from the ETH side (or the other paired asset) of each buy or sell, and it replaces the pool's own fee, which is zero.
The code that does this (_plainFee):function _plainFee(PoolKey calldata key, address token, address quote, address specified, int256 amountSpecified) private returns (bytes4, int256, uint24) { if (specified != quote) return (IHooksV4.beforeSwap.selector, 0, 0); uint256 amount = amountSpecified < 0 ? uint256(-amountSpecified) : uint256(amountSpecified); uint256 fee0 = (amount * feeBps(toId(key))) / BPS; if (fee0 == 0) return (IHooksV4.beforeSwap.selector, 0, 0); _take(toId(key), token, quote, fee0); // A positive delta on the specified currency is the hook claiming it: V4 subtracts it from // what goes into the swap on an exact input, and adds it to what comes out on an exact // output. The unspecified side is left alone. return (IHooksV4.beforeSwap.selector, int256(fee0) << 128, 0); }Fees go to the token creator and launchpad
Fees build up per token inside the hook. Anyone can trigger a payout, which sends them to the launchpad's fee contract to be split between the token creator and the launchpad.
The code that does this (collect):function collect(address token, address currency) external returns (uint256 amount) { amount = accrued[token][currency]; if (amount == 0) return 0; accrued[token][currency] = 0; _collecting = true; poolManager.unlock(abi.encode(token, currency, amount)); _collecting = false; emit FeeCollected(token, currency, amount); }Two pools move together
Some tokens launch against both ETH and an NFT collection's floor token. For those, the hook routes half of every trade through the other pool inside the same swap, so the two prices stay matched and bots cannot profit from the gap. If that half fails, the trade simply goes through one pool.
The code that does this (_mirrorOnEthPool):function _mirrorOnEthPool(PoolKey calldata key, address token, address partner, address specified, int256 amountSpecified) private returns (bytes4, int256, uint24) { bytes32 id = toId(key); if (amountSpecified < 0) { uint256 amount = uint256(-amountSpecified); if (specified == address(0)) { // Buy, exact input: the fee comes off all of the ETH here (V4 does not run this hook // on the swap it makes itself, so the mirrored leg is not charged again); half of // the rest buys through PENGU, half through this pool. uint256 fee = (amount * feeBps(id)) / BPS; uint256 mirror = ((amount - fee) * MIRROR_BPS) / 10_000; try this.mirrorBuy(token, partner, mirror, type(uint256).max) returns (uint256 coinOut, uint256 ethNet) { if (fee != 0) _take(id, token, address(0), fee); emit Mirrored(token, true, ethNet, coinOut); return (IHooksV4.beforeSwap.selector, _delta(int128(int256(fee + ethNet)), -int128(int256(coinOut))), 0); } catch {} } else { // Sell, exact input: as much of the coin as PENGU's own pool can absorb near the // floor goes out through PENGU for ETH (at most half); the rest sells here. The // mirrored ETH is charged the fee now, the pool's ETH in afterSwap. uint256 mirror = (amount * MIRROR_BPS) / 10_000; try this.mirrorSell(token, partner, mirror, type(uint256).max) returns (uint256 ethOut, uint256 coinNet) { uint256 fee = (ethOut * feeBps(id)) / BPS; if (fee != 0) _take(id, token, address(0), fee); emit Mirrored(token, false, coinNet, ethOut - fee); return (IHooksV4.beforeSwap.selector, _delta(int128(int256(coinNet)), -int128(int256(ethOut - fee))), 0); } catch {} return (IHooksV4.beforeSwap.selector, 0, 0); // …Unknown pools pay nothing
The hook only charges pools that the launchpad created. Any other pool that points at this hook trades with no fee from it.
The code that does this (_launchOf):function _launchOf(PoolKey calldata key) private view returns (address, address) { ILaunchRegistry r = registry; if (address(r) == address(0)) return (address(0), address(0)); try r.tokenOfPool(toId(key)) returns (address token) { if (token == key.currency0) return (token, key.currency1); if (token == key.currency1) return (token, key.currency0); return (address(0), address(0)); } catch { return (address(0), address(0)); } }
Who controls it: A fee admin (first the hook developer) can set a different fee for a single pool, capped at 5%, and can hand the role to another address. The launchpad sets the general fee, also capped at 5% by the hook. The launchpad link is set once and can never change. The hook cannot touch liquidity and cannot be upgraded.
Based on the hook’s published code.What do these labels mean?
Safety report
Before you build on it. Automated checks, not an auditsetFeeOverrideWhat it can do
Its code executes inside each trade in pools that use it.
It can take or add tokens during a swap. Fees, burns and custom curves work this way, and so do scams.
Hook history
- Took its fee from a trade 324 times
Latest transactions
- 0xf692fdbe…76be2c block 26,427,734
- 0x77679166…180ead block 26,427,242
- 0x8a0554fa…35e8c3 block 26,427,242
- 0x63867348…1500ec block 26,427,242
- 0x9afac144…191da2 block 26,426,655
- 0xf2cfe264…a56ba4 block 26,426,343
- 0x470b0928…25dc8a block 26,426,320
- 0xeb38473c…472075 block 26,425,801
- 0xf0e7279d…eca883 block 26,425,434
- 0xb285e7c6…c4b4cf block 26,424,980
- Sent collected fees to be split between the token creator and the launchpad 4 times
Latest transactions
- 0x73cd9a03…56d079 block 26,423,207
- 0xd61e3acd…2d5ad3 block 26,423,127
- 0x575b5381…93d6db block 26,422,971
- 0xee23982e…6cf0af block 26,422,845
Counted from what the hook recorded on-chain across all its pools, for every action in its published code, plus token transfers in and out of it.