ARC: Update AMPL interest rate curve to account for over-approximation in compounded interest

Following AIP-26 it was noticed that the interest accrued for the AMPL market above 75% utilization is higher than expected. After investigation the reason for the discrepancy was identified to be the following:

In AAVEs MathUtils there is an over-approximation in the application of the interest rate for computing compounded interest.

In calculateCompoundedInterest method

Periodic rate (per second) is computed as:

uint256 ratePerSecond = rate / SECONDS_PER_YEAR;

in comparison to the exact computation.


derived from:
.
The deviation in the applied interest rate causes a small over-approximation for APYs <10%, but grows exponentially as can be seen below.

Expected APY Effective APY Expected daily rate Effective daily rate
4.00% 4.08% 0.01% 0.01%
5.00% 5.13% 0.01% 0.01%
10.00% 10.52% 0.03% 0.03%
50.00% 64.87% 0.11% 0.14%
100.00% 171.83% 0.19% 0.27%
200.00% 638.91% 0.31% 0.55%
1000.00% 2202543.09% 0.68% 2.78%
10000.00% 2.69E+43% 1.30% 31.52%

This difference is especially noticeable in the AMPL market, where the configured interest rate can go up to 10,002% at max utilization.

The AAVE Genesis team has been made aware and they will publish more guidance on the discrepancy.

ARC Rationale

As mentioned in AIP-26, a nonlinear interest curve is more suited for AMPL’s market and potentially other assets on AAVE’s platform. It turns out that this over-approximation produces just such a curve.

The over-approximation mentioned above results in an exponentially growing curve which allows for defining a more suitable interest curve for AMPL. We propose the following parameters for AAVE’s default interest rate strategy, which produce the curve below:

  • Optimal utilization = 80%
  • Base rate = 1%
  • Slope1 = 2%
  • Slope2 = 750%

APY table above 80% Utilization:

Utilization APY
80.00% 3.05%
81.00% 49.93%
82.00% 118.15%
83.00% 217.40%
84.00% 361.82%
85.00% 571.94%
86.00% 877.67%
87.00% 1322.50%
88.00% 1969.72%
89.00% 2911.43%
90.00% 4281.60%
91.00% 6275.19%
92.00% 9175.85%
93.00% 13396.29%
94.00% 19536.98%
95.00% 28471.63%
96.00% 41471.48%
97.00% 60386.14%
98.00% 87906.81%
99.00% 127949.14%
100.00% 186210.38%

The part of the curve under 80% Utilization:

Rationale:

  1. Accounting for the over-approximation of the existing Slope2=10,000% interest curve requires reducing the slope2 parameter.
  2. Taking advantage of the exponential curve allows for:
    a. Setting a higher optimal utilization rate.
    b. Setting a higher maximum APY.
    without creating a too steep of an interest rate increase right above the optimal utilization rate.
8 Likes

Happy this found. Made it not worthwhile to borrow large sums when the borrow rate became too high. This will certainly change that for the better.

Question on the new fee structure - so the Slope 2 is 750%.
But this is using the “innacurate” calculation by Aave currently - so does this 750% equal 10,000% - or MORE I think right? Can you give the math of what it is at 95, 96, 97, 98, 99% and 100% utilised?

Also ^ If I am correct there that it is 10s of 1000s of %s at 99%-100% , then this also strongly needs a UI change from Aave to display this actual apy - i.e. it can’t say 750% if the true apy is 24,505% as then it is still mis-selling?

Im assuming answers to these questions are - yes, that needs to be the case , but want to clarify really…

4 Likes

Question on the new fee structure - so the Slope 2 is 750%.
But this is using the “innacurate” calculation by Aave currently - so does this 750% equal 10,000% - or MORE I think right? Can you give the math of what it is at 95, 96, 97, 98, 99% and 100% utilised?

Utilization APY
80.00% 3.05%
81.00% 49.93%
82.00% 118.15%
83.00% 217.40%
84.00% 361.82%
85.00% 571.94%
86.00% 877.67%
87.00% 1322.50%
88.00% 1969.72%
89.00% 2911.43%
90.00% 4281.60%
91.00% 6275.19%
92.00% 9175.85%
93.00% 13396.29%
94.00% 19536.98%
95.00% 28471.63%
96.00% 41471.48%
97.00% 60386.14%
98.00% 87906.81%
99.00% 127949.14%
100.00% 186210.38%

Also ^ If I am correct there that it is 10s of 1000s of %s at 99%-100% , then this also strongly needs a UI change from Aave to display this actual apy - i.e. it can’t say 750% if the true apy is 24,505% as then it is still mis-selling?

Agreed.

4 Likes

Also the section of interest rate curve for utilization <= 80%

3 Likes

Great Spot thank you for your great work!

2 Likes

Thanks for this well explained post @Naguib

In the last forum discussion about the calibration of AMPL interest rate parameters, multiple users among which @pakim249, @DFC, @danbainbridge and @BlockEnthusiast highlighted their concerns around 10,000% max APY not beeing enough given the rebasing opportunity

