Stable Earner Interest Rate Model Contract

earnerRateModel.rate()earnerRateModel.rate()

  • Returns current earner rate in basis points: P1āˆ—er1āˆ—tāˆ’P1=P2āˆ—er2āˆ—tāˆ’P2P1 * e^{r1 * t} - P1 = P2 * e^{r2 *t} - P2

    • If totalActiveOwedM<=totalEarningSupplytotalActiveOwedM <= totalEarningSupply, r2=minterRateāˆ—totalActiveOwedM/totalEarningSupplyr2 = minterRate * totalActiveOwedM / totalEarningSupply,

    • Otherwise, calculates equilibrium rate P1āˆ—er1āˆ—tāˆ’P1=P2āˆ—er2āˆ—tāˆ’P2P1 * e^{r1 * t} - P1 = P2 * e^{r2 *t} - P2 r2=ln(1+(P1āˆ—er1āˆ—tāˆ’P1)/P2),r2 = ln(1 +( P1 *e^{r1 * t} - P1) / P2), P1=totalActiveOwedMP1=totalActiveOwedM, P2=totalEarningSupplyP2=totalEarningSupply, t=confidenceā€…ā€Šintervalt=confidence\;interval

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

Last updated

Copyright 2024 M^0 Foundation