📈Bonding Curve

A bonding curve is a mathematical formula within a smart contract that defines the relationship between the price and supply of a token. As more tokens are minted and bought, the price increases along the bonding curve. Conversely, when tokens are sold or burned, the price decreases. This mechanism ensures a dynamic pricing model based on supply and demand.

Bonding curves simplify the creation and management of community tokens by eliminating traditional barriers such as writing, testing, and auditing smart contracts, as well as setting up liquidity pools. This ensures instant liquidity and automated pricing, allowing users to create and trade community coins with a single click. By leveraging bonding curves, Musing enables effortless token creation and trading, allowing communities to focus on growth and engagement without technical hassles.

Key Elements of the Bonding Curve Logic:

  • Dynamic Pricing: The price of the token increases as more tokens are minted and decreases as tokens are burned. This is managed through a constant product formula.

  • Instant Liquidity: The bonding curve ensures that there is always a price at which tokens can be bought or sold, providing continuous liquidity.

Price Interval-based Bonding Curve

Musing employs the Discrete Bonding Curve (DBC) model, which divides the curve into specific price intervals. Unlike a continuous linear curve (y = x), the DBC model uses stepped intervals, providing greater customization and addressing technical challenges in implementing bonding curves with smart contracts.

Mathematical Formula

The bonding curve is divided into steps, each with a specific price and supply range. The steps are calculated using a quadratic formula based on the initial and final prices, as well as the initial and maximum supply.

Steps Calculation

The steps in the bonding curve are determined using a quadratic formula based on the initial and final prices, as well as the initial and maximum supply.

  • Let P0P_0​ be the initial price.

  • Let PnP_n​ be the final price.

  • Let S0S_0​ be the initial supply.

  • Let SnS_n​ be the maximum supply.

  • Let C C be the creator allocation.

  • Let N N be the number of steps.


  1. Step Size ( ΔXΔX)

ΔX=(SnC)/NΔX=(S_n−C) / N
  • ΔX ΔX : Increment in supply for each step

  • Sn S_n​: Maximum supply

  • C C : Creator allocation

  • N N : Number of steps

  1. Total Range (totalX totalX ) and Total Price Difference (totalY totalY ):

totalX=SnCΔXtotalX=S_n −C−ΔX
  • totalX totalX : Total range in supply

  • ΔX ΔX : Increment in supply for each step

totalY=PnP0totalY=P_n −P_0
  • totalY totalY : Total price difference

  • Pn P_n​: Final price

  • P0 P_0​: Initial price

  1. Quadratic Coefficient (𝑎 𝑎 ):

a=totalY/totalX2a= totalY / totalX^2
  • 𝑎 𝑎 : Coefficient for the quadratic curve

  1. Supply at Each Step ( 𝑥𝑖 𝑥_𝑖 ):

xi=i×ΔX+Cx_i =i×ΔX+C
  • xi x_i​: Supply at step i

  • i i : Step number

  1. Price at Each Step ( 𝑦𝑖 𝑦 𝑖 ):

yi=a×(xiΔXC)2+P0y_i=a×(x_i−ΔX−C)^2 + P_0
  • yi y_i ​ : Price at step 𝑖

  1. Final Step Price (yN y_N):

yN=Pny_N=P_n
  • yN y_N : Price at the final step

Determining the Current Step in the Bonding Curve:

To find the current step based on the total supply:

currentStep=min(icurrentSupplyrangeToi)currentStep=min({i∣currentSupply≤rangeTo_i})

This formula means that the current step is the smallest step index i such that the current supply is less than or equal to the upper limit of the supply range (rangeToi rangeTo_i ) for that step.

  • min min⁡ : This denotes the minimum function, which finds the smallest value in a set.

  • i i : This represents the step index.

  • currentSupply currentSupply : The current total supply of the token.

  • rangeToi rangeTo_i ​: The upper limit of the supply range for step i.

Calculating the Reserve Amount for Minting

To calculate the reserve amount for minting tokens:

reserveAmount=isteps(tokensToMint×pricei/10decimals)reserveAmount=∑_i^{steps} (tokensToMint×price_i / 10^{decimals})
  • tokensToMint tokensToMint : The number of tokens to be minted.

  • pricei price_i ​: The price per token at step iii.

  • decimals decimals : The decimal places of the token.

Calculating the Refund Amount for Burning

To calculate the refund amount for burning tokens:

refundAmount=i=1steps(tokensToBurn×pricei/10decimals)refundAmount=∑ _{i=1}^{steps}(tokensToBurn×price _i / 10^{decimals})
  • i=1steps ∑_{i=1}^{steps} ​: This denotes the summation, meaning that the value inside the parentheses is summed for each step i from 1 to the total number of steps.

  • tokensToBurn tokensToBurn : The number of tokens to be burned.

  • pricei price_i ​: The price per token at step iii.

  • 10decimals 10^{decimals} : The factor to adjust for the token's decimal places.

Minting and burning tokens will incur a 7% tax, which will be split between the platform and rewards.

Future Improvements

Musing successfully launched on the Avalanche Mainnet with core platform features implemented. The following are enhancements to be added in the future.

  • Automated Liquidity Pools: Automated liquidity pools will enhance liquidity and price stability. This feature will automatically deploy liquidity to a DEX when community coins reach a certain market cap.

  • Governance Tools: Governance tools are being developed to empower community members with the ability to vote on critical decisions, such as selecting community leaders, configuring rewards, and appointing moderators.

  • Musing Coin (MSC) Integration: The MSC token will be integrated into the platform, backing community coins and providing additional utility. This integration will enhance the value and functionality of the platform, ensuring that the token is actively used within the ecosystem.

Last updated