Expand description
Fee math shared by the bonding-curve and AMM quote paths.
Ports @pump-fun/pump-sdk-internal/src/fees.ts and
@pump-fun/pump-swap-sdk/src/sdk/fees.ts. All values are basis points
(u64) the way the on-chain programs store them.
Structs§
- AmmFee
Bps - AMM fees split into LP, protocol, and coin-creator components.
- Bonding
Curve FeeBps - Bonding-curve fees split into protocol and creator components. The AMM-style LP fee is not part of the bonding-curve fee model.
Functions§
- bonding_
curve_ market_ cap - Bonding-curve market cap in lamports.
marketCap = virtualQuoteReserves * mintSupply / virtualTokenReserves. - ceil_
div ceil(a / b)for non-zerob. MirrorsceilDivin both TS SDKs.- compute_
amm_ fee_ bps - Resolve the bps for an AMM trade. Mirrors
pump-swap-sdk’scomputeFeesBps: pump pools (creator == pool-authority PDA) get tiered fees; third-party pools get theflat_feestable; with nofee_config, fall back to flat globals onGlobalConfig. - compute_
bonding_ curve_ fee_ bps - Resolve the bps for a bonding-curve trade. When
fee_configisNone, fall back to the flat fees onGlobal. When provided, use the tiered fees indexed by current market cap. - fee_
amount ceil(amount * basis_points / 10_000). Mirrorsfee()in both TS SDKs.- is_
pump_ pool trueiffpool_creatormatches the canonical pump-program-derived pool authority forbase_mint. Used to decide whether a pool gets tiered fees (pump pools) or flat fees (third-party pools).- pool_
market_ cap - AMM pool market cap in lamports.
marketCap = quoteReserve * baseMintSupply / baseReserve.