Launchpad hook on HyperEVM
Uniswap v4 Hook Contract 0x315fd47e1f5ce6188e457a97c588230842c060cc on HyperEVM · Launchpad
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $643
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 110
What it does
A launchpad-style hook that charges a decaying opening fee and a standing fee on swaps, gates trading with an owner-controlled launch sequence, and collects a portion of swap flow for fees and buybacks.
How it works step by step
- Sets a dynamic swap fee combining a decaying opening fee and a standing fee bounded by min and max limits
- Gates swaps with a launch flag and openTrading control
- Enforces a rolling window spend cap tracked in windowSpent and windowStart
- Takes a portion of swap currency through beforeSwap and afterSwap return deltas
- Accumulates ETH fee claims and tokens, withdrawn via collectFees and buyback
- Initializes the pool with a poolKey via launch(int24) controlled by the owner
- Swap behaviour
- beforeSwap computes and applies a dynamic fee and enforces trading and spend-cap gates; afterSwap updates window spend tracking and may collect or route fees, and the return-delta hooks let the hook take a cut of swap currency.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Dynamic fee: a standing fee stored in storage (bounded by MIN_STANDING_FEE and MAX_STANDING_FEE, adjustable by owner via setStandingFee) plus an opening fee (openingFee, bounded by MAX_OPENING_FEE) that decays over OPENING_DECAY starting from openedAt after trading opens. The hook overrides the swap fee via beforeSwap return values; currentFee is exposed as a view.
- Owner & admin controls
- Owner (Ownable) can set builders address, set spend cap, set standing fee, call launch(int24) to initialize the pool, transfer or renounce ownership, and trigger openTrading(). The owner can change the standing fee within MIN_STANDING_FEE to MAX_STANDING_FEE bounds and the spend cap.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: validates or sets up pool state at initialization. beforeSwap: computes the current fee and enforces trading gates such as TradingClosed and a per-window spend cap. afterSwap: updates window spend accounting and possibly collects fees or triggers buyback logic. beforeSwapReturnDelta and afterSwapReturnDelta: the hook takes or gives currency deltas during swaps, which lets it skim part of swap flow for itself.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: The owner can change the standing fee, spend cap and builders address, can renounce or transfer ownership, and controls when trading opens and when the pool is launched. A malicious or compromised owner could raise fees toward the maximum or redirect the builders role to extract value from swaps.
Risk to user funds: The hook can take currency deltas on swaps and hold ETH fee claims and tokens (it calls take and transfer). Pool funds routed through swaps can be partially captured by the hook, and owner-controlled withdrawal paths determine who can extract them.
Security findings
- [medium] Hook takes currency via return deltas: Swap return deltas let the hook take a portion of every swap as currency, and the hook calls take on the pool manager and transfers tokens, so it can hold and move pool-related funds.
- [medium] Owner-adjustable fees and spend cap: Owner can adjust the standing fee within bounds and set the spend cap and builders address, so swap economics can change after deployment without user consent.
- [medium] Fees accumulate in the hook contract: The hook accumulates ETH fee claims (ethFeeClaims) and has collectFees and buyback functions, meaning fees are held in the contract until withdrawn by the privileged role.
- [low] Owner controls trading start: Trading gating via openTrading and launched state means the owner controls when swaps are permitted at all.
- [info] Unverified source: No source is verified, so function semantics are inferred from selectors and storage only; exact fee formulas and withdrawal conditions could not be confirmed.
Contract details
- Verified source
- No
- Bytecode size
- 9,072 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, ownable, return-delta, self-unlock