Fraction ProtocolgenericFacetspriceFacetsbondingCurvePriceFacetslinearCurveFacetlibs
LinearCurve
Curve
averageMintPrice
Calculates the per-token price of minting the specified amount of tokens
Parameters
Name | Type | Description |
---|---|---|
curve | struct LinearCurve.Curve | Parameters of the Curve |
amount | uint256 | Amount of tokens to mint |
currentSupply | uint256 | Supply of tokens before minting |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | average price of minting one token in a batch |
averageBurnPrice
Calculates the per-token refund for burning the specified amount of tokens
Parameters
Name | Type | Description |
---|---|---|
curve | struct LinearCurve.Curve | Parameters of the Curve |
amount | uint256 | Amount of tokens to burn |
currentSupply | uint256 | Supply of tokens before burning |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | average refund of burning one token in a batch |
priceAt
Calculates price of a token at a point with specified supply
equals to mintPrice(1, targetSupply, curveParams)
or burnPrice(1, targetSupply+1, curveParams)
Parameters
Name | Type | Description |
---|---|---|
curve | struct LinearCurve.Curve | Parameters of the Curve |
targetSupply | uint256 | Supply of tokens to get price |