SDKs@solio/coreUtilscomputeBondingCurveTvl

computeBondingCurveTvl()

function computeBondingCurveTvl(props): number

Computes the total value locked of a bonding curve.

Parameters

ParameterTypeDescription
propsComputeBondingCurvePropsComputeBondingCurveProps An object containing the bonding curve type, its parameters, and the current supply of the token.

Returns

number

The total value locked in the bonding curve.

Example

const params = {
  type: 'linear',
  param: {
    k: 0.1,
    p: 10,
  },
  supply: 10,
}
const res = computeBondingCurveTvl(params)
console.log(res)