Skip to content

Commit

Permalink
Merge pull request #627 from morpho-org/docs/imorpho
Browse files Browse the repository at this point in the history
docs(ifc): fix comments
  • Loading branch information
MerlinEgalite authored Dec 5, 2023
2 parents 4f50a27 + 287fdfd commit e4ccec8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/interfaces/IMorpho.sol
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ interface IMorphoBase {
/// @dev Either `assets` or `shares` should be zero. Most usecases should rely on `assets` as an input so the caller
/// is guaranteed to have `assets` tokens pulled from their balance, but the possibility to mint a specific amount
/// of shares is given for full compatibility and precision.
/// @dev If the supply of a market gets depleted, the supply share price instantly resets to
/// `VIRTUAL_ASSETS`:`VIRTUAL_SHARES`.
/// @dev Supplying a large amount can revert for overflow.
/// @dev Supplying an amount of shares may lead to supply more or fewer assets than expected due to slippage.
/// Consider using the `assets` parameter to avoid this.
/// @param marketParams The market to supply assets to.
/// @param assets The amount of assets to supply.
/// @param shares The amount of shares to mint.
Expand Down Expand Up @@ -175,10 +175,10 @@ interface IMorphoBase {
/// @dev Either `assets` or `shares` should be zero. Most usecases should rely on `assets` as an input so the caller
/// is guaranteed to borrow `assets` of tokens, but the possibility to mint a specific amount of shares is given for
/// full compatibility and precision.
/// @dev If the borrow of a market gets depleted, the borrow share price instantly resets to
/// `VIRTUAL_ASSETS`:`VIRTUAL_SHARES`.
/// @dev `msg.sender` must be authorized to manage `onBehalf`'s positions.
/// @dev Borrowing a large amount can revert for overflow.
/// @dev Borrowing an amount of shares may lead to borrow fewer assets than expected due to slippage.
/// Consider using the `assets` parameter to avoid this.
/// @param marketParams The market to borrow assets from.
/// @param assets The amount of assets to borrow.
/// @param shares The amount of shares to mint.
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/periphery/MorphoBalancesLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ library MorphoBalancesLib {

uint256 elapsed = block.timestamp - market.lastUpdate;

// Skipped if elapsed == 0 of if totalBorrowAssets == 0 because interest would be null.
// Skipped if elapsed == 0 or if totalBorrowAssets == 0 because interest would be null.
if (elapsed != 0 && market.totalBorrowAssets != 0) {
uint256 borrowRate = IIrm(marketParams.irm).borrowRateView(marketParams, market);
uint256 interest = market.totalBorrowAssets.wMulDown(borrowRate.wTaylorCompounded(elapsed));
Expand Down

0 comments on commit e4ccec8

Please sign in to comment.