MinterGateway.updateIndex()
Calculates and updates minterIndex AND earnerIndex to their current values
Distributes excess M, claimable by ZERO holders, in Distribution Vault
excessM=totalOwedMātotalSupplyofMToken,iftotalOwedM>totalSupplyofM
Calculates and updates minterIndex: minterIndexnowā=fn(minterIndexminterIndexLastUpdatedlTimestampā,rate,nowāminterIndexLastUpdatedTimestamp)
Sets latestMinterRate=minterInterestRateModel.getRate()
Sets minterIndexLastUpdatedTimestamp=now
Calculates and updates earnerIndex : earnerIndexnowā=fn(earnerIndexearnerIndexLastUpdatedTimestampā,rate,nowāearnerIndexLastUpdatedTimestamp)
Sets latestEarnerRate=earnerInterestRateModel.getRate()
Sets earnerIndexLastUpdatedlTimestamp=now
NOTE: index2=index1āe(rateātimeElapsed), using Pade(4, 4) approximation timeElapsed=nowāindexLastUpdatedTimestamp,
e(x)=(1+x/2+3(x2)/28+x3/84+x4/1680)/(1āx/2+3(x2)/28āx3/84+x4/1680)
Last updated