pumpfun-trading
Quick Pump.fun trading shortcut for buy/sell flow selection, bonding curve versus AMM state checks, slippage handling, risk controls, and SDK trade instruction building.
- License 许可
- MIT
- 最近更新
- 2026-10-08
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- pumpfun-trading
- description
- Quick Pump.fun trading shortcut for buy/sell flow selection, bonding curve versus AMM state checks, slippage handling, risk controls, and SDK trade instruction building.
02 资源文件 2
- 参考文档metadata.json339 B
- 参考文档verification.json1017 B
03 SKILL.md 正文
Pump.fun Trading
Execute buy and sell trades on the Pump.fun protocol using the native Pump SDK. Supports both bonding curve trading (pre-graduation) and AMM pool trading (post-graduation).
Prerequisites
- Funded Solana wallet via
nanosolana birth HELIUS_RPC_URLconfigured- Understanding of bonding curve mechanics
Trading Flow
1. Check Token State
Before trading, always check if the token is on the bonding curve or has graduated:
const sdk = new OnlinePumpSdk(connection);
const summary = await sdk.fetchBondingCurveSummary(mint);
if (summary.isGraduated) {
// Use AMM trading instructions
} else {
// Use bonding curve trading instructions
}
2. Buy on Bonding Curve
import { OnlinePumpSdk, getBuyTokenAmountFromSolAmount } from "nanosolana";
import BN from "bn.js";
const sdk = new OnlinePumpSdk(connection);
// Fetch state
const [buyState, global, feeConfig] = await Promise.all([
sdk.fetchBuyState(mint, user),
sdk.fetchGlobal(),
sdk.fetchFeeConfig(),
]);
// Calculate expected tokens
const solAmount = new BN(100_000_000); // 0.1 SOL
const expectedTokens = getBuyTokenAmountFromSolAmount({
global, feeConfig,
mintSupply: buyState.bondingCurve.tokenTotalSupply,
bondingCurve: buyState.bondingCurve,
amount: solAmount,
});
// Build instructions
const buyIxs = await sdk.buyInstructions({
...buyState, mint, user,
amount: expectedTokens,
solAmount,
slippage: 0.05, // 5%
});
3. Sell on Bonding Curve
import { getSellSolAmountFromTokenAmount } from "nanosolana";
const [sellState, global, feeConfig] = await Promise.all([
sdk.fetchSellState(mint, user),
sdk.fetchGlobal(),
sdk.fetchFeeConfig(),
]);
const tokenAmount = new BN(1_000_000_000);
const expectedSol = getSellSolAmountFromTokenAmount({
global, feeConfig,
mintSupply: sellState.bondingCurve.tokenTotalSupply,
bondingCurve: sellState.bondingCurve,
amount: tokenAmount,
});
const sellIxs = await sdk.sellInstructions({
...sellState, mint, user,
amount: tokenAmount,
solAmount: expectedSol,
slippage: 0.05,
});
Risk Management
| Control | Value |
|---|---|
| Always use slippage | 3-5% recommended |
Check bondingCurve.complete |
Before trading |
Use BN for all amounts |
Never use JS number |
| Max position per trade | Follow Kelly Criterion |
| Circuit breaker | -10% daily → pause 24h |
Integration with Swarm
Swarm agents with the sniper, momentum, and graduation roles use this skill automatically via the OODA trading loop.
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.