Launchpad hook on Ethereum
Uniswap v4 Hook Contract 0x59ec3f5062d7475f677e685112370ea08139bfff on Ethereum · Launchpad
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 1,784 (458 traders)
- Total swaps
- 1,784
What it does
This hook appears to run a token launch pool where the owner-set fee and a platform fee are taken from swaps and liquidity flows, with launch-window limits that can block some trades, so traders and LPs likely pay more than in a plain pool, though the exact direction and size cannot be confirmed without source.
How it works step by step
- Hook is initialized on a pool via beforeInitialize and afterInitialize, recording the launch block and launch timestamp in packed storage slot 2.
- Owner-only fee setter (selector 0x61243b1b, takes uint24) updates a fee value stored in slot 2 at offset 10, indicating a dynamic per-pool fee that is applied on swaps.
- beforeSwap and afterSwap callbacks read the stored launch data and fee, suggesting launch-window logic (block cap, fee reduction via FeeNotLower and BlockCapExceeded errors) and swap-time accounting.
- Has beforeSwapReturnDelta and afterSwapReturnDelta enabled, so the hook can take or give currency deltas on swaps, used to skim a platform fee (PLATFORM_FEE, platformRevenue, treasury, collector, vault, RESERVE) and route it to other addresses.
- Liquidity callbacks with return deltas (afterAddLiquidityReturnDelta, afterRemoveLiquidityReturnDelta) indicate the hook can also take a portion of liquidity flows, and it mints ERC6909 claim tokens (mint selector 0x156e29f6) to hold these amounts.
- Exposes ownership with two-step transfer (transferOwnership, acceptOwnership, renounceOwnership), a token address, bootstrap and listener/CALLBACK_GAS getters, suggesting a token launch and fee-distribution integration.
- Swap behaviour
- beforeSwap and afterSwap run on every swap. The hook has return-delta permissions on swaps, so it can alter the amounts exchanged and take a platform fee. Exact fee and direction treatment cannot be fully confirmed from bytecode alone, and during any launch window the swap may be restricted by a block cap.
- Liquidity behaviour
- beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity run on liquidity changes. The after-hooks have return-delta permissions, so the hook can take a share of liquidity flows, with amounts tracked as ERC6909 claims.
- Fee behaviour
- A dynamic fee is stored in the hook's packed state and can be set by the owner through the uint24 setter. A platform fee (PLATFORM_FEE) is also collected and accrued as platformRevenue, routed to a treasury, collector or vault.
- Owner & admin controls
- Owner (Ownable with two-step transfer) can set the fee via selector 0x61243b1b, transfer or renounce ownership, and the owner address is stored in slot 0. Treasury, collector and vault addresses are read-only in the pure getters, so their mutability could not be confirmed from the decoded bytecode.
Enabled Uniswap v4 callbacks
beforeInitialize, afterInitialize, beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap, beforeDonate, afterDonate, beforeSwapReturnDelta, afterSwapReturnDelta, afterAddLiquidityReturnDelta, afterRemoveLiquidityReturnDelta
beforeInitialize and afterInitialize record launch parameters for the pool. beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity handle liquidity accounting and fee or delta capture. beforeSwap and afterSwap apply swap-time fee and launch restrictions. beforeSwapReturnDelta and afterSwapReturnDelta let the hook take swap deltas. afterAddLiquidityReturnDelta and afterRemoveLiquidityReturnDelta let the hook take liquidity deltas. beforeDonate and afterDonate are enabled but appear to be passive checks.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, medium confidence).
Who controls it: The owner key controls the fee setting and ownership transfer. A compromised or malicious owner could raise fees within whatever bounds the code allows, and could change ownership to a new address.
Risk to user funds: The hook can take currency through return deltas on swaps and liquidity operations and can route that value to treasury, collector or vault addresses, so user funds passing through the pool are exposed to these skims. It can also revert swaps via the block cap during launch.
Security findings
- [high] Hook takes currency via return deltas: Swap and liquidity after-hooks have return-delta permissions enabled, so the hook can skim a share of user trade and liquidity amounts into platform accounting.
- [medium] Owner-settable fee: The owner can change the stored uint24 fee through selector 0x61243b1b, which could raise fees on swaps for pool participants, subject to any bounds in the code (a FeeNotLower error exists that suggests a one-way or bounded rule).
- [medium] Launch-window swap restriction: BlockCapExceeded and launch block data indicate swaps can revert during the launch window if a block cap is exceeded, which can temporarily block trading.
- [info] Minting of ERC6909 claims: The hook mints ERC6909 claim balances, meaning accounting is held as claims against the pool manager rather than direct token transfers.
Contract details
- Verified source
- No
- Bytecode size
- 8,651 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, fee-sharing, launchpad, liquidity-management, ownable, return-delta