Skip to main content

Contract Info

All calculation functions are pure — they don’t read or modify state. You can call them off-chain for gas-free price quotes.

Functions

calculateBuyReturnWithParams

Calculate how many tokens you get for a given KAS amount.

calculateSellReturnWithParams

Calculate how much KAS you get for selling tokens.

calculateBuyCostWithParams

Calculate how much KAS you need to get a desired amount of tokens.

getCurrentPrice

Get the current spot price.

virtualToken / virtualKas

Default virtual reserves configured in the BondingCurve contract. Note: individual tokens may use different values via getTokenParamVersion().

curveType

Returns the curve type identifier.

Full ABI (JSON)