computeLinearPrice()
function computeLinearPrice(props): numberComputes the price 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 current price of the token.
Example
const params = {
k: 0.1,
p: 10,
supply: 10,
}
const res = computeLinearPrice(params)
console.log(res)