LinearVRGDA

Git Source

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

NameTypeDescription
_targetPriceint256The target price for a token if sold on pace, scaled by 1e18.
_priceDecayPercentint256The percent price decays per unit of time with no sales, scaled by 1e18.
_perTimeUnitint256The 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

NameTypeDescription
soldint256A number of tokens sold, scaled by 1e18, to get the corresponding target sale time for.

Returns

NameTypeDescription
<none>int256The 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.