What Auditing pump.fun, MetaDAO and Metaplex Genesis Taught Me About Launchpads

Mahdi Rostami · Dec 2, 2026 · 17 min read
What Auditing pump.fun, MetaDAO and Metaplex Genesis Taught Me About Launchpads
Tags · security · solana · launchpads · defi

I audited pump.fun, MetaDAO and Metaplex Genesis, as well as other Solana launchpads, and here is what they taught me: the same classes of issues recur across launchpads.

This article is written for both developers and auditors. It covers what a launchpad actually is, where it breaks, and what builders and reviewers should look for.

A launchpad is not an AMM with extra steps. It is a state machine that takes user funds, prices a new token, and then tries to become a normal market without losing money, fairness or liveness along the way.

What a launchpad actually has to get right

Almost every Solana launchpad is some combination of six parts:

  1. A mint, created by the program or supplied by the creator.
  2. A sale mechanism: a bonding curve, a fixed-price raise, a launch pool, a presale, or a hybrid.
  3. A completion rule: a market-cap target, a time window, or a minimum raise.
  4. A migration, which moves the remaining tokens and the raised quote into an AMM, a lockup, a treasury, or all three.
  5. Fee and authority logic: protocol, creator and partner fees, and any administrative override.
  6. Refund and claim paths. A sale can fail, and users still need their money back.

The rest of this article follows those parts in the order.

pump.fun: the standard launchpad model

pump.fun is probably the best-known launchpad on Solana. Its platform lets users create a new memecoin, with the creator supplying a fresh mint address, typically generated to end in pump. The program initializes that mint as part of the launch. The sale mechanism is a bonding curve: users buy and sell against a mathematically defined price curve during the launch period. Buying moves the price up the curve; selling moves it back down. The curve is configured around a market-cap target. Once its sale allocation is sold out, liquidity migrates to PumpSwap, pump.fun's own AMM, and the resulting LP tokens are burned.

For this generation of Solana memecoin launchpads, pump.fun is the OG and a useful baseline. Many other launchpads follow the same core idea, then change individual mechanisms to differentiate themselves: a different quote mint, a different sale mechanism, different completion rules, and so on. Those changes are often where the interesting audit questions begin.

Where launchpads break

Every stage of a launch has its own failure mode
Every stage of a launch has its own failure mode

1. The mint

A launchpad always launches a mint, and there are two ways in which it can be initialized. Either, the creator supplies an existing mint account to the program, or the program takes a system account and initializes the mint itself. Neither path is safe by default. The mint still needs its decimals, supply, authorities and extensions set correctly. It is quite common that the mint is not a PDA because the launchpad wants to use keys with a pre- or suffix such as -pump for mints launched via pumpfun.

When the mint is provided by the creator, the program needs to ensure that all parameters are set correctly. Most important is that the creator hasn't pre-minted supply and that all authorities are properly transferred to the launchpad. Other than that, the same following checks have to be done on a creator-supplied mint and on a program-created mint:

Decimals and supply assumptions. Curve parameters are calibrated for specific decimals and a specific total supply. A mint with 0 or 12 decimals, or a supply other than the constant the curve was written for, skews every price, often by orders of magnitude.

Retained mint and freeze authority. A creator who keeps mint authority can issue new supply and sell it into the curve or the pool, diluting every buyer. A retained freeze authority can freeze any account, including the program's vaults and the migrated pool, halting sells, claims and migration. So it is important that both authorities are set to the launchpad.

Mutable metadata. An update authority left with the creator can change the name, symbol and image after trading begins. It is not a loss of funds, but it is how one launch impersonates another.

Token-2022 extensions. Extensions change what a transfer means. A transfer fee delivers less than was sent, a transfer hook runs external code and can make sells or migration fail at will. a permanent delegate can move tokens out of any account, including the curve vault. A program that accepts Token-2022 must allowlist the extensions it supports and reject the rest. The close mint extension is one of those dangerous ones as well, as an attacker could pass a closable mint with no additional extensions, initialize the launch, and then close and recreate the mint account with blacklisted extensions to bypass all the checks that are only done on initialization.

