Skip to content
cccskills
FreePublished on GitHub

pump-token-lifecycle

Full token lifecycle from creation through bonding curve trading, graduation detection, AMM migration, fee collection, and volume tracking on Solana using PumpSdk and OnlinePumpSdk.

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md4.6 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Token Lifecycle — Create, Trade, Graduate, Migrate & Collect

Manage the full lifecycle of Pump tokens from creation through bonding curve trading, graduation detection, AMM migration, fee collection, and volume tracking — using the offline PumpSdk and online OnlinePumpSdk.

Context

Pump tokens follow a defined lifecycle: creation → bonding curve trading → graduation (when market cap reaches threshold) → AMM migration → AMM trading. The SDK provides instruction builders for each phase, with both offline (no RPC) and online (live fetches) variants.

Lifecycle Phases

Phase 1: Token Creation

// V2 creation with Token-2022 (preferred)
const ix = await PUMP_SDK.createV2Instruction({
    mint, name, symbol, uri, creator, user,
});

// Create and immediately buy in same transaction
const ixs = await PUMP_SDK.createV2AndBuyInstructions({
    global, feeConfig, mint, name, symbol, uri,
    creator, user, solAmount, amount, slippage
});
  • createInstruction (v1) is deprecated — use createV2Instruction (Token-2022)
  • Token-2022 enables advanced token features (transfer hooks, confidential transfers)
  • Mayhem mode tokens use additional Mayhem program PDAs

Phase 2: Bonding Curve Trading

// Buy
const { bondingCurve } = await onlineSdk.fetchBuyState(mint, user);
const amount = getBuyTokenAmountFromSolAmount({ global, feeConfig, mintSupply, bondingCurve, amount: solAmount });
const ixs = await PUMP_SDK.buyInstructions({ global, bondingCurveAccountInfo, bondingCurve, associatedUserAccountInfo, mint, user, solAmount, amount, slippage: 1 });

// Sell
const solAmount = getSellSolAmountFromTokenAmount({ global, feeConfig, mintSupply, bondingCurve, amount });
const ixs = await PUMP_SDK.sellInstructions({ global, bondingCurveAccountInfo, bondingCurve, mint, user, amount, solAmount, slippage: 1 });

Phase 3: Graduation Detection

const bondingCurve = await onlineSdk.fetchBondingCurve(mint);
if (bondingCurve.complete) {
    // Token has graduated — must migrate to AMM
}

Phase 4: AMM Migration

const extendIx = await PUMP_SDK.extendAccountInstruction({ bondingCurvePda, bondingCurveAccountInfo });
const migrateIx = await PUMP_SDK.migrateInstruction({ mint, creator });

Phase 5: Post-Migration (AMM Trading)

After migration, the SDK's "BothPrograms" methods handle trading transparently across Pump and PumpAMM.

Phase 6: Creator Fee Collection

const ixs = await onlineSdk.collectCoinCreatorFeeInstructions(creator);
const balance = await onlineSdk.getCreatorVaultBalanceBothPrograms(creator);

Key Constants

ConstantValueDescription
PUMP_PROGRAM_ID6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6PBonding curve program
PUMP_AMM_PROGRAM_IDpAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEAAMM pool program
PUMP_FEE_PROGRAM_IDpfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZFee sharing program
BONDING_CURVE_NEW_SIZE151Extended account size

State Transition Diagram

              create
    ────────────────────── ►  ACTIVE (BondingCurve)
                                    │
                               buy / sell
                                    │
                              graduation
                          (complete = true)
                                    │
                               migrate
                                    ▼
                              GRADUATED (AMM Pool)
                                    │
                              AMM trading + fee collection

Patterns to Follow

  • Return TransactionInstruction[], never Transaction objects
  • Use getMultipleAccountsInfo to batch RPC calls
  • Check bondingCurve.complete before any bonding curve operation
  • Use fetchBuyState / fetchSellState for efficient account fetching
  • Always extend account before migration if needed

Common Pitfalls

  • BondingCurve.complete === true means graduated — buy/sell will fail on-chain
  • Creator vault PDAs differ: "creator-vault" (Pump, hyphen) vs "creator_vault" (AMM, underscore)
  • fetchSellState requires ATA to exist (unlike fetchBuyState)
  • Fee recipient is selected randomly from global.feeRecipients[]

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.

The English summary is being prepared. Showing the original description.

x402agent/SolanaOS9Updated Jul 23, 2026

Manage Apple Notes via the `memo` CLI on macOS (create, view, edit, delete, search, move, and export notes). Use when a user asks SolanaOS to add a note, list notes, search notes, or manage note folders.

The English summary is being prepared. Showing the original description.

x402agent/SolanaOS9Updated Jul 23, 2026

Manage Apple Reminders via remindctl CLI (list, add, edit, complete, delete). Supports lists, date filters, and JSON/plain output.

The English summary is being prepared. Showing the original description.

x402agent/SolanaOS9Updated Jul 23, 2026

Create, search, and manage Bear notes via grizzly CLI.

The English summary is being prepared. Showing the original description.

x402agent/SolanaOS9Updated Jul 23, 2026

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

The English summary is being prepared. Showing the original description.

x402agent/SolanaOS9Updated Jul 23, 2026

blucli

Free

BluOS CLI (blu) for discovery, playback, grouping, and volume.

The English summary is being prepared. Showing the original description.

x402agent/SolanaOS9Updated Jul 23, 2026

See all skills by x402agent

Report a problem with this skill