Protocol

Bonding curve

Every token is priced by a virtual constant-product market maker until it graduates to Uniswap.

The constant-product formula

GetBased uses the same invariant as Uniswap V2: x · y = k. Here x is the virtual ETH reserve and y is the token reserve remaining on the curve. The product k stays constant across trades.

The price of one token at any moment is simply the ratio of the two reserves:

price (ETH per token)
price = virtualEthReserve / virtualTokenReserve

Buying

When you buy, your ETH (minus the trading fee) is added to the virtual ETH reserve. The new token reserve is derived from k, and the difference is sent to you:

buy
newVirtualEth   = virtualEthReserve + ethIn
newVirtualToken = k / newVirtualEth
tokensOut       = virtualTokenReserve - newVirtualToken

Selling

Selling is the mirror image. Your tokens are added back to the token reserve, and the ETH you receive is the drop in the virtual ETH reserve:

sell
newVirtualToken = virtualTokenReserve + tokensIn
newVirtualEth   = k / newVirtualToken
ethOut          = virtualEthReserve - newVirtualEth

Real vs. virtual reserves

The curve starts with a virtualETH reserve (1.5 ETH) so the opening price isn't zero. Sells can only ever pay out the real ETH that has actually been collected from buyers.

Starting parameters

ParameterValue
initialVirtualEthsets opening price1.5 ETH
BONDING_SUPPLY800,000,000
kinitialVirtualEth × BONDING_SUPPLY
tradingFeeBps100 (1%)

Slippage protection

  • buy takes a _minTokensOut and reverts if the curve would deliver fewer tokens.
  • sell takes a _minEthOut and reverts if the payout would be smaller.