pump-bonding-curve

pump-bonding-curve is a skill for Claude Code, Codex from x402agent/solana-clawd. It costs 49 tokens per session (1,255 once invoked), scanned A, original, MIT.

A collection of mathematical functions for pricing Pump tokens on a constant-product bonding curve, where the product of two virtual reserves stays constant. It covers buy and sell quotes, fees, market capitalisation, and migration to an AMM pool.

In plain words
What is it for?
Use it to estimate tokens received for SOL, estimate SOL returned when selling, calculate market capitalisation and fees, and handle new, active, or migrated curves.
Why use it?
It avoids hand-coding delicate price and reserve calculations, including rounding and edge cases.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: positional $N argument; built for openclaw.

Good fit Use it to estimate tokens received for SOL, estimate SOL returned when selling, calculate market capitalisation and fees, and handle new, active, or migrated curves.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/x402agent/solana-clawd/pump-bonding-curve
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add x402agent/solana-clawd --skill pump-bonding-curve
Clone the repo
git clone --depth 1 https://github.com/x402agent/solana-clawd

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pump-bonding-curve

README.md
[![agentmods](https://agentmods.dev/badge/skills/x402agent/solana-clawd/pump-bonding-curve/github.svg)](https://agentmods.dev/skills/x402agent/solana-clawd/pump-bonding-curve)
Your own site
<a href="https://agentmods.dev/skills/x402agent/solana-clawd/pump-bonding-curve"><img src="https://agentmods.dev/badge/skills/x402agent/solana-clawd/pump-bonding-curve/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pump-bonding-curve

Your own site · 80×15
<a href="https://agentmods.dev/skills/x402agent/solana-clawd/pump-bonding-curve"><img src="https://agentmods.dev/badge/skills/x402agent/solana-clawd/pump-bonding-curve.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,255 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00049 $0.01255
Opus 5 $0.00024 $0.00628
Sonnet 5 $0.00010 $0.00251
Haiku 4.5 $0.00005 $0.00126

Measured 7d ago against content hash 77fb276bffed, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

pump-bonding-curve scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/skills/pump-bonding-curve/SKILL.md · 127 lines

How it starts

The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Bonding Curve — Pricing, Quoting & AMM Mathematics

Implement and maintain the constant-product AMM bonding curve math that powers Pump token pricing — including buy/sell quoting, fee-aware calculations, market cap computation, reserve management, and edge-case handling for new, active, and migrated curves.

Context

Pump tokens are priced using a constant-product bonding curve ($x \times y = k$) where $x$ = virtual SOL reserves and $y$ = virtual token reserves. The bonding curve determines token prices during the pre-graduation phase. Once market cap reaches a threshold, the token "graduates" and migrates to a PumpAMM pool.

Key Files

  • src/bondingCurve.ts — all bonding curve math functions (buy/sell quoting, market cap)
  • src/fees.ts — fee computation (basis points, tiered fees, ceiling division)
  • src/state.tsBondingCurve, Global, FeeConfig, FeeTier interfaces

Constant-Product Formula

$$x \times y = k$$

Buy (tokens out for SOL in): $$\text{tokensOut} = \frac{dx \times Y}{X + dx}$$

Where $dx$ = SOL input (after fees), $X$ = virtual SOL reserves, $Y$ = virtual token reserves.

Sell (SOL out for tokens in): $$\text{solOut} = \frac{dy \times X}{Y + dy}$$

Where $dy$ = tokens sold, $X$ = virtual SOL reserves, $Y$ = virtual token reserves.

Fee Stripping

Fees are deducted from the SOL amount before applying the bonding curve formula:

inputAmount = (amount - 1) * 10000 / (totalFeeBps + 10000)

The - 1 before fee stripping is intentional to handle rounding edge cases.

Market Cap Calculation

$$\text{marketCap} = \frac{\text{virtualSolReserves} \times \text{mintSupply}}{\text{virtualTokenReserves}}$$

Where mintSupply defaults to ONE_BILLION_SUPPLY ($1 \times 10^{15}$ — 1B tokens with 6 decimals).

Fee Tiers

When a FeeConfig exists, fees are market-cap-dependent. Fee tiers are iterated in reverse order — the first tier from the end whose marketCapLamportsThreshold ≤ currentMarketCap is selected.

Read the full file on GitHub · 127 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 127 lines · 49 tokens per session scan A 77fb276bffed

Subscribe to this mod's changes

pump-bonding-curve is a skill published in the GitHub repository x402agent/solana-clawd (24 stars, last pushed 3mo ago), licensed MIT. It adds 49 tokens to every session and 1,255 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.