Token program validation. The token program must be the expected one. Accepting SPL Token and Token-2022 without distinguishing them is a common route to substitution.

What to check: the mint is created in the launch instruction where possible, with program-chosen decimals and supply, mint and freeze authority on a PDA or revoked, and metadata locked. an external mint is checked for the same properties before the sale starts, and every mint and token account in every instruction is tied to stored launch state.

2. The sale math fails in small, farmable ways

Virtual and real reserve confusion. Bonding curves usually price against virtual reserves and settle against real ones. Mixing the two, or letting virtual reserves fall below real reserves or total supply, breaks the invariant the rest of the program relies on.

Rounding in the user's favour. Payouts that round up, charges that round down, or a quantity rounded on one side of a transfer and exact on the other. Each error is small, but it compounds with every trade and can be farmed. generally we should have a policy on this.

Fees and outputs that round to zero. A percentage fee computed with floor division is zero for small enough trades, so splitting a trade avoids it. The same small trade may return zero output while still consuming input.

Overflow and truncation. Intermediate products beyond 64 bits and narrowing casts from 128-bit values silently drop high bits. A truncated denominator can make a user's share look larger than it is, which is a direct path to draining a pool. Unchecked accumulators, such as total supply or total raised, carry the same risk.

Inverted operands and precision loss. A price expressed as tokens per SOL where SOL per token is required, amounts of different decimals combined without scaling, or division performed before multiplication.

Empty states and unbounded parameters. The first trade, the first liquidity deposit and the last trade are where a reserve is most likely to be zero. Fees up to 100%, basis points above 10,000, zero reserves and caps that count only some of what they limit are equally dangerous.

What to check: one rounding policy applied everywhere (payouts down, charges up, both sides of a transfer from one value). 128-bit checked arithmetic with a single checked conversion at the end. every parameter bounded against the invariant it affects, and tests with thousands of minimal trades plus one trade for the entire remainder.

3. Exact-in and exact-out should be equivalent

Launchpads often offer both exact-in (spend a fixed amount, receive at least a minimum) and exact-out (receive a fixed amount, pay at most a maximum). They are not two wrappers around one formula: they differ in where the fee is taken, which way rounding leans and which slippage argument actually protects the user.

Exact-in Exact-out
Program computes amount out, rounded down amount in, rounded up
Slippage bound minimum out, on the net amount after fees maximum in, on the gross amount including fees
Reserve check computed output within reserves requested output within reserves, before state changes

The failures come from the two paths drifting apart. A check such as fee-recipient validation or the reserve bound exists in only one entry point. slippage is compared with the gross amount while the user receives the net. one path takes the fee from input and the other from output, so the same intent yields two prices. the rounding differs, and a trader alternates between paths to extract the difference.

