StockLaunchHook
EthereumStockLaunchHook is a Uniswap v4 hook on Ethereum. Live for 3 days. Still in use: 5 trades in the last week, and 1 new pool this week.
- Contract name
- StockLaunchHook
How this hook works
Trading taxA trading tax hook. It takes a cut of every trade, keeps rewards to claim and only lets approved callers create pools.
Takes a cut of every trade
On top of the normal pool fee, it keeps a share of each trade. The fee can be changed. The fee builds up in the hook until it is collected.
The code that does this (beforeSwap):function beforeSwap(address, PoolKey calldata key, SwapParams calldata params, bytes calldata) external onlyPoolManager returns (bytes4, BeforeSwapDelta, uint24) { PoolId id = key.toId(); PoolInfo storage info = pools[id]; if (!info.registered) revert PoolNotRegistered(); bool specifiedIsZero = (params.amountSpecified < 0) == params.zeroForOne; Currency specified = specifiedIsZero ? key.currency0 : key.currency1; if (Currency.unwrap(specified) != info.stock) return (IHooks.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0); uint256 base = params.amountSpecified < 0 ? uint256(-params.amountSpecified) : uint256(params.amountSpecified); (uint256 platformAmount, uint256 creatorAmount, uint256 total) = _split(base, info.creatorFeeBps); if (total == 0) return (IHooks.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0); // exact-in: the swap proceeds with (input - fee); exact-out: the swap produces (output + fee) and we keep the fee. // The fee is held as a 6909 claim: a `take` here would try to move tokens the swapper has not settled yet. poolManager.mint(address(this), specified.toId(), total); _credit(id, info, specified, platformAmount, creatorAmount, total); return (IHooks.beforeSwap.selector, toBeforeSwapDelta(int128(uint128(total)), 0), 0); }Rewards to claim
It keeps track of what people have earned, and they claim it themselves.
The code that does this (claim):function claim(Currency currency) public returns (uint256 amount) { amount = pending[msg.sender][currency]; if (amount == 0) return 0; pending[msg.sender][currency] = 0; totalPending[currency] -= amount; poolManager.unlock(abi.encode(msg.sender, currency, amount)); emit FeesClaimed(msg.sender, currency, amount); }Only approved callers create pools
New pools with this hook can only be created by approved callers, for example its own factory or launcher.
The code that does this (beforeInitialize):function beforeInitialize(address sender, PoolKey calldata key, uint160) external view onlyPoolManager returns (bytes4) { if (sender != factory) revert NotFactory(); if (!pools[key.toId()].registered) revert PoolNotRegistered(); return IHooks.beforeInitialize.selector; }
Who controls it: The hook developer can change which launcher it works with, the wallets that receive its fees and the fee. The hook developer can withdraw funds held by the hook. Control can be passed on or given up. The code cannot be changed.
Based on the hook’s published code.What do these labels mean?
Safety report
Before you build on it. Automated checks, not an auditWhat 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.
It runs when a pool is created, often to lock in that pool’s settings.
Hook history
- Took its fee from a trade 5 times
Latest transactions
- 0xfdf70b32…7e8bec block 26,458,881 · 0.000169 QQQon
- 0xbc116fb8…7dadad block 26,458,881 · 0.000169 QQQon
- 0xd49b0bed…275276 block 26,458,881 · 0.000170 QQQon
- 0x5a57aef0…eb7359 block 26,458,879 · 0.000310 QQQon
- 0xbb81c9bc…88005e block 26,458,879 · 0.000310 QQQon
- Paid out collected fees 2 times
Latest transactions
- 0xc6f39824…7d682e block 26,458,992 · 0.00113 QQQon
- 0x08f8b35f…0c7d66 block 26,458,984 · 0.00113 QQQon
- Registered a new pool 1 time
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.