launchPreset
v1 linear-curve coefficients used when a market is created.
Returns the frozen v1 LinearCurveState: floor 0.0001 USDC/AVM, main slope 10n ** 10 WAD, ramp scalar 2.5 WAD. Ramp end/width are 0 in v1 (the ramp region is degenerate until a floor raise introduces one).
This is the engine a new market starts with. It is not a quote.
Import
import { launchPreset } from "@repo/contract-client/math";
Usage
import { launchPreset, priceAtSupply } from "@repo/contract-client/math";
import { asAvmAtoms } from "@repo/contract-client/types";
const engine = launchPreset();
const start = priceAtSupply(engine, asAvmAtoms(0n));
Return Value
LinearCurveState
| Field | v1 value |
|---|---|
schemaVersion | 1 |
floorPriceWad | 100_000_000_000_000 (0.0001 USDC) |
mainSlopeWad | 10_000_000_000 |
rampScalarWad | 2_500_000_000_000_000_000 (2.5) |
rampEndSupplyWad / rampWidthWad | 0 |
Parameters
None.
Error
None.