What to check: both paths should share one settlement routine for fees, bounds, validation and transfers. The last-fill explained in the next section should work the same on both paths. Client SDKs cannot confuse token and quote amounts. A round trip through both paths should never be profitable, fuzzing tests can be helpful as well. (Reach out if you need help with implementing fuzzing, we're glad to help!)

4. The last fill is not a normal trade

One of the most dependable sources of launchpad findings is the completing trade: the buy that empties the curve, reaches the raise cap or crosses the graduation threshold. The user asks for more than remains, the program clamps the fill, but fees, creator fees or rent top-ups were already computed on the original amount. The last buyer pays a fee on value they never received, or, in the opposite error, is undercharged and the migrated pool is short.

Oversized buys rejected. If a buy larger than the remainder reverts instead of being clamped, only a trade of exactly the right size can complete the curve, and anyone can make it fail by buying a small amount first.

Off-by-one completion. Treating "sold equals supply" as already complete makes the last unit unsellable, the opposite error lets trading run past the limit. A remainder too small to buy at a non-zero cost leaves the curve permanently just short of graduation.

What to check: clamp first, then compute fees, then transfer, and re-check slippage against the adjusted amounts. clamp oversized buys rather than reverting, record completion in the same instruction that consumes the last unit. treat an untradeable residual as complete, and test the last token and last lamport, including with a one-unit front-run.

5. Fees are a second pricing function

Fee bugs are rarely a matter of 1% instead of 100 basis points. They are structural, because a launchpad often has several fee types, several recipients and several places where fees are charged.

  • Mispriced: a fee denominated in one asset and charged in another uses an inverted or stale conversion.
  • Duplicated: a fee meant once per launch is charged once per pool, allocation or tranche.
  • Changeable mid-launch: a fee setting without a signer check, or one an authority can change while a launch is live, lets someone raise the fee a pending buyer is about to pay.
  • Misdirected: collection paths send fees to different recipients, or accept the recipient as an argument instead of reading it from configuration.
  • Larger than the flow: a fee that can exceed the amount it is taken from makes settlement revert and leaves funds stuck.
  • Computed before the clamp (section 4), or rounding to zero (section 2).

What to check: every fee has one defined base, one rounding direction and one recipient from configuration. fees are bounded and cannot exceed their base, fee parameters are fixed while a launch is live. and every fee path is followed until tokens land in the intended wallet.

6. Graduation is an integration, not a boolean

When the curve completes, the program usually calls into an AMM to create a pool, seed reserves and burn or lock LP tokens. This is where a launchpad stops being self-contained and inherits another program's accounts and failure modes.

Premature migration. Migration is callable before completion, or completion can be simulated by sending funds directly to the curve. The pool opens at whatever ratio exists, and the caller trades against it first.

Manipulable price inputs. Deposited amounts come from raw balances anyone can inflate by donation, or from caller arguments. An authority that may supply the final raise can set any opening price, and any gap in that authority check is directly exploitable.

Price discontinuity. The pool is seeded at a ratio different from the curve's final marginal price, for example by pricing it from real reserves when the curve priced against virtual ones. The difference is immediate arbitrage.

Pool pre-creation. Pool addresses are often derived from the token pair. A third party who creates the pool first sets its price, and migration then fails or deposits into a pool the attacker has priced.

Blocked migration. Deterministic accounts can be prefunded (section 8), creator configuration validated only at completion can fail forever, and an external call can exceed compute limits. Without an alternative path, user funds stay locked.

Integration and cleanup errors. Unvalidated AMM accounts, unchecked deserialization, unaccounted wrapped SOL, LP tokens not burned or locked as claimed, curve instructions still callable after migration, and residual balances never swept.

What to check: migration is impossible before completion and possible afterwards even if the creator is gone. The pool opens at the curve's final marginal price, funded from real reserves net of fees. No price input comes from a caller or a donatable balance, an existing pool at the derived address is handled. LP tokens are burned or held by a PDA that cannot withdraw, and the curve is dead after migration. Testing only a successful migration of a standard SPL mint is not testing migration.

7. Time boundaries are off-by-one bugs with money inside them

Launchpads are full of time windows: start, end, claim start, cooldowns, grace periods. Each instruction usually compares the clock on its own, and the bugs live in the second where two comparisons agree.

The classic mistake is an inclusive comparison on both sides of one boundary: deposits allowed at or before the end, settlement allowed at or after it. At the exact end second both are legal, and whoever lands first can deposit, settle, claim or close. If the end also equals the claim start, a flash-loaned deposit can claim a disproportionate share and be withdrawn within the same transaction.

Two related patterns have the same shape. An authority required only until a grace period expires, after which any signer can supply the value it was meant to control, turns a timeout into an unauthenticated admin function. And a cap shared between on-chain and off-chain sales lets a small on-chain buy push the total over the limit just before settlement, making it revert.

What to check: each phase is a half-open interval defined once and used everywhere. At every boundary second exactly one action can succeed, deposit and claim windows are disjoint. Authority timeouts fall back to computed values, never caller input, and parameters a running process depends on are frozen until it finishes.

8. Front-running is not only sniping the first buy

Snipers in the opening slot are the obvious MEV story. The quieter cases appear in initialization, pricing and completion. Solana has no public mempool in the Ethereum sense, but it has leaders, bundles and relays that see transactions before they land.

  • Initialization races. The mint is created in one transaction and the launch, derived only from that mint, in the next. An observer initializes the launch first with themselves as authority, and the real creator is locked out. Open global initializers have the same weakness.
  • Prefunded addresses. Creating an account through the System Program fails if the address already holds lamports, so any deterministic account a flow must create can be blocked in advance for a few lamports. Initialize-if-needed paths that write fields unconditionally let a caller overwrite an existing account's authority.
  • Sandwiches and changed terms. Trades without a meaningful slippage bound, and fees, parameters or reference prices that can change between signing and landing.
  • Donation-based pricing. A price that includes a balance anyone can deposit into can be moved within the victim's own transaction.
  • Launch sniping. The first transactions buy the curve's lowest prices, often through many wallets in one bundle. This is a design decision more than a code defect, and it should be made explicitly.

What to check: the mint and launch are created in one instruction, with the launch derived from a program-created mint or from the creator and a nonce. Global initializers are restricted. Account creation tolerates prefunded lamports and initialize-if-needed writes identity fields only once. Every trade carries a user-signed bound and outcome-affecting parameters are fixed while a launch is live.

9. State machines fail closed in the wrong direction

Launchpads move through many states: live, ended, settled, funded, claimable, refunding, migrated. The dangerous pattern is a one-way transition that can be taken too early, by anyone, with incomplete information.

  • Repeated claims: a claim that does not record that it was made pays the same position again until the vault is empty.
  • Premature settlement: allocations computed before every inflow is recorded, with the first caller fixing a wrong result permanently.
  • Irreversible pushes: an account marked funded before tokens arrive, after which the real deposit path rejects it.
  • Completion that cannot complete: finalization calls an external program that rejects the creator's configuration, so it is permissionless in theory and impossible in practice.
  • Dust-blocked exits: a withdrawal that closes the user's token account fails once anyone sends that account a single token. Refunds that require an associated token account fail for users who deposited from another account.
  • No refund path: a failed launch with no way for contributors to recover funds without an administrator.

Liveness is a security property here. A raise that can neither complete nor refund is a loss of funds.

What to check: the state machine is drawn with every permissionless transition marked, every success path has a failure path that does not depend on an administrator. Creator-supplied data is validated at initialization. Claims are one-shot (flag set, account closed or receipt burned). No exit depends on closing an account outsiders can send tokens to, and anything anyone can call is idempotent and never moves a position backwards.

Checklist

For builders before launch and for auditors at the start of a review:

  • Who creates the mint, and who holds mint, freeze and metadata authority afterwards? Which Token-2022 extensions are accepted?
  • Does every rounding operation favour the protocol, and is all intermediate arithmetic checked?
  • Do exact-in and exact-out share one settlement routine, with slippage on the correct quantity?
  • Is the completing trade clamped before fees are computed, and is completion recorded atomically?
  • Does every fee have one base, one bound and one recipient read from configuration?
  • Can migration run only after completion, at the curve's final price, from real reserves, and does it survive a pre-created pool?
  • At every boundary second, can exactly one action succeed?
  • Can any account be created first by an observer, or blocked by prefunding its address?
  • Can every position reach claim or refund through its owner alone, and can completion and refund each be blocked?
  • Does every instruction that changes a wallet's position require that wallet's signature?
  • After migration, can the curve still be traded, and what balances are left behind?

None of this makes a token a good investment. It only makes the machine honest about what it is doing.