-
Notifications
You must be signed in to change notification settings - Fork 587
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Complete interfaces of IReserveInterestRateStrategy and IPoolDat…
…aProvider (#763) * feat: complete interface & use inheritdoc * Added missing functions on IReserveInterestRateStrategy and inheritdoc on DefaultInterestRateStrategy * fix: added missing overrides, docs for constructor and added ADDRESSES_PROVIDER to interface * fix: sepparated interest rate strategy interface into default and rate interfaces * fix: added visibility to false rule * fix: minor fixes * fix: fixed natspec. Fixed import order * Update contracts/interfaces/IDefaultInterestRateStrategy.sol * Apply suggestions from code review * Apply suggestions from code review * fix: fixed correct import order Co-authored-by: eboado <[email protected]> Co-authored-by: sendra <[email protected]> Co-authored-by: sendra <[email protected]> Co-authored-by: miguelmtz <[email protected]>
- Loading branch information
1 parent
9ccb1ab
commit dd15e23
Showing
6 changed files
with
357 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
// SPDX-License-Identifier: AGPL-3.0 | ||
pragma solidity ^0.8.0; | ||
|
||
import {IReserveInterestRateStrategy} from './IReserveInterestRateStrategy.sol'; | ||
import {IPoolAddressesProvider} from './IPoolAddressesProvider.sol'; | ||
|
||
/** | ||
* @title IDefaultInterestRateStrategy | ||
* @author Aave | ||
* @notice Defines the basic interface of the DefaultReserveInterestRateStrategy | ||
*/ | ||
interface IDefaultInterestRateStrategy is IReserveInterestRateStrategy { | ||
/** | ||
* @notice Returns the usage ratio at which the pool aims to obtain most competitive borrow rates. | ||
* @return The optimal usage ratio, expressed in ray. | ||
*/ | ||
function OPTIMAL_USAGE_RATIO() external view returns (uint256); | ||
|
||
/** | ||
* @notice Returns the optimal stable to total debt ratio of the reserve. | ||
* @return The optimal stable to total debt ratio, expressed in ray. | ||
*/ | ||
function OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO() external view returns (uint256); | ||
|
||
/** | ||
* @notice Returns the excess usage ratio above the optimal. | ||
* @dev It's always equal to 1-optimal usage ratio (added as constant for gas optimizations) | ||
* @return The max excess usage ratio, expressed in ray. | ||
*/ | ||
function MAX_EXCESS_USAGE_RATIO() external view returns (uint256); | ||
|
||
/** | ||
* @notice Returns the excess stable debt ratio above the optimal. | ||
* @dev It's always equal to 1-optimal stable to total debt ratio (added as constant for gas optimizations) | ||
* @return The max excess stable to total debt ratio, expressed in ray. | ||
*/ | ||
function MAX_EXCESS_STABLE_TO_TOTAL_DEBT_RATIO() external view returns (uint256); | ||
|
||
/** | ||
* @notice Returns the address of the PoolAddressesProvider | ||
* @return The address of the PoolAddressesProvider contract | ||
*/ | ||
function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider); | ||
|
||
/** | ||
* @notice Returns the variable rate slope below optimal usage ratio | ||
* @dev It's the variable rate when usage ratio > 0 and <= OPTIMAL_USAGE_RATIO | ||
* @return The variable rate slope, expressed in ray | ||
*/ | ||
function getVariableRateSlope1() external view returns (uint256); | ||
|
||
/** | ||
* @notice Returns the variable rate slope above optimal usage ratio | ||
* @dev It's the variable rate when usage ratio > OPTIMAL_USAGE_RATIO | ||
* @return The variable rate slope, expressed in ray | ||
*/ | ||
function getVariableRateSlope2() external view returns (uint256); | ||
|
||
/** | ||
* @notice Returns the stable rate slope below optimal usage ratio | ||
* @dev It's the stable rate when usage ratio > 0 and <= OPTIMAL_USAGE_RATIO | ||
* @return The stable rate slope, expressed in ray | ||
*/ | ||
function getStableRateSlope1() external view returns (uint256); | ||
|
||
/** | ||
* @notice Returns the stable rate slope above optimal usage ratio | ||
* @dev It's the variable rate when usage ratio > OPTIMAL_USAGE_RATIO | ||
* @return The stable rate slope, expressed in ray | ||
*/ | ||
function getStableRateSlope2() external view returns (uint256); | ||
|
||
/** | ||
* @notice Returns the stable rate excess offset | ||
* @dev It's an additional premium applied to the stable when stable debt > OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO | ||
* @return The stable rate excess offset, expressed in ray | ||
*/ | ||
function getStableRateExcessOffset() external view returns (uint256); | ||
|
||
/** | ||
* @notice Returns the base stable borrow rate | ||
* @return The base stable borrow rate, expressed in ray | ||
*/ | ||
function getBaseStableBorrowRate() external view returns (uint256); | ||
|
||
/** | ||
* @notice Returns the base variable borrow rate | ||
* @return The base variable borrow rate, expressed in ray | ||
*/ | ||
function getBaseVariableBorrowRate() external view returns (uint256); | ||
|
||
/** | ||
* @notice Returns the maximum variable borrow rate | ||
* @return The maximum variable borrow rate, expressed in ray | ||
*/ | ||
function getMaxVariableBorrowRate() external view returns (uint256); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.