Launchpad hook on Avalanche
Uniswap v4 Hook Contract 0x179278c7ecd2cfbc003d76985ba05f11ddc36acc on Avalanche · Launchpad
- Volume (24h)
- $1.57K
- Value locked (TVL)
- $4.80K
- All-time volume
- $358.26K
- Pools using this hook
- 1
- Swaps (24h)
- 14 (8 traders)
- Total swaps
- 2,509
What it does
A launchpad-oriented Uniswap v4 hook that registers launch pools, runs module logic on swaps and liquidity changes, and takes fees for creators and the protocol.
How it works step by step
- Registers pool configuration and launch timing in beforeInitialize (openedAt, launchedAt, poolInfo storage)
- Gates liquidity additions and removals through beforeAddLiquidity and beforeRemoveLiquidity
- Runs pluggable modules on swaps via beforeSwap and afterSwap, with a module registry and disabled-module tracking
- Takes swap-time fees through return deltas and accrues creator and protocol shares as claimable balances
- Self-unlocks the pool manager to donate or move currency during hook operations
- Exposes claim and claimProtocol functions so creators and the protocol can withdraw accumulated fees
- Swap behaviour
- beforeSwap and afterSwap callbacks run module logic and use return deltas to take fees or credits, so swap amounts can be adjusted by the hook.
- Liquidity behaviour
- beforeAddLiquidity and beforeRemoveLiquidity callbacks are implemented, along with afterAddLiquidity and afterRemoveLiquidity views; the hook can gate liquidity changes and may restrict them for launch pools, exact logic unknown.
- Fee behaviour
- Fees appear to be managed by the hook's own configuration (constants MAX_BASE_FEE_PIPS, MAX_TOTAL_FEE_PIPS, MAX_CREATOR_FEE_BPS, PROTOCOL_FEE_BPS and a protocol recipient), with creator and protocol fee shares tracked in claimable balances; exact fee formulas cannot be determined without source.
- Owner & admin controls
- Owner-style controls appear present: bindRouter, bindLaunchpad, disableModule and claimProtocol write to privileged storage slots (slots 0 and 1 hold addresses that are written by admin-type selectors). The owner or launchpad binding can alter router and launchpad wiring and disable modules; no pause or upgrade function was identified from selectors alone.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize registers pool configuration and launch metadata; beforeAddLiquidity and beforeRemoveLiquidity gate liquidity changes; beforeSwap and afterSwap run module logic on swaps; beforeSwapReturnDelta and afterSwapReturnDelta let the hook take or supply currency deltas during swaps, which is used to collect fees or credits; the hook also self-unlocks the pool manager and donates or moves currency, as indicated by the take, donate and unlock selectors.
Security & trust assessment
Risk level: medium (decoded bytecode, low confidence).
Who controls it: A privileged key could bind or replace the router and launchpad, disable modules, and claim accumulated protocol fees. Storage keeps a mapping of disabled modules that can be toggled by the admin, which can change swap and liquidity behaviour for pools that depend on those modules.
Risk to user funds: The hook can take and supply currency deltas during swaps and can donate or move currency through its self-unlock flow, so pool and user funds pass through hook-controlled logic. Admin-disabled modules could block operations.
Security findings
- [medium] Hook moves currency via return deltas: Hook takes currency through return deltas and self-unlocks the pool manager, so it can move pool and user funds during swaps and liquidity operations.
- [medium] Privileged configuration and fee withdrawal: bindRouter, bindLaunchpad, disableModule and claimProtocol are privileged selectors writing to address and mapping slots, so a single key controls routing, module availability and fee withdrawal.
- [low] Module disabling can alter pool behaviour: Module-based design with a disabled mapping and a module count suggests logic can be switched off by admin, which may block swaps or liquidity actions on affected pools.
- [info] Unverified source: No verified source; analysis relies on selector names and storage inference, so exact arithmetic and access checks are unconfirmed.
Contract details
- Verified source
- No
- Bytecode size
- 23,995 bytes
- Upgradeable proxy
- No
- Detected patterns
- donates, moves-currency, return-delta, self-unlock
Pools using Launchpad hook
- AVAX / HOOK (Dynamic fee) — 24h volume $1.57K, TVL $4.80K, 14 swaps today