pump-bonding-curve
Installation
SKILL.md
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.ts—BondingCurve,Global,FeeConfig,FeeTierinterfaces
Constant-Product Formula
$$x \times y = k$$