Skip to main content

BondingCurveParams

Default bonding curve: Initial price: 1 MINA per 100,000 tokens (0.00001 MINA per token), or 10_000 / 10 ** 9 Curve K: 1 MINA per 100,000 tokens (0.00001 MINA per token), or 10_000 / 10 ** 9 MINA Owner fee: 10% in 0.001 % units(10 * 1000 = 10_000) Price formula: price = startPrice + curveK * totalSupply Example: If supply is 200,000 tokens, price = 1 MINA + 1 MINA * 200_000 / 100_000 = 3 MINA per 100,000 tokens or per token in MINA/1e9 10000 + 10000 * 200_000 / 100_000 = 30000 per token, or 30_000 * 100_000 = 3_000_000_000, or 3 MINA per 100,000 tokens

To calculate the max supply for the given price for 100,000 tokens: price = startPrice + curveK * totalSupply price - startPrice = curveK * totalSupply (price - startPrice) / curveK = totalSupply (3 MINA - 1 MINA) / 1 MINA = 2 * 100_000 = 200_000 tokens (30_000 - 10_000) / 10_000 = 2 * 100_000 = 200_000 tokens or, in 1e9 units: (30_000 - 10_000) * 1e9 * 100_000 / 10_000 = 200_000_000_000_000, or to avoid overflow, (30_000 - 10_000) * 1e9 / 10_000 * 100_000 = 200_000_000_000_000

Hierarchy

  • any
    • BondingCurveParams

Index

Constructors

Methods

Constructors

constructor

  • Returns BondingCurveParams

Methods

pack

  • pack(): any
  • Returns any

staticunpack

Page Options