computeLinearTvl()
function computeLinearTvl(props): number
Computes the total value locked of a linear bonding curve.
Parameters
Parameter | Type | Description |
---|---|---|
props | ComputeLinearProps | ComputeLinearProps An object containing the parameters k and p for the linear bonding curve, and the supply of the token. |
Returns
number
The total value locked in the bonding curve.
Example
const params = {
k: 0.1,
p: 10,
supply: 10,
}
const res = computeLinearTvl(params)
console.log(res)