mirror of
https://github.com/Instadapp/dsa-connectors-2.0.git
synced 2024-07-29 21:57:39 +00:00
20 lines
899 B
Solidity
20 lines
899 B
Solidity
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
pragma solidity >=0.5.0;
|
|
|
|
import {MarketParams, Market} from "./IMorpho.sol";
|
|
|
|
/// @title IIrm
|
|
/// @author Morpho Labs
|
|
/// @custom:contact security@morpho.org
|
|
/// @notice Interface that Interest Rate Models (IRMs) used by Morpho must implement.
|
|
interface IIrm {
|
|
/// @notice Returns the borrow rate per second (scaled by WAD) of the market `marketParams`.
|
|
/// @dev Assumes that `market` corresponds to `marketParams`.
|
|
function borrowRate(MarketParams memory marketParams, Market memory market) external returns (uint256);
|
|
|
|
/// @notice Returns the borrow rate per second (scaled by WAD) of the market `marketParams` without modifying any
|
|
/// storage.
|
|
/// @dev Assumes that `market` corresponds to `marketParams`.
|
|
function borrowRateView(MarketParams memory marketParams, Market memory market) external view returns (uint256);
|
|
}
|