Defines the Oikos inflationary supply schedule, according to which the oikos inflationary supply is released.
Minting is performed in increments of a week whenever
recordMintEvent is called from
Oikos.mint. Minting can be called weekly after the time elapses for more than 7 days. These accrue so that no tokens are lost even if minting is not performed for several periods; the accrued total is minted at the next invocation. These computations are covered in more detail in the
The supply decay follows an exponential decay formula calculated for each week.
supplyForWeek = Initial Weekly Supply * (1 - rate of decay) ^ number of weeks
To the initial 100 million tokens, 75 million / 52 weeks tokens were added for 39 weeks in 2019. Supply decay was implemented in week 40 whereby the weekly inflationary supply follows an exponential decay of 1.25% per week for a total of 195 weeks at Week 234.
After Week 235 the OKS supply will grow at 2.5% APR based on the total Supply of OKS each week. Compounded weekly the supply growth APY is 2.53% for the terminal supply growth.
The duration of each minting period. This is constant at one week.
The timestamp when new supply was last minted - Is set to the number of weeks since inflation start date plus a minting buffer to allow feePeriod to close first.
The address of the main
The timestamp at which the inflationary OKS supply began to be minted.
uint public constant
The amount of tokens being issued weekly before exponential decay started. Used to calculate the supply each week once decay starts.
uint public constant
1442307692307692307692307 - 75e6 / 52
A buffer added to the lastMintEvent to ensure that oikos rewards are issued after a feePeriod closes.
uint public constant
Used as the quantity of OKS to reward the caller of
Oikos.mint, which incentivises users to continue minting the inflationary supply over time. Initialised to 200 OKS.
Week number when supply decay starts. Used along with weekCounter to determine when decay supply starts.
Week number when supply decay ends. Used along with weekCounter to determine when decay supply should end.
Inflation after this week would become be on the terminal inflation schedule.
Counter to record the number of weeks inflation has been issued and calculate the applicable supply to add based on the current weekCounter.
Sets up the minting schedule and the inherited
constructor(address _owner, uint _lastMintEvent, uint _weeksCounter) public
Allows the owner to set the
setOikos(ISynthetix _oikosProxy) external
Returns the number of tokens currently mintable from the inflationary supply.
isMintable returns false, this is 0. Otherwise, it is the number of tokens accruing per week in the current year, multiplied by the number of whole weeks since the last mint event.
mintableSupply() public view returns (uint)
This just returns its argument floor divided by
MINT_PERIOD_DURATION. Since this is only used in
mintableSupply() it seems as if a variable would have done better than a public function.
weeksSinceLastIssuance() public view returns (uint)
Returns true if minting from the inflationary supply is permitted at the present time.
This means that tokens are only mintable once a week.
isMintable() public view returns (bool)
This is called within
Oikos.mint to declare that the outstanding inflationary supply of tokens has been minted before they are actually distributed.
Although this function has no check that any tokens actually are mintable when it is called, the
Oikos contract requires it to be the case, so double calls should not occur. Similarly, the function does not itself enforce that the actual token supply has been increased by
Synthetix in a manner consistent with the defined schedule and must simply trust that this compact is observed.
The function always returns
true if the transaction was not reverted.
recordMintEvent() external returns (bool)
Allows the owner to set the current minter reward.
setMinterReward(uint _amount) external
Reverts the transaction if
msg.sender is not the
oikos address. Oikos address is found by lookup to the proxy.target().
Records that a quantity of new tokens was minted.
SupplyMinted(uint supplyMinted, uint numberOfWeeksIssued, uint lastMintEvent, uint timestamp)
Records that the minter reward was updated.