LaunchHook on Ethereum
Uniswap v4 Hook Contract 0xd067d6843e2da308b4ef6c693b4ebe828b7ca0cc on Ethereum · Fee sharing · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 67 (41 traders)
- Total swaps
- 67
What it does
Every trade in a launchpad pool pays a flat 1% fee in ETH, whether it is a buy or a sell, and the fee is sent to the treasury wallet.
How it works step by step
- Charges a constant 1% fee (FEE_BPS = 100) in ETH on every swap in pools registered by the factory
- Takes buy-side fees in beforeSwap when ETH is the specified currency (exact-in buy or exact-out sell) and charges the fee via return delta
- Takes sell-side fees in afterSwap when ETH is the unspecified currency (exact-in sell or exact-out buy), using the ETH leg of the balance delta
- Forwards collected ETH directly to the treasury address through PoolManager.take, so the hook does not hold fees
- Restricts pool registration and initialization to the one-time-set factory address and validates that pools are ETH/token pairs
- Tracks per-token and total collected fee amounts and emits FeesCollected events
- Swap behaviour
- Every swap in a registered pool pays 1% in ETH to the treasury. Buys (ETH specified) are charged in beforeSwap and sells (ETH unspecified) are charged in afterSwap, so both directions pay the same 1% rate and no trade is charged more or less than another based on direction.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Fee is a fixed 1% of the ETH amount on each swap, taken as a return delta and sent to the treasury; the pool's own static fee is separate. The rate is a public constant and cannot be changed by any role.
- Owner & admin controls
- The owner (Ownable2Step) can set the factory once, change the treasury address to any non-zero address, and rescue stray ETH or ERC-20 balances held by the hook. The owner cannot change FEE_BPS. Ownership can be transferred in two steps or renounced.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize restricts pool initialization to the factory and requires prior registration. beforeSwap charges the fee on buys by returning a before-swap delta. afterSwap charges the fee on sells by returning an after-swap delta. beforeSwapReturnDelta and afterSwapReturnDelta are enabled so the hook can take a share of the swap amounts.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The owner controls where all fee revenue goes via setTreasury and can sweep stray balances via rescue. The owner cannot change the 1% rate, pause swaps, or block trading.
Risk to user funds: Swappers pay a fixed 1% ETH fee on each trade in launchpad pools, sent to the treasury address. The hook does not custody fees under normal operation, but it can transfer any residual balance to the owner through rescue and the treasury can be changed to an arbitrary address.
Security findings
- [medium] Owner can redirect fees: setTreasury lets the owner change the recipient of all future fee ETH to any non-zero address at any time, with no timelock or cap.
- [info] Return deltas take value from swaps: beforeSwapReturnDelta and afterSwapReturnDelta let the hook take 1% of the ETH leg of every swap in its pools, which users pay on top of the pool fee.
- [info] One-time factory wiring: setFactory can only be called once, so the owner cannot later swap in a different factory, but a misconfigured factory address cannot be corrected.
- [low] Rescue can sweep any token: rescue lets the owner transfer any ERC-20 or ETH balance held by the contract to an arbitrary address; the hook is designed not to hold fees, so this mainly affects stray funds.
Contract details
- Verified source
- Yes (LaunchHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 4,924 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc20, launchpad, moves-currency, ownable, return-delta