pump-token-lifecycle
Manage the full Pump.fun token lifecycle from creation through bonding-curve trading, graduation detection, AMM migration, AMM trading, creator fee collection, and volume tracking with PumpSdk and OnlinePumpSdk.
- License 许可
- MIT
- 最近更新
- 2026-10-08
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- pump-token-lifecycle
- description
- Manage the full Pump.fun token lifecycle from creation through bonding-curve trading, graduation detection, AMM migration, AMM trading, creator fee collection, and volume tracking with PumpSdk and OnlinePumpSdk.
03 SKILL.md 正文
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 — usecreateV2Instruction(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
| Constant | Value | Description |
|---|---|---|
PUMP_PROGRAM_ID |
6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P |
Bonding curve program |
PUMP_AMM_PROGRAM_ID |
pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA |
AMM pool program |
PUMP_FEE_PROGRAM_ID |
pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ |
Fee sharing program |
BONDING_CURVE_NEW_SIZE |
151 |
Extended 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[], neverTransactionobjects - Use
getMultipleAccountsInfoto batch RPC calls - Check
bondingCurve.completebefore any bonding curve operation - Use
fetchBuyState/fetchSellStatefor efficient account fetching - Always extend account before migration if needed
Common Pitfalls
BondingCurve.complete === truemeans graduated — buy/sell will fail on-chain- Creator vault PDAs differ:
"creator-vault"(Pump, hyphen) vs"creator_vault"(AMM, underscore) fetchSellStaterequires ATA to exist (unlikefetchBuyState)- Fee recipient is selected randomly from
global.feeRecipients[]
04 同仓库更多 Skills
zkrouter
Self-hosted OpenAI-compatible LLM router — smart tier-based routing, ZK-stamped routing decisions, mode overrides, free OpenRouter at install via the Birth bot. Save 60-80% on inference costs by routing to the cheapest capable model across 12+ OpenRouter models.
zk
For custom ZK Solana programs and privacy-preserving applications to prevent double spending. Guide to integrate rent-free nullifier PDAs for double-spend prevention.
zk-omni-messaging
Zero-knowledge omnichain messaging between Robinhood Chain and Solana using CheshireZkOmniMessenger (msgType 4) with nullifier anti-replay and the zk-omni-relayer service.
zerion-wallet-data
Use when the user asks to check a wallet's portfolio, token balances, DeFi positions, PnL, transaction history, or NFTs. Provides interpreted on-chain data across 40+ EVM chains and Solana via x402 pay-per-request or API key — no raw RPC decoding needed.
youtube-clipper
YouTube 视频智能剪辑工具。下载视频和字幕,AI 分析生成精细章节(几分钟级别), 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频,并生成总结文案。 使用场景:当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词:视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video
yield-optimization
Multi-chain yield optimization via yield.xyz (StakeKit). Discover 2,988+ yield opportunities across 75+ blockchains, build deposit/withdrawal transactions with shell scripts, and sign them with a MoonPay wallet. Use when the user wants to earn yield, find the best lending or staking rate, enter/exit a position, or check portfolio balances.