DefaultReserveInterestRateStrategy
https://docs.aave.com/developers/deployed-contracts/v3-mainnet/ethereum-mainnet
Last updated
https://docs.aave.com/developers/deployed-contracts/v3-mainnet/ethereum-mainnet
Last updated
The DefaultReserveInterestRateStrategy contract is essentially the on-chain interest rate model. It contains two key functions:
calculateInterestRates
_getOverallBorrowRate
calculateInterestRates
calculates the latest supply, variable borrow and stable borrow rates as explained previously.
_getOverallBorrowRate
calculates the overall borrow rate given how much stable and variable rate loans have been taken.
Each asset has its interest rate parameters stored on-chain via a DefaultReserveInterestRateStrategy
contract.
These parameters are set in the constructor on deployment. We can explore their values by interacting with the deployed contract. For example, DAI contract on mainnet:
https://etherscan.io/address/0x694d4cFdaeE639239df949b6E24Ff8576A00d1f2#readContract
These parameters were obtained from DAI's DefaultReserveInterestRateStrategy
contract, and are accurate at time of writing.
Other contract addresses: https://docs.aave.com/developers/deployed-contracts/v3-mainnet/ethereum-mainnet
Periodically, parameters are modified to better suit market conditions. Proposals to update these parameters are submitted and passed via Aave's governance.
Calculates the overall borrow rate as the weighted average between the total variable debt and total stable debt.
Executed as part of .updateInterestRates, it is usually ran towards the end of a state-changing function (borrow, supply, etc). It calculates the new interest rates for
supply
variable borrow
stable borrow
given that liquidity conditions and utilization have changed. This is well explained in the common functions section: calculateInterestRates.