Stable Earner Interest Rate Model Contract

earnerRateModel.rate()earnerRateModel.rate()

  • Returns current earner rate in basis points: P1er1tP1=P2er2tP2P1 * e^{r1 * t} - P1 = P2 * e^{r2 *t} - P2

    • If totalActiveOwedM<=totalEarningSupplytotalActiveOwedM <= totalEarningSupply, r2=minterRatetotalActiveOwedM/totalEarningSupplyr2 = minterRate * totalActiveOwedM / totalEarningSupply,

    • Otherwise, calculates equilibrium rate P1er1tP1=P2er2tP2P1 * e^{r1 * t} - P1 = P2 * e^{r2 *t} - P2 r2=ln(1+(P1er1tP1)/P2),r2 = ln(1 +( P1 *e^{r1 * t} - P1) / P2), P1=totalActiveOwedMP1=totalActiveOwedM, P2=totalEarningSupplyP2=totalEarningSupply, t=confidence  intervalt=confidence\;interval

    • Returns min(baseEarnerRate,MULTIPLIERr2)min(baseEarnerRate,MULTIPLIER * r2), where baseEarnerRatebaseEarnerRate and minterRateminterRate are APY in basis points.

Last updated

Copyright 2024 M^0 Foundation