LinCurve
Inherits: LinFormula
This contract is used to get the purchase and sale return values for a linear curve.
Functions
getPurchaseReturn
Returns the purchase value using a Linear Curve.
Parameters
supply
uint256
token total supply
reserveBalance
uint256
current balance of the reserve token
initialCost
uint256
initial cost of the token
scalingFactor
uint32
scaling factor, represented in ppm, 1-1000000 token
depositAmount
uint256
amount of tokens to purchase
Returns
purchaseReturn
uint256
return of the conversion
getSaleReturn
Returns the sale value using a Linear Curve.
Parameters
supply
uint256
token total supply
reserveBalance
uint256
balance of the reserve token
initialCost
uint256
initial cost of the token
scalingFactor
uint32
scaling factor, represented in ppm, 1-1000000 token
sellAmount
uint256
amount of tokens to sell
Returns
saleReturn
uint256
return of the conversion