Launchpad hook on Ethereum
Uniswap v4 Hook Contract 0xc8448321cb557659c623b962024639071d9ce0c4 on Ethereum · Launchpad
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
This hook charges a dynamic fee on swaps and caps how much any address can buy in the early launch window, with the fees paid to a treasury, so early large buyers pay more and ordinary trades pay the base fee.
How it works step by step
- Hook is attached to pools at initialization (beforeInitialize/afterInitialize) and appears to register launch parameters per pool, tracked by a launches mapping keyed by bytes32.
- beforeSwap gates buys with a per-block limit: it records the last swap block per pool and address and enforces a maximum buy size expressed in basis points (MAX_BUY_BPS).
- afterSwap can take a return delta (afterSwapReturnDelta enabled), so a portion of swap output may be diverted from the trader rather than passed through.
- Fees are computed from a base LP fee plus a dynamic component, capped by MAX_TOTAL_FEE, and accrued per address as pendingFees.
- Accumulated fees are swept to a treasury address via sweepFees, using the pool manager's unlock callback and ERC6909 claim minting and burning.
- Tracks how much each address has bought within a window (boughtInWindow) to enforce anti-sniping limits in the first blocks after launch.
- Swap behaviour
- Swaps are gated in beforeSwap: buys that exceed the per-address window or per-block limit are rejected, and the last swap block is recorded. In afterSwap a return delta may be applied, so part of the trade is captured by the hook (likely fees for the treasury or pair currency). Exact amounts depend on storage values not visible in decoded form.
- Liquidity behaviour
- Liquidity add and remove callbacks (beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity) are present as selectors but their hook permissions are not enabled, so the pool manager does not call them. Liquidity is not restricted by this hook.
- Fee behaviour
- Fees are dynamic: a base LP fee (BASE_LP_FEE) is adjusted per swap with a cap at MAX_TOTAL_FEE, and fee amounts are tracked per address in pendingFees and paid out via sweepFees to the treasury. Fees are likely higher on early or large buys and lower otherwise, but the exact curve cannot be confirmed from decoded bytecode.
- Owner & admin controls
- A treasury address is exposed and receives swept fees; sweepFees is callable and transfers accrued fees to the treasury. No owner, pause or upgrade functions were clearly identified in the decoded selectors, but this cannot be ruled out from bytecode alone.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, afterSwapReturnDelta
beforeInitialize and afterInitialize register launch state for each new pool; beforeSwap enforces buy limits and records swap blocks; afterSwap applies the return delta that takes a share of swap value; afterSwapReturnDelta is what allows the hook to take currency from swaps.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: No clear owner key was identified, so centralization appears limited; if the treasury or launch parameters are set by a privileged role, that role could alter fee destinations or limits, which was not verifiable here.
Risk to user funds: The hook takes a share of swap value through the return delta and holds accrued fees as ERC6909 claims before sweeping them to the treasury, so trader proceeds are partly routed to the hook; it can also block buys, but it cannot be confirmed to move LP principal.
Security findings
- [medium] Return delta takes swap value: afterSwapReturnDelta is enabled and afterSwap can alter the returned delta, so the hook can capture part of each swap's output from traders.
- [medium] Buy limits can block swaps: beforeSwap can revert buys that exceed MAX_BUY_BPS or the per-block and per-window limits, which may block trading during the launch window.
- [low] Fee cap is configurable at deploy: Fees are bounded by MAX_TOTAL_FEE, but the exact cap and base fee values are read from storage or constants that could not be decoded here.
- [info] Treasury sweep permission not verified: sweepFees(address) moves accrued fees to the treasury; whether it is restricted to a privileged caller could not be confirmed from bytecode.
Contract details
- Verified source
- No
- Bytecode size
- 11,415 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc20, erc6909-claims, launchpad, moves-currency, return-delta, self-unlock
Pools using Launchpad hook
- SIGMOID / IMD (1.25% fee) — 24h volume $0, TVL $0, 0 swaps today