Bonding Curve - Bera

Introduction

This is an implementation of a bonding curve mechanism for buying and selling Moonshot tokens based on virtual collateral and token reserves, also known as a Constant Product curve. The curve has an exponential shape so that the price rises slowly at the start and fast towards the end.

Once ~80% of the 1B token supply is sold on the curve, the fully diluted market cap reaches over 10,000 BERA and all remaining tokens & collateral migrate to Kodiak. Approximately ~1965 BERA of collateral is collected on the curve.

The price at migration is 16.56 times the initial price on curve

Definitions

Curve

vTOKEN * vBERA = k

Where,

  • vTOKEN = virtual reserve of the token

  • vBERA = virtual reserve of the collateral (BERA)

  • k = constant that determines the shape of the curve

Setting initial values

We set the value of the coefficient k based on the initial price of the token

k = vTOKEN * vBERA = iVTOKEN * iVBERA - (1)

Where, iVTOKEN and iVBERA are the initial amount of vTOKEN and vBERA respectively

We set these as follows :

  • iVTOKEN = 1.06 * 10^27 minimal unit token

  • iVBERA = 6.4 * 10^18 minimal unit token

Values

  • Total supply of tokens (T) = 1,000,000,000

  • Minimum price is set to 1gwei or 10^-9 BERA

  • MarketCapThreshold is set to a fully diluted market cap of 10,000 BERA at ~80% of tokens sold. It is simply the (1 billion ) * (Price of token at allocation A)

  • Allocation at Migration (A) = ~80% of total supply

    • The exact minimal token amount is 799,538,871. Tokens have 18 decimals. That will be the exact point passed when trading stops and the migration begins.

    • If a buyer places a larger trade right before the ~80% threshold, a max allocation of 80.94% can be sold on the curve

  • Fee to be deducted at the time of migration (F) = 45 BERA

Calculation on tokens to Migrate (M) :

For calculating M, we will calculate, at the time of migration (when supply reaches the allocation A),

  • BERA collected as collateral

  • Reduce the fee to be charged from the collateral BERA

  • Calculate the price at the time of migration (allocation reached)

  • Determine the no of tokens (to be migrated) based on the collateral collected and price at allocation

M = (collateral collected - migration fees) / price of token

  • Collateral Collected= current_virtual_collateral_reserves - initial_collateral_reserves

  • Migration fees = Fee charged for creating a pool on Uniswap + Moonshot migration Fee = 45 BERA

  • Price of token = current_virtual_collateral_reserve / current_virtual_token_reserve

Calculating tokens to Burn (B)

Tokens to Burn (B) = T - A - M

= Total Supply - allocation(tokens sold at migration) - tokens to migrate (M)

So the total tokens in circulation post migration would be = A + M

Last updated