LinearVRGDA
Inherits: VRGDA
Authors: transmissions11 t11s@paradigm.xyz, FrankieIsLost frankie@paradigm.xyz
VRGDA with a linear issuance curve.
State Variables
perTimeUnit
The total number of tokens to target selling every full unit of time.
Represented as an 18 decimal fixed point number.
int256 internal immutable perTimeUnit;
Functions
constructor
Sets pricing parameters for the VRGDA.
constructor(int256 _targetPrice, int256 _priceDecayPercent, int256 _perTimeUnit)
VRGDA(_targetPrice, _priceDecayPercent);
Parameters
Name | Type | Description |
---|---|---|
_targetPrice | int256 | The target price for a token if sold on pace, scaled by 1e18. |
_priceDecayPercent | int256 | The percent price decays per unit of time with no sales, scaled by 1e18. |
_perTimeUnit | int256 | The number of tokens to target selling in 1 full unit of time, scaled by 1e18. |
getTargetSaleTime
Given a number of tokens sold, return the target time that number of tokens should be sold by.
function getTargetSaleTime(int256 sold) public view override returns (int256);
Parameters
Name | Type | Description |
---|---|---|
sold | int256 | A number of tokens sold, scaled by 1e18, to get the corresponding target sale time for. |
Returns
Name | Type | Description |
---|---|---|
<none> | int256 | The target time the tokens should be sold by, scaled by 1e18, where the time is relative, such that 0 means the tokens should be sold immediately when the VRGDA begins. |