Interest Rate

Overview


This module calculates how much interest rate should be charged for both borrowers and lenders.

The goal is to allow borrowers to earn the spread between their underlying asset’s staking yield and the borrow rate to enable a leveraged staking yield strategy—while having the lenders earn the borrow rate that increases as the staking yield increases.

The interest rate should be charged to the borrowers based on what collateral they are depositing instead of what asset they are borrowing. If the collateral staking yield has lowered (or there is none to begin with, as is the case with many LRTs), there should be a minimum borrow rate that will be charged.

Design Decisions


Self Repaying Loans

When a user deposits a yield-bearing collateral, the revenue from the collateral’s underlying yield should automatically count towards the user’s total deposits.

As the yield accrues, the protocol will value the collateral with the SpotOracle. This automatically puts the user in a safer position because the collateral value goes up compared to the debt.

The Spot Oracle reports the market price multiplied by the LTV of the asset. So in reality it is not the actual exchange rate that directly reflects the yield accrued. Based on market sentiment or liquidity problems, the market price could be lower than the actual exchange rate. Using ReserveOracle would have more strictly reflected an increasing collateral value, but using SpotOracle inside IonPool allows the protocol to not be arbitraged.

Collateral-specific Utilization

Each collateral will have its own utilization rate U_c that is dynamically updated as a function of the total ETH lent by lenders: totalETHsupply, the collateral’s: distributionFactor, and the rate.

Upon any borrower or lender operations, the totalETHSupply changes, meaning every collateral’s interest rates need to be updated and accumulated since totalETHSupply can be changed based on lender actions, and thus a single action can change every collateral’s utilization rate.

Reactive Interest Rates

The underlying yield of the asset is reported to IonPool by the Yield Oracle. The borrow rate formula factors in this yield rate i.e. higher APY implies a higher borrow rate and vice versa. The protocol determines a minimum borrow rate to which this is viable then fixes the curve there if the APY goes too low.

This was designed to take the extra revenue from higher APYs and distribute it to lenders.

Borrowers maintain a spread between the APY and the borrow rate, but the extra APY won’t increase their existing spread. This allows the protocol to give more yield to lenders while maintaining leveraged staking yield for the borrowers.

If there is no yield being dispersed on the collateral, then this will trigger the minimum borrow rate. If the asset is not yield-bearing (or barely yield-bearing), the protocol will treat it as such. In the case that there is no yield at all, a much simpler version of the YieldOracle can be used that returns a value of 0 for the APY.

Last updated