-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/docs/natspec-in-interface' into …
…fix/bound-rate
- Loading branch information
Showing
2 changed files
with
20 additions
and
12 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
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 |
---|---|---|
|
@@ -8,6 +8,23 @@ import {Id} from "../../../lib/morpho-blue/src/interfaces/IMorpho.sol"; | |
/// @author Morpho Labs | ||
/// @custom:contact [email protected] | ||
interface IFixedRateIrm is IIrm { | ||
/* EVENTS */ | ||
|
||
/// @notice Emitted when a borrow rate is set. | ||
event SetBorrowRate(Id indexed id, uint256 newBorrowRate); | ||
|
||
/* EXTERNAL */ | ||
|
||
/// @notice Max settable borrow rate (800%). | ||
function MAX_BORROW_RATE() external returns (uint256); | ||
|
||
/// @notice Borrow rates. | ||
function borrowRateStored(Id id) external returns (uint256); | ||
|
||
/// @notice Sets the borrow rate for a market. | ||
/// @dev A rate can be set by anybody, but only once. | ||
/// @dev `borrowRate` reverts on rate not set, so the rate needs to be set before the market creation. | ||
/// @dev As interest are rounded down in Morpho, for markets with a low total borrow, setting a rate too low could | ||
/// prevent interest from accruing if interactions are frequent. | ||
function setBorrowRate(Id id, uint256 newBorrowRate) external; | ||
} |