Pricing a curve
The arithmetic behind every price and market cap on this site, written out so your number and ours agree.
The constant product
A curve behaves as a pool holding a virtual MNT reserve and a virtual token reserve whose product stays fixed. Both are derived from that token's own threshold rather than being constants:
VIRTUAL_TOKEN = 1_000_000_000e18
CURVE_SUPPLY = 700_000_000e18
MIGRATION_RESERVE = 300_000_000e18
virtualEth(threshold) = threshold * MIGRATION_RESERVE / CURVE_SUPPLY
= threshold / 4
k(threshold) = virtualEth(threshold) * VIRTUAL_TOKENThe quarter is not a taste decision. It is the only value that makes the curve sell exactly CURVE_SUPPLY at exactly the threshold, leaving exactly MIGRATION_RESERVE for the pool. Hardcode it and a token launched with a different threshold either sells out early or never fills.
Current price
Price is the ratio of the two reserves at their current point, quoted as wei of MNT per 1e18 tokens:
ethReserve = virtualEth(threshold) + realEth
tokenReserve = VIRTUAL_TOKEN - soldTokens
price = ethReserve * 1e18 / tokenReserveMarket cap
Price times the supply that is actually circulating. While a token is on its curve that is 700,000,000: the other 300,000,000 sit in the Launchpad waiting to become the pool, and nobody can buy or sell them. Once the token graduates they are in the pool and tradeable, so all 1,000,000,000 count.
on the curve marketCap = price * 700_000_000e18 / 1e18
after graduating marketCap = price * 1_000_000_000e18 / 1e18The change of basis is not cosmetic, and it is what makes the figure continuous across graduation — see below.
Market cap at graduation
Worth knowing because it is the number an operator actually picks. At the moment a curve fills, reserves are the threshold and 300 million tokens remain, which works out at a fixed multiple:
marketCap at graduation = (10/3) x thresholdSo a $20,000 graduation is a threshold worth about $6,000 of MNT, and the admin screen converts between the two at the current MNT price when you set it. The threshold is then a fixed quantity of MNT, so the dollar figure drifts with the price rather than being held.
Why the price drops at graduation
A curve prices a token as (virtualEth + realEth) / tokensRemaining. The virtual reserve is a constant in the formula, not money anybody paid — it is what stops the first buyer paying nothing. Only the real reserve migrates, so the pool opens below the curve's closing price by exactly the migration reserve's share of supply:
pool opening price / curve closing price = CURVE_SUPPLY / TOTAL_SUPPLY = 70%This is inherent to any bonding curve with a virtual reserve, and no threshold changes it. Whoever buys last on the curve pays the closing price and finds the pool 30% below it, which is worth knowing before buying into a nearly full curve.
The market cap does not move, because the 300,000,000 tokens stop being locked at the same instant the price adjusts and the two cancel exactly:
curve close on circulating = price * 700M = threshold * 10/3
pool open on total supply = price * 1000M = threshold * 10/3Quoting a trade
Both directions hold the product constant, then take the 1% fee off the input. The fee rounds up, so a trade split into dust cannot round its way out of paying:
fee = (amount * feeBps + 9999) / 10000Trades below 1000 wei are rejected. Below that the fee is the only thing left to round and dust becomes a way around it.
After graduation
None of this applies. A graduated token is priced by its Uniswap pool, so read slot0 for sqrtPriceX96 and convert as you would for any v3 pool. Check which of the pool's two tokens is token0 first, because it depends on address ordering.