The AMPL reserved was fully utilised at multiple occasions and for lengthy periods with depositors unable to withdraw the liquidity they deposited since rational actors were borrowing the available liquidity to take advantage of the superior yield offered by the rebasing. To avoid this situation again, I believe that the max borrow rate should be aligned with the rebasing returns

Stats Rebase %
Min -6.8
5% Percentile -3.3
25% Percentile -1.6
Median 0.0
Average 0.2
75% Percentile 1.0
95% Percentile 5.0
Max 27.1

Historical statistics on rebasing data place a 5% rebase as the 95% percentile of the distribution. It seems the interest rate model max rate should cover this scenario as it’s not sustainable to call upon governance for frequent parameters adjustments. 5% daily yield takes us to 1825% APR which takes us to ​5,421,184,057% APY with daily compounding. Based on this the current 10,000% slope 2 seems excessive while the 750% seems too low

2 Likes

You have a misunderstanding here actually now Alex, the new 750% IS based on the inaccurate aave math so 750% at slope 2 really gives 182k% at 100% utilised:

|98.00%|87906.81%|
|99.00%|127949.14%|
|100.00%|186210.38%|

(See my question above and @Naguib 's answer too)

I think 182k% is enough, so I back this proposal - but I strongly think it NEEDS the full UI update from Aave to really show the true apy.

182k% is a very large number, and here I would expect it is more than enough to reward AMPL lenders - it is a risk trade off between super long ampl maxis who want to hold ampl spot and take the risk of it swinging the other way , compared to pure farmers who supply liquidity and want to earn in the short term and not hold ampl long as a portfolio hold. I see it as just a safe vs risky tranche basically.

5 Likes

I believe @Alex_BertoG was referring to the fact that a 750% expected APY even after translating to 182k% effective APY still doesn’t reach the daily expected interest rate needed to prevent a liquidity crunch on high rebase days. I agree with her, and don’t think APY is the correct metric to use when discussing this issue. The rebase battles are fought day by day, so it is more appropriate to look at the effective daily rate.

Users being unable to withdraw from AAVE is a very bad situation and needs to be avoided. I don’t think simply raising interest rates is a perfect solution for the reasons @BlockEnthusiast pointed out in the other thread. Even if the daily APR is equal to the rebase, this won’t stop liquidity from being unavailable in the moments leading up to the rebase. So raising interest rates should only have the effect of reducing the amount of time that withdrawals are unavailable. This is an improvement, but this solution is hostile to borrowers and creates instability in the market.

@Naguib Great find on the formula issue. This appears to be the simple interest rate model, and from what I understand about the mechanics of AAVE, the rate is updated every time someone interacts with the lending pool. Assuming that the lending pool is interacted with often, doesn’t this mean that what we were calling APY is essentially APR?

4 Likes

Thanks @Alex_BertoG for summarizing comments from the previous ARC! Responses to different points below.

The AMPL reserved was fully utilised at multiple occasions and for lengthy periods with depositors unable to withdraw the liquidity they deposited since rational actors were borrowing the available liquidity to take advantage of the superior yield offered by the rebasing.

This was the case with ~60% APY. Which was clearly low and it was expected prelaunch that an adjustment will be needed after the launch. Deriving from the behavior at max ~60% APY that the needed APY is as high as 6,565,963,106% (The equivalent of 5% daily) is a big stretch.

To avoid this situation again, I believe that the max borrow rate should be aligned with the rebasing returns

While avoiding 100% utilization is a major goal there are other factors at play.
Setting an APY as high as 6M%:

  1. Will be costly to long term borrowers due to the potential short lived but very high interest rates.
  2. The sensitivity of such very steep curve to utilization will make the borrowing market very unpredictable reducing its utility.

The proposed curve above at its maximum daily interest is equivalent to rebase amount at VWAP $1.26.
The frequency of days that far from the target are reducing over time and no sign that that will change. Over the previous 90 days, it is at 4.44% of the days. Further increasing interest rates to optimize for 4% of the time that’s expected to keep going down at the expense of the utility of the other 96% of the time. Is not a great balance.

It seems the interest rate model max rate should cover this scenario as it’s not sustainable to call upon governance for frequent parameters adjustments.

There is no expectation that this is the strategy going forward.

4 Likes

The effective daily rate equivalent has been considered in setting the parameters for the curve above. Check my reply to @Alex_BertoG above.

This appears to be the simple interest rate model, and from what I understand about the mechanics of AAVE, the rate is updated every time someone interacts with the lending pool. Assuming that the lending pool is interacted with often, doesn’t this mean that what we were calling APY is essentially APR?

I believe what you are describing is Compound’s implementation.

In AAVE’s implementation the frequency of interactions doesn’t affect the interest accrued so the final value is deterministic. The way to describe AAVE’s interest in terms of APR is that it is APR compounded every second.

1 Like

How is this a stretch? It only seems like a stretch when you use APY as the metric. The max APY will very rarely be actually realized, so it is far more realistic to look at APR. Also, if 60% APY was clearly low and your team expected an adjustment prelaunch, why is this only being mentioned now? How come this wasn’t mentioned in the original proposal? I’m going to have to call BS on this one.

I don’t buy this either. The burden of proof should be a lot higher than what you’re presenting here. The sample size for high rebase numbers is extremely low over a 90 day period, so in terms of statistical significance, I don’t think there’s much evidence to support this assertion.

I’m uncertain of what expense you are referring to here. On the other 96% of the days, there will be little to no borrowing demand if we go off of the short history we have, so borrowers will be unaffected for those 96% of days.

I’m going through the code and it looks like you’re mostly right. The interest rate is approximated with the first few terms of a binomial expansion, so number of interactions shouldn’t change the interest received by much.

1 Like

When do you start voting? Implement quickly

1 Like

The other factors at play are

  • Clever borrowers will try to enter and exit exactly around rebase to minimize fees paid.
  • Clever lenders will try to exit end enter exactly around rebase to minimize realized loss in cases of positive rebase.

No matter what you will be getting 100% utilization.

While we discuss to APY, we are not considering the time borrowed. Please read my previous post where I demonstrate that at $1.27 (sorry didn’t map $1.26) 1,436,657% APR for 1 minute entry / exit around rebase.

I literally broke the APY calculator converting that APR and I don’t think we can reach infinite APY.

I don’t think you are really considering the more nefarious usage, and because of that, you are overlooking this massive problem. It will always get 100% utilized in positive rebase, and charging more interest doesn’t solve that, because interest is counting on continuous borrows where the borrower does not know the directionality that an asset will move or by how much. Here, a borrower knows exactly how much, and when.

Potentially with some MEV prevention techniques around rebase, we could get that window up to 15 minutes from 1, but that still does not adequately negate the problem.

I think you should consider options to hedge risk, where daily settlement can be explicit, and time to rebase can be taken into account as a market price rather than unaccounted for as interest.

5 Likes

U said it exactly…hope AMPL and aave team can solve this problem…

1 Like

There is no implementation needed this is a configuration change.

2 Likes

The other factors at play are

  • Clever borrowers will try to enter and exit exactly around rebase to minimize fees paid.
  • Clever lenders will try to exit end enter exactly around rebase to minimize realized loss in cases of positive rebase.

Those are considered factors too.

  1. I disagree that they have or will have a significant effect in the whole lending market when considering diverse market actors.
  2. I agree that these factors aren’t to be addressed through the interest rate curve and other mitigations are to be considered if need be.

I didn’t verify the numbers in your analysis, if you are interested in a deeper response to your analysis when mentioning APR please clarify the length or number of compounding period just saying APR in this context on its own is ambiguous. In traditional finance APR is usually referring to APR compounded monthly which is rarely what is being referred to in the context of DeFi lending. For analysis purposes it is always better to use accrued interest for a specific period or APY as those aren’t ambiguous.

2 Likes

I always use flat no compounding for APR since APY has ambiguity around epochs. Maybe in trade fi it includes compounding, but from my experience in DeFi, its targets just rate of return vs liquidity without compounding unless a built in compounding product in whichcase often APY is used as the qualifier. IMO, its always better to use flat APR so various users can apply their own epochs as directly as possible.

I included the formula in the most important chart, 1 min, but apologies, my poor cropping cut it off in the others.
Borrow Rate = (Rebase Amount Earned By Borrowers / Borrowed Amount) * period

Where the period is 365 for reward earned over 1 day and 525,600 for reward earned over 1 minute.

This should equate the rate someone would earn in that period, and so an equivalent borrow rate reflects a neutral market where both the lender and borrower net neutral over the period.

  1. Do you disagree that diverse market actors will have to factor into their models squeezes towards 100% utilization will likely occur, and the respective consequences on interested and withdrawals during certain periods.

Lets reflect on the AMM example. Yes, Liquidity Providers are earning fees as to be expected, but if not synced they’d have rebase siphoned out by those entering and exiting around rebase. In that context, while the market will continue to work regardless of actors factoring in this form of value siphoning, any smart actor would take that siphoning risk into consideration as a requirement of participation in such a market. The same goes here from my view, that all market participants must bend their strategies to this risk. If a long term borrower, I will face periods of extremely high interest. I must consider that impact.

Whereas I don’t really care if someone else borrowed LINK and is shorting it, while I arb the curve link rate, I would care if there was suddenly an incentive to borrow LINK for some new farm spike the rate past my return. Why lose money when I can close my position.

AMPL lenders must consider that interest will likely never reach parity with losses under this model in positive rebase. That has an impact on lazy strategies regardless of other people using the pools other ways. Daily rates don’t make sense when I can condense my risk far smaller than a day.

A playground can be used many ways, but if there is a group using it as a paintball field, that will certainly devolve into the only way that playground is used is as a paintball field untill the paintball players leave. No one would risk getting in the middle of that fight to do some swings or something else unrelated.

3 Likes

when will this ARC go live…

1 Like

SOOOOOOOOOOOOOOOOON :joy: