Something.cool
  • Getting started
    • Why Something.cool?
    • 1st stage - Bonding curve
    • 2nd stage - CoolDEX trading
  • Zero-fee coins
    • What is Zero-fee coin?
    • How to launch Zero-fee coin
  • Community coins
    • What is Community coin?
    • Community contribution / How it works?
      • Holders
      • Liquidity providers
      • Burning
    • How to launch Сommunity coin
  • Features
    • Coin Explore
      • New Pairs
      • Coin Vision
    • Spaces
    • Rewards
  • Community
    • Referral program
    • X
    • Media kit
  • Developer Resources
  • Platform Architecture
    • Technical Introduction
    • Overview
    • Components
  • SC Bonding Curve
    • Overview
    • Functions
      • Create Token
      • Buy Token
      • Sell Token
      • Migrate
      • Admin Set Properties
    • Price Calculation
    • Fees
  • CoolDEX
    • Overview
    • Functions
      • Initialize Pool
      • Swap Base In
      • Swap Base Out
      • Deposit
      • Withdraw
      • Withdraw PnL
    • Price Calculation
    • Fees
  • Token Types
    • Token Types
  • Migration Process
    • Migration Process
  • Rewards Claiming
    • Overview
    • Authentication
    • Endpoints
    • Errors
    • Example
  • Reference
    • SC Bonding Curve IDL
    • CoolDEX IDL
    • Log Structure
    • DEVNET EXAMPLES
  • INTERNAL API
    • Overview
    • Register
  • Example: Registering a User via Internal API (JavaScript)
Powered by GitBook
On this page
  • What is a Bonding Curve?
  • Bonding Curve Technical Details
  • Constant Product Formula
  • Token Creation Process
  • Trading Mechanics
  • Migration Preparation
  1. SC Bonding Curve

Overview

SC Bonding Curve is the token issuance component of the Something Cool platform. It implements a bonding curve mechanism.

What is a Bonding Curve?

A bonding curve is a mathematical curve that defines the relationship between a token's price and its supply. As more tokens are purchased, the price increases according to a predefined formula. Similarly, as tokens are sold back, the price decreases.

Bonding Curve Technical Details

SC Bonding Curve uses a constant product formula for its bonding curve, but with an important addition: configurable virtual liquidity.

Constant Product Formula

The core formula that defines the relationship between token supply and price is:

k = (virtual_sol + real_sol) * (virtual_token + real_token)

Where:

  • virtual_sol and virtual_token are the configured virtual liquidity amounts

  • real_sol and real_token are the actual SOL and token in the bonding curve

  • k is the constant product that is maintained throughout trades

Token Creation Process

When creating a token on SC Bonding Curve, creators can specify:

  • Token name, symbol, and metadata

  • Token type (zero fee or community contribution)

  • Fee parameters for community contribution tokens

  • Initial distribution of fees (for burning, holders, and LP providers)

Trading Mechanics

Users can buy and sell tokens on the bonding curve:

  • Buying: Users send SOL and receive tokens at the current curve price

  • Selling: Users send tokens and receive SOL at the current curve price

SC Bonding Curve automatically manages the price adjustments according to the bonding curve formula.

Migration Preparation

SC Bonding Curve automatically prepares tokens for migration to the CoolDEX when:

  • The token supply available in the curve falls below a predefined threshold (POOL_MIGRATION_RESERVES)

  • This marks the token as "finalized" and ready for migration

This two-step approach (finalization followed by migration) ensures a smooth transition from the bonding curve to the DEX.

PreviousComponentsNextFunctions

Last updated 2 months ago