LFG.CLUB
  • Hello there
  • Bonding Curve
    • How it works
    • Displayed Token
    • Create Token
    • Metadata
    • Buy and Sell
    • Bonding Curve Math
    • Migration
    • Slightly Deflationary
    • Locks
  • Deposit Contract
    • Deposit, Claim, and Withdraw
  • LFG Token
    • Tokenomics
  • Deployments and liquidity lock
  • Locks
  • Deployment Addresses
    • Testnet
    • All Chains
  • Links
    • Links
Powered by GitBook
On this page
  1. Bonding Curve

Bonding Curve Math

We apply a constant product formula like

y=k⋅xy = k \cdot xy=k⋅x

but with virtual ETH and virtual tokens. This is done because a constant product formula doesn't work when one reserve is 0. And as the bonding curve starts with 0 ETH (and can also finish with 0) we needed to add some virtual reserves to it. This means that the actual formula to calculate how many tokens we receive for how many ETH is following:

T=Tv⋅EEv+ET = \frac{T_v \cdot E}{E_v + E}T=Ev​+ETv​⋅E​

where T are the Tokens we receive, ( T_v ) are the virtual Tokens, ( E_v ) the virtual ETH, and E the actual input ETH (after fee deduction).

Similarily for a sell you update the forumula simply to:

E=Ev⋅TTv+TE = \frac{E_v \cdot T}{T_v + T}E=Tv​+TEv​⋅T​

In our case we start with a virtual supply of 1,073,000,000 tokens and 30 virtual ETH. The ETH and virtual ETH are multiplied with following numbers:

            (priceETH < 3450):
            E_mul0 = 49044814340589;
            E_mul1 = 4000000000000;
            
            (priceETH >= 3450) && (priceETH < 6900):
            E_mul0 = 1259469696969697;
            E_mul1 = 62500000000000;
            
            else:
            E_mul0 = 8060606060606061;
            E_mul1 = 200000000000000;

as

Emul=E⋅Emul0Emul1E_{mul} = \frac{E \cdot E_{mul0}}{E_{mul1}} Emul​=Emul1​E⋅Emul0​​
PreviousBuy and SellNextMigration

Last updated 29 days ago