2020-05-29 16:45:37 +00:00
|
|
|
// SPDX-License-Identifier: agpl-3.0
|
|
|
|
pragma solidity ^0.6.8;
|
|
|
|
|
|
|
|
/**
|
|
|
|
@title IReserveInterestRateStrategyInterface interface
|
|
|
|
@notice Interface for the calculation of the interest rates.
|
|
|
|
*/
|
|
|
|
|
|
|
|
interface IReserveInterestRateStrategy {
|
2020-07-13 08:54:08 +00:00
|
|
|
/**
|
|
|
|
* @dev returns the base variable borrow rate, in rays
|
|
|
|
*/
|
2020-05-29 16:45:37 +00:00
|
|
|
|
2020-08-24 12:35:59 +00:00
|
|
|
function baseVariableBorrowRate() external view returns (uint256);
|
2020-05-29 16:45:37 +00:00
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
/**
|
|
|
|
* @dev calculates the liquidity, stable, and variable rates depending on the current utilization rate
|
|
|
|
* and the base parameters
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
function calculateInterestRates(
|
2020-08-21 13:38:47 +00:00
|
|
|
address reserve,
|
|
|
|
uint256 utilizationRate,
|
|
|
|
uint256 totalBorrowsStable,
|
|
|
|
uint256 totalBorrowsVariable,
|
|
|
|
uint256 averageStableBorrowRate
|
2020-07-13 08:54:08 +00:00
|
|
|
)
|
2020-05-29 16:45:37 +00:00
|
|
|
external
|
|
|
|
view
|
2020-07-13 08:54:08 +00:00
|
|
|
returns (
|
|
|
|
uint256 liquidityRate,
|
|
|
|
uint256 stableBorrowRate,
|
|
|
|
uint256 variableBorrowRate
|
|
|
|
);
|
2020-05-29 16:45:37 +00:00
|
|
|
}
|