BOND CURVE
Last updated
Last updated
Dynamic Pricing Model: The bonding curve sets token prices automatically based on supply and demand using a smooth, non-linear polynomial function. This function determines the cumulative cost in SOL to mint tokens as more of the total supply is issued.
Virtual and Real Reserves:
Virtual Reserves: Used to simulate the current state of token issuance and calculate the price.
Real Reserves: Actual tokens and SOL held in the pool. Initially, 80% of tokens go into the bonding curve while 20% are reserved for liquidity.
How It Works:
Buying Tokens: When a user buys tokens, their SOL increases the cumulative cost needed to mint new tokens. The program calculates how many tokens to issue based on this increase while applying a 1% fee. If the SOL amount rises above 79 SOL, only the necessary amount is used to fill the curve and any excess is refunded.
Selling Tokens: Selling tokens reduces the minted fraction, and the system calculates the SOL to return based on the difference in cumulative cost before and after the saleβagain charging a 1% fee.
Once the 79 SOL threshold is reached, migration begins immediately. Depending on trading activity, a small buffer of tokens may remain in the bonding curve even after migration, which can be considered burnt. Migration is executed by a Cross-Program Invocation (CPI) that transfers the underlying liquidity pool to Raydium.
Necessary Associated Token Accounts (ATAs) are created if they donβt already exist.
The CPI instruction is then executed to migrate the pool to Raydium.
Finally, once the liquidity pool has been created on Raydium, the migration authority on the program calls the CPMM lock instruction, effectively locking liquidity and minting an NFT which retains the ability to claim fees from trading volume on the pair.