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