MegaHook on MegaETH

Uniswap v4 Hook Contract 0xc0b267c6c35ac06c12e2e2557e4c3c86bc3120c8 on MegaETH · Launchpad · Verified contract

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$609
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
2

What it does

MegaHooks is a shared Uniswap v4 hook for a permissionless token launchpad on MegaETH that deposits a fixed 1B-token supply as locked one-sided liquidity at a chosen starting market cap, with optional anti-snipe fee decay, anti-MEV, max-tx limits, buy tax and sell burn configured per launch.

How it works step by step

  • Deploys a new fixed-supply ERC20 (1B tokens) per launch and opens a Uniswap v4 dynamic-fee pool against a whitelisted quote asset (native ETH or ERC20).
  • Deposits the entire token supply as a one-sided locked liquidity position owned by the pad with no removal path.
  • Applies an anti-snipe buy fee that decays linearly from a starting fee to the base LP fee over a configurable window.
  • Takes an optional buy tax in quote currency and an optional sell burn in tokens, splitting buy tax between creator and protocol as claimable balances.
  • Enforces optional anti-MEV (one swap per tx.origin per block) and a max-tx token cap for a configurable window.
  • Collects LP fees from the locked position and splits them between creator and protocol via claimable balances.
Swap behaviour
Exact-input swaps only; exact-output reverts. Buys use the anti-snipe-decayed fee and may take a buy tax in quote currency credited to creator and protocol claimables. Sells may burn a portion of tokens to 0xdead. Anti-MEV (one swap per tx.origin per block) and max-tx token caps are enforced when configured. Swaps from the pad itself (creator launch buy) pay only the base LP fee.
Liquidity behaviour
No liquidity callbacks are enabled on the hook. The pad deposits the entire 1B token supply as a one-sided position in the same transaction as token creation; the position is owned by the pad and has no removal path, so liquidity cannot be withdrawn. Only accrued swap fees can be collected.
Fee behaviour
Dynamic-fee pool. Base lpFee (capped at 3%) applies to all swaps. Buys use an anti-snipe fee that decays linearly from snipeStartFee to lpFee over snipeWindow (capped at 50% start, 1 hour window). Buy tax (up to 5%) is taken in quote currency and split creator/protocol as claimable balances. Sell burn (up to 5%) is taken in tokens and sent to 0xdead. Pad-executed launch buys pay only the base LP fee. LP fees from the pad position are collected via collectPoolFees and split by creatorShareBps.
Owner & admin controls
Owner (EOA set at deployment) can only whitelist quote assets with start-mcap bounds via setQuote, set creatorShareBps and creationFee for future launches via setParams, change protocolFeeRecipient, and transfer ownership. The hook owner can only call setPad once. No pause, no withdraw, no upgrade path, and no ability to change configs of existing pools. Pool configs are immutable after configure.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta

beforeInitialize: restricts initialization to the pad and requires a dynamic-fee pool. beforeSwap: enforces anti-MEV (one swap per tx.origin per block when enabled), rejects exact-output swaps, applies buy tax or sell burn via return delta, and returns the per-swap fee override. afterSwap: enforces the max-tx cap in tokens for the limits window. beforeSwapReturnDelta: allows the hook to take a portion of the input currency as a delta on buys and sells.

Security & trust assessment

Risk level: low (verified source, high confidence).

Who controls it: The owner cannot touch existing pools, positions, or user funds. Owner can redirect future protocol fee claims by changing protocolFeeRecipient (affects only future accruals plus existing claimable balances of the recipient address, since claimable is keyed by address and the old recipient keeps its existing balance), set creation fee and creator share for new launches, and whitelist arbitrary quote contracts that pass a code-length check. A malicious whitelisted quote token could be an issue for launches using it, since the pad trusts the quote's transfer behaviour.

Risk to user funds: The hook takes tokens (sell burn) and quote (buy tax) via return deltas, but only in configured percentages capped at 5% each. Those amounts are either burned or credited to claimable balances redeemable by the creator or protocol recipient. The hook holds claimable quote and token balances until claimed. The pad never allows withdrawal of the locked position. No pause or blocking mechanism exists beyond the per-swap anti-MEV and max-tx rules configured at launch.

Security findings

  • [info] Liquidity locked permanently: The pad holds the full token supply position with no removal path; liquidity is permanently locked by design, so the pool cannot be rugged through LP withdrawal.
  • [low] Owner-controlled protocol fee recipient: Owner can change protocolFeeRecipient for future fee accruals; hook-level and pad-level claimable balances are keyed by address, so funds already accrued to an old recipient remain claimable only by that address.
  • [low] Quote whitelist trusts arbitrary contracts: setQuote accepts any non-EOA address as a quote (only a code-length check). A malicious or non-standard token could cause launches using it to behave unexpectedly, though the owner controls which quotes are enabled.
  • [info] Trader-facing fee and limit modules: Buy tax (up to 5%) and sell burn (up to 5%) and anti-snipe fee (up to 50%, decaying) are set per launch at creation and cannot be changed afterwards, but high anti-snipe fees and max-tx caps can meaningfully restrict early buyers.
  • [info] Anti-MEV restricts routing: Anti-MEV allows one swap per tx.origin per block, which can block smart contract routers from trading the same pool more than once per block when enabled.

Contract details

Verified source
Yes (MegaHook)
Compiler
solc 0.8.28+commit.7893614a
Bytecode size
9,383 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, mev-protection, moves-currency, return-delta, tax

Pools using MegaHook