Skip to content

Commit e4ccec8

Browse files
Merge pull request #627 from morpho-org/docs/imorpho
docs(ifc): fix comments
2 parents 4f50a27 + 287fdfd commit e4ccec8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/interfaces/IMorpho.sol

+4-4
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ interface IMorphoBase {
132132
/// @dev Either `assets` or `shares` should be zero. Most usecases should rely on `assets` as an input so the caller
133133
/// is guaranteed to have `assets` tokens pulled from their balance, but the possibility to mint a specific amount
134134
/// of shares is given for full compatibility and precision.
135-
/// @dev If the supply of a market gets depleted, the supply share price instantly resets to
136-
/// `VIRTUAL_ASSETS`:`VIRTUAL_SHARES`.
137135
/// @dev Supplying a large amount can revert for overflow.
136+
/// @dev Supplying an amount of shares may lead to supply more or fewer assets than expected due to slippage.
137+
/// Consider using the `assets` parameter to avoid this.
138138
/// @param marketParams The market to supply assets to.
139139
/// @param assets The amount of assets to supply.
140140
/// @param shares The amount of shares to mint.
@@ -175,10 +175,10 @@ interface IMorphoBase {
175175
/// @dev Either `assets` or `shares` should be zero. Most usecases should rely on `assets` as an input so the caller
176176
/// is guaranteed to borrow `assets` of tokens, but the possibility to mint a specific amount of shares is given for
177177
/// full compatibility and precision.
178-
/// @dev If the borrow of a market gets depleted, the borrow share price instantly resets to
179-
/// `VIRTUAL_ASSETS`:`VIRTUAL_SHARES`.
180178
/// @dev `msg.sender` must be authorized to manage `onBehalf`'s positions.
181179
/// @dev Borrowing a large amount can revert for overflow.
180+
/// @dev Borrowing an amount of shares may lead to borrow fewer assets than expected due to slippage.
181+
/// Consider using the `assets` parameter to avoid this.
182182
/// @param marketParams The market to borrow assets from.
183183
/// @param assets The amount of assets to borrow.
184184
/// @param shares The amount of shares to mint.

src/libraries/periphery/MorphoBalancesLib.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ library MorphoBalancesLib {
4141

4242
uint256 elapsed = block.timestamp - market.lastUpdate;
4343

44-
// Skipped if elapsed == 0 of if totalBorrowAssets == 0 because interest would be null.
44+
// Skipped if elapsed == 0 or if totalBorrowAssets == 0 because interest would be null.
4545
if (elapsed != 0 && market.totalBorrowAssets != 0) {
4646
uint256 borrowRate = IIrm(marketParams.irm).borrowRateView(marketParams, market);
4747
uint256 interest = market.totalBorrowAssets.wMulDown(borrowRate.wTaylorCompounded(elapsed));

0 commit comments

Comments
 (0)