pumpfun-mechanics
PumpFunというプラットフォームにおける、価格変動の仕組みや卒業の条件、命令の解釈、そしてPumpSwapへの移行といった複雑な処理を、裏側で自動的に実行するSkill。
📜 元の英語説明(参考)
PumpFun bonding curve math, graduation mechanics, instruction parsing, and PumpSwap migration
🇯🇵 日本人クリエイター向け解説
PumpFunというプラットフォームにおける、価格変動の仕組みや卒業の条件、命令の解釈、そしてPumpSwapへの移行といった複雑な処理を、裏側で自動的に実行するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o pumpfun-mechanics.zip https://jpskill.com/download/10427.zip && unzip -o pumpfun-mechanics.zip && rm pumpfun-mechanics.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/10427.zip -OutFile "$d\pumpfun-mechanics.zip"; Expand-Archive "$d\pumpfun-mechanics.zip" -DestinationPath $d -Force; ri "$d\pumpfun-mechanics.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
pumpfun-mechanics.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
pumpfun-mechanicsフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
PumpFunの仕組み — ボンディングカーブ、卒業、命令解析
PumpFunは、Solanaの主要なトークンローンチパッドです。そのボンディングカーブの数学、卒業プロセス、命令フォーマットを理解することは、新しいトークンローンチの分析、卒業イベントを中心とした取引戦略の構築、オンチェーンのPumpFunアクティビティの解析に不可欠です。
ボンディングカーブの数学
PumpFunは、仮想定積(CPMM)ボンディングカーブを使用します。
k = virtualSolReserves × virtualTokenReserves
初期パラメータ
| パラメータ | 値 |
|---|---|
| 初期仮想SOL | 30 SOL (30,000,000,000 lamports) |
| 初期仮想トークン | ~1.073B トークン (1,073,000,000,000,000 raw, 6 decimals) |
| トークン総供給量 | 1B トークン (1,000,000,000,000,000 raw) |
| 実際のトークン準備金 | ~793M トークン (793,000,000,000,000 raw) |
| 実際のSOL準備金 | 0 (ローンチ時には実際のSOLはなし) |
| 手数料 | 1% (プログラムによって外部的に適用) |
仮想 vs 実際: 仮想準備金はカーブの形状を定義します。実際の準備金は、実際に引き出し可能な資金を追跡します。その差(1.073B - 793M = 280M 仮想トークン)が初期価格を決定しますが、引き出すことはできません。
スポット価格
price_sol_per_token = virtual_sol_reserves / virtual_token_reserves
# 人間が読める単位で:
price = (virtual_sol / 1e9) / (virtual_token / 1e6)
# ローンチ時: 30 / 1,073,000,000 ≈ 2.796e-8 SOL/token
# 卒業時: ~4.1e-7 SOL/token (ローンチから~14.7倍)
トークン購入 (SOL → トークン)
def buy_tokens(v_sol: int, v_tok: int, real_tok: int, sol_in: int) -> int:
"""Calculate tokens received for a given SOL input.
Args:
v_sol: Virtual SOL reserves (lamports).
v_tok: Virtual token reserves (raw).
real_tok: Real token reserves (raw).
sol_in: SOL to spend (lamports, BEFORE 1% fee).
Returns:
Tokens received (raw units).
"""
k = v_sol * v_tok
new_v_sol = v_sol + sol_in
new_v_tok = k // new_v_sol + 1 # +1 matches on-chain rounding
tokens_out = v_tok - new_v_tok
return min(tokens_out, real_tok)
トークン売却 (トークン → SOL)
def sell_tokens(v_sol: int, v_tok: int, real_sol: int, tokens_in: int) -> int:
"""Calculate SOL received for selling tokens.
Args:
v_sol: Virtual SOL reserves (lamports).
v_tok: Virtual token reserves (raw).
real_sol: Real SOL reserves (lamports).
tokens_in: Tokens to sell (raw units).
Returns:
SOL received (lamports, BEFORE 1% fee).
"""
k = v_sol * v_tok
new_v_tok = v_tok + tokens_in
new_v_sol = k // new_v_tok
sol_out = v_sol - new_v_sol - 1 # -1 matches on-chain floor rounding
return min(sol_out, real_sol)
購入コスト (正確なトークン量 → 必要なSOL)
def buy_cost(v_sol: int, v_tok: int, tokens_wanted: int) -> int:
"""Calculate SOL needed to buy exact token amount.
Returns:
SOL cost in lamports (before fee). Returns max int if impossible.
"""
if tokens_wanted >= v_tok:
return 2**64 - 1 # impossible
k = v_sol * v_tok
new_v_tok = v_tok - tokens_wanted
new_v_sol = k // new_v_tok + 1
return new_v_sol - v_sol
手数料の処理
1%の手数料は、カーブの数学の一部ではありません。外部的に適用されます。
# 購入: 手数料はカーブの前にSOL入力から差し引かれます
actual_sol_to_curve = sol_input * 0.99
# 売却: 手数料はカーブの後にSOL出力から差し引かれます
actual_sol_received = sol_from_curve * 0.99
# 往復の最小コスト: 手数料だけで~2%、それに加えて価格変動
時価総額
market_cap_sol = (token_total_supply * virtual_sol_reserves) / virtual_token_reserves
卒業
卒業は、realSolReservesが~85 SOL(SOL価格に応じて~$12K-14K)に達したときに発生します。PumpFunトークンのうち、卒業するのはわずか~1.4%です。
何が起こるか
- ボンディングカーブアカウントで
completeフラグがtrueに設定されます CompleteEventが発行されます(識別子5f72619cd42e9808)- ボンディングカーブは取引を受け付けなくなります
- ~$12Kの流動性が宛先DEXに入金されます
- トークンはPumpSwap(または古いトークンの場合はRaydium)で取引可能になります
充足率
GRADUATION_THRESHOLD = 85_000_000_000 # 85 SOL in lamports
fill_pct = (real_sol_reserves / GRADUATION_THRESHOLD) * 100.0
移行先
- 2025年3月以降: PumpSwap (
pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA) — ネイティブAMM、移行手数料なし - 2025年3月以前: Raydium V4 (
675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8) — 6 SOLの手数料
卒業後のPumpSwap
PumpSwapは、1%の手数料(ボンディングカーブと同じ)を持つ定積AMMです。主な違い:
- ベースアセットは常にWSOL、クオートはトークン
- 命令セマンティクスが反転しています:「buy」命令はトークンを売却し、「sell」命令はトークンを購入します
- クリエイターの収益分配をサポートします(元のクリエイターにボリュームの0.05%)
プログラムIDとアドレス
| プログラム/アカウント | アドレス |
|---|---|
| PumpFunプログラム | 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P |
| PumpSwapプログラム | pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA |
| 手数料プログラム | pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ |
| グローバルアカウント | 4wTV1YmiEkRvAtNtsSGPtUrqRYQMe5SKy2uB4Jjaxnjf |
| 手数料受取人 | 62qc2CNXwrYqQScmEdiZFFAnJR262PxWEuNQtxfafNgV |
| イベント権限 | Ce6TQqeHC9p8KetsN6JsjHK7UTZk7nasjjnr7XxXp9F1 |
イベント解析
イベントはAnchorスタイルです:sha256("event:<EventName>")[0..8]
| イベント | 識別子 (16進数) |
|---|---|
| CreateEvent | 1b72a94ddeeb6376 |
| TradeEvent | bddb7fd34ee661ee |
| CompleteEvent | 5f72619cd42e9808 |
TradeEventのレイアウト (8バイトの識別子の後)
mint: pubkey 32 bytes
solAmount: u64 8 bytes
tokenAmount: u64 8 bytes
isBuy: bool 1 byte
user: pubkey 32 bytes
timestamp: i64 8 bytes
virtualSolReserves: u64 8 bytes
virtualTokenReserves: u64 8 bytes
realSolReserves: u64
(原文はここで切り詰められています) 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
PumpFun Mechanics — Bonding Curves, Graduation & Instruction Parsing
PumpFun is the dominant Solana token launchpad. Understanding its bonding curve math, graduation process, and instruction formats is essential for analyzing new token launches, building trading strategies around graduation events, and parsing on-chain PumpFun activity.
Bonding Curve Math
PumpFun uses a virtual constant-product (CPMM) bonding curve:
k = virtualSolReserves × virtualTokenReserves
Initial Parameters
| Parameter | Value |
|---|---|
| Initial Virtual SOL | 30 SOL (30,000,000,000 lamports) |
| Initial Virtual Tokens | ~1.073B tokens (1,073,000,000,000,000 raw, 6 decimals) |
| Token Total Supply | 1B tokens (1,000,000,000,000,000 raw) |
| Real Token Reserves | ~793M tokens (793,000,000,000,000 raw) |
| Real SOL Reserves | 0 (no real SOL at launch) |
| Fee | 1% (applied externally by the program) |
Virtual vs Real: Virtual reserves define the curve shape. Real reserves track actual withdrawable funds. The difference (1.073B - 793M = 280M virtual tokens) shapes the initial price but can never be withdrawn.
Spot Price
price_sol_per_token = virtual_sol_reserves / virtual_token_reserves
# In human-readable units:
price = (virtual_sol / 1e9) / (virtual_token / 1e6)
# At genesis: 30 / 1,073,000,000 ≈ 2.796e-8 SOL/token
# At graduation: ~4.1e-7 SOL/token (~14.7x from launch)
Buy Tokens (SOL → Tokens)
def buy_tokens(v_sol: int, v_tok: int, real_tok: int, sol_in: int) -> int:
"""Calculate tokens received for a given SOL input.
Args:
v_sol: Virtual SOL reserves (lamports).
v_tok: Virtual token reserves (raw).
real_tok: Real token reserves (raw).
sol_in: SOL to spend (lamports, BEFORE 1% fee).
Returns:
Tokens received (raw units).
"""
k = v_sol * v_tok
new_v_sol = v_sol + sol_in
new_v_tok = k // new_v_sol + 1 # +1 matches on-chain rounding
tokens_out = v_tok - new_v_tok
return min(tokens_out, real_tok)
Sell Tokens (Tokens → SOL)
def sell_tokens(v_sol: int, v_tok: int, real_sol: int, tokens_in: int) -> int:
"""Calculate SOL received for selling tokens.
Args:
v_sol: Virtual SOL reserves (lamports).
v_tok: Virtual token reserves (raw).
real_sol: Real SOL reserves (lamports).
tokens_in: Tokens to sell (raw units).
Returns:
SOL received (lamports, BEFORE 1% fee).
"""
k = v_sol * v_tok
new_v_tok = v_tok + tokens_in
new_v_sol = k // new_v_tok
sol_out = v_sol - new_v_sol - 1 # -1 matches on-chain floor rounding
return min(sol_out, real_sol)
Buy Cost (Exact token amount → SOL needed)
def buy_cost(v_sol: int, v_tok: int, tokens_wanted: int) -> int:
"""Calculate SOL needed to buy exact token amount.
Returns:
SOL cost in lamports (before fee). Returns max int if impossible.
"""
if tokens_wanted >= v_tok:
return 2**64 - 1 # impossible
k = v_sol * v_tok
new_v_tok = v_tok - tokens_wanted
new_v_sol = k // new_v_tok + 1
return new_v_sol - v_sol
Fee Handling
The 1% fee is not part of the curve math. It's applied externally:
# Buying: fee deducted from SOL input before curve
actual_sol_to_curve = sol_input * 0.99
# Selling: fee deducted from SOL output after curve
actual_sol_received = sol_from_curve * 0.99
# Roundtrip minimum cost: ~2% from fees alone, plus price impact
Market Cap
market_cap_sol = (token_total_supply * virtual_sol_reserves) / virtual_token_reserves
Graduation
Graduation occurs when realSolReserves reaches ~85 SOL (~$12K-14K depending on SOL price). Only ~1.4% of PumpFun tokens ever graduate.
What Happens
completeflag set totrueon bonding curve accountCompleteEventemitted (discriminator5f72619cd42e9808)- Bonding curve stops accepting trades
- ~$12K liquidity deposited to the destination DEX
- Token becomes tradeable on PumpSwap (or Raydium for older tokens)
Fill Percentage
GRADUATION_THRESHOLD = 85_000_000_000 # 85 SOL in lamports
fill_pct = (real_sol_reserves / GRADUATION_THRESHOLD) * 100.0
Migration Targets
- March 2025+: PumpSwap (
pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA) — native AMM, no migration fee - Before March 2025: Raydium V4 (
675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8) — 6 SOL fee
PumpSwap Post-Graduation
PumpSwap is a constant-product AMM with 1% fee (same as bonding curve). Key differences:
- Base asset is always WSOL, quote is token
- Instruction semantics are inverted: "buy" instruction sells tokens, "sell" instruction buys tokens
- Supports creator revenue sharing (0.05% of volume to original creator)
Program IDs & Addresses
| Program/Account | Address |
|---|---|
| PumpFun Program | 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P |
| PumpSwap Program | pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA |
| Fee Program | pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ |
| Global Account | 4wTV1YmiEkRvAtNtsSGPtUrqRYQMe5SKy2uB4Jjaxnjf |
| Fee Recipient | 62qc2CNXwrYqQScmEdiZFFAnJR262PxWEuNQtxfafNgV |
| Event Authority | Ce6TQqeHC9p8KetsN6JsjHK7UTZk7nasjjnr7XxXp9F1 |
Event Parsing
Events are Anchor-style: sha256("event:<EventName>")[0..8]
| Event | Discriminator (hex) |
|---|---|
| CreateEvent | 1b72a94ddeeb6376 |
| TradeEvent | bddb7fd34ee661ee |
| CompleteEvent | 5f72619cd42e9808 |
TradeEvent Layout (after 8-byte discriminator)
mint: pubkey 32 bytes
solAmount: u64 8 bytes
tokenAmount: u64 8 bytes
isBuy: bool 1 byte
user: pubkey 32 bytes
timestamp: i64 8 bytes
virtualSolReserves: u64 8 bytes
virtualTokenReserves: u64 8 bytes
realSolReserves: u64 8 bytes
realTokenReserves: u64 8 bytes
Critical: Events are in CPI inner instructions. Search for discriminators anywhere in instruction data, not just at offset 0.
Bonding Curve Account Layout
Offset 0: discriminator 8 bytes
Offset 8: virtualTokenReserves u64
Offset 16: virtualSolReserves u64
Offset 24: realTokenReserves u64
Offset 32: realSolReserves u64
Offset 40: tokenTotalSupply u64
Offset 48: complete bool (1 byte)
Offset 49: creator pubkey (32 bytes)
PDA Derivation
| PDA | Seeds |
|---|---|
| Bonding Curve | ["bonding-curve", mint] |
| Bonding Curve V2 | ["bonding-curve-v2", mint] |
| Creator Vault | ["creator-vault", creator] |
Instruction Discriminators
| Instruction | Hex | Notes |
|---|---|---|
| buy_exact_sol_in (V2) | 38fc74089edfcd5f |
Current production buy |
| sell (V2) | 33e685a4017f83ad |
Current production sell |
| buy (V1/legacy) | 66063d1201daebea |
Legacy, still seen occasionally |
| create | 181ec828051c0777 |
Token creation |
Buy Instruction Data (24 bytes)
[0..8]: discriminator
[8..16]: spendable_sol_in u64 LE (total SOL budget, fees deducted internally)
[16..24]: min_tokens_out u64 LE (slippage floor)
Sell Instruction Data (24 bytes)
[0..8]: discriminator
[8..16]: amount_tokens u64 LE (tokens to sell, raw)
[16..24]: min_sol_output u64 LE (minimum SOL out, lamports)
Price Impact & Sizing
def price_impact(v_sol: int, v_tok: int, sol_in: int) -> float:
"""Calculate price impact for a buy as a percentage."""
spot = v_sol / v_tok
tokens = buy_tokens(v_sol, v_tok, v_tok, sol_in)
if tokens == 0:
return float('inf')
exec_price = sol_in / tokens
return (exec_price / spot - 1) * 100
# Example: 1 SOL buy at genesis
# impact = price_impact(30_000_000_000, 1_073_000_000_000_000, 1_000_000_000)
# ≈ 3.3% price impact
Files
References
references/bonding_curve_math.md— Complete mathematical derivations with worked examplesreferences/graduation_process.md— Graduation threshold, migration, PumpSwap mechanicsreferences/instruction_reference.md— Full instruction and event layouts for parsing
Scripts
scripts/curve_calculator.py— Interactive bonding curve calculator: price, impact, fill %scripts/parse_events.py— Parse PumpFun events from transaction data