The formula
The curve maintains two virtual reserves and keeps their product constant:- Buys add ETH to
virtualEthand remove tokens fromvirtualToken→ price rises. - Sells do the opposite → price falls.
- The spot price at any moment is
virtualEth / virtualToken.
Curve parameters
With the current 1.6 ETH virtual reserve, that works out to:
The virtual ETH reserve is the protocol’s single economic knob and is fixed per deployment. It scales the ETH cost of the curve without changing its shape. All other constants are hard-coded in the contract.
Buys, sells, and rounding
For a buy ofethIn (after the 1% fee is skimmed):
k can never decrease), which protects the curve’s solvency. This invariant is fuzz-tested in the contract suite.
Quotes from the contract’s quoteBuy / quoteSell functions are exact. The SDK also ships a bit-exact client-side mirror of this math so UIs and bots can quote without an RPC round-trip.
Graduation trigger
The curve tracks how much of the 793.1M sale allocation remains. The buy that empties it:- Fills exactly to the remaining supply (excess ETH is refunded in the same transaction),
- Marks the curve graduated, permanently frozen, and
- Makes the token eligible for migration to Uniswap v3.
Why sells can never break the curve
The invariantrealEth = virtualEth − virtualEth₀ holds at all times: the real ETH held by the contract is exactly what buyers put in (net of fees), which is exactly what the curve would owe if every holder sold back down to the starting point. The curve is always solvent by construction.
