Launchpad hook on Ethereum
Uniswap v4 Hook Contract 0x4547a0f6f5d975d863f4964bb00b5031ed90e8cc on Ethereum · Launchpad
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 78 (36 traders)
- Total swaps
- 78
What it does
This launchpad hook takes a tax from swaps in its pools, splitting the accrued amount between the creator and the platform, so traders pay the tax and liquidity actions are gated by its callbacks.
How it works step by step
- Acts as a launchpad hook that registers pools via initialize and beforeInitialize, storing per-token configuration in mappings keyed by token id
- Takes a dynamic tax on swaps through beforeSwap, with the swap fee read from a stored per-pool value and quoted through quoteFee
- Uses beforeSwapReturnDelta and afterSwapReturnDelta to skim a portion of swap amounts into hook-held accounting, tracked in platformAccrued and creatorOwed balances
- Accrues creator fees and platform fees, with claimCreator letting the creator withdraw owed balances and flush moving accrued funds onward to a fee vault
- Uses ERC-6909 claims via mint and take calls to represent hook-held currency, and restricts some entry points to the launchpad through NotLaunchpad checks
- Tracks liquidity add and remove callbacks (beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity) and a protection parameter, likely limiting early liquidity actions
- Swap behaviour
- Swaps are gated in beforeSwap, a tax is taken via return deltas in beforeSwap and afterSwap, and the taxed amount is recorded for creator and platform accounting; which trade direction pays more cannot be determined from the bytecode.
- Liquidity behaviour
- Liquidity add and remove calls are hooked; beforeAddLiquidity and beforeRemoveLiquidity return selectors that appear to gate or validate positions, and after-callbacks update accounting.
- Fee behaviour
- Fees are set per pool via stored configuration and quoted by quoteFee; a platform fee (PLATFORM_FEE_PIPS, BPS/PIPS denominators) and creator share are taken from swaps and accrued to platformAccrued and creatorOwed, then flushed to the fee vault.
- Owner & admin controls
- initialize can be called to set the launchpad, pool manager and token configuration; claimCreator is callable by creators for their own balance; flush moves accrued funds to a fee vault address; no owner pause or upgrade function was clearly identified, and an unidentified admin path is possible from the untagged selectors.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize registers the pool configuration; beforeAddLiquidity and beforeRemoveLiquidity validate liquidity changes; beforeSwap applies the tax and gating; afterSwap records fees; beforeSwapReturnDelta and afterSwapReturnDelta let the hook take a share of swap currency; afterSwapReturnDelta also moves funds into hook-held accounting.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: A privileged launchpad or deployer key may control pool initialization, token configuration and where accrued platform fees are flushed, which can change the fee split or redirect accrued funds.
Risk to user funds: The hook holds ERC-6909 claims and accrued creator and platform balances, and its return-delta callbacks can take a portion of swap currency, so trader funds passing through taxed pools are partially retained by the hook until claimed or flushed.
Security findings
- [medium] Hook takes swap currency via return deltas: beforeSwapReturnDelta and afterSwapReturnDelta are enabled and the bytecode records taxed amounts, so the hook extracts a share of every swap that routes through the pool.
- [medium] Unverified initialization and configuration: initialize(address,address) and tokenConfig/poolConfig storage is writable from bytecode alone; if initialization is not restricted to a trusted launchpad, a third party could misconfigure pool parameters.
- [low] Fund flush to external vault: flush(uint256) and fund/recordFees calls move accrued balances to feeVault, so the destination of accrued fees depends on the vault address configured at deployment.
- [info] Untagged selectors not decoded: Several view and nonpayable selectors have no known names, so their privileges and effects could not be fully confirmed.
Contract details
- Verified source
- No
- Bytecode size
- 10,492 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, launchpad, liquidity-management, moves-currency, return-delta, tax