From ca589a954d84295b7d1aafdbcbc98496f6071916 Mon Sep 17 00:00:00 2001 From: MathisGD Date: Mon, 13 Nov 2023 09:16:02 +0100 Subject: [PATCH 1/5] docs: document reset share price jump --- src/interfaces/IMorpho.sol | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/interfaces/IMorpho.sol b/src/interfaces/IMorpho.sol index 781a32f0a..d42add581 100644 --- a/src/interfaces/IMorpho.sol +++ b/src/interfaces/IMorpho.sol @@ -130,6 +130,7 @@ 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 Upon reset of a market (withdrawing all supply shares), the supply share price suddenly decreases. /// @dev Supplying a large amount can revert for overflow. /// @param marketParams The market to supply assets to. /// @param assets The amount of assets to supply. @@ -171,6 +172,7 @@ 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 Upon reset of a market (repaying all borrow shares), the borrow share price suddenly decreases. /// @dev `msg.sender` must be authorized to manage `onBehalf`'s positions. /// @dev Borrowing a large amount can revert for overflow. /// @param marketParams The market to borrow assets from. From e5a5cb415b6c91aa8fd24ee97f67b08342cdff67 Mon Sep 17 00:00:00 2001 From: MathisGD <74971347+MathisGD@users.noreply.github.com> Date: Mon, 13 Nov 2023 09:40:47 +0100 Subject: [PATCH 2/5] docs: minor improvements Co-authored-by: Romain Milon Signed-off-by: MathisGD <74971347+MathisGD@users.noreply.github.com> --- src/interfaces/IMorpho.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interfaces/IMorpho.sol b/src/interfaces/IMorpho.sol index d42add581..275cf994e 100644 --- a/src/interfaces/IMorpho.sol +++ b/src/interfaces/IMorpho.sol @@ -130,7 +130,7 @@ 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 Upon reset of a market (withdrawing all supply shares), the supply share price suddenly decreases. +/// @dev When withdrawing all supply shares, the supply share price instantly resets to `VIRTUAL_ASSETS`:`VIRTUAL_SHARES`. /// @dev Supplying a large amount can revert for overflow. /// @param marketParams The market to supply assets to. /// @param assets The amount of assets to supply. @@ -172,7 +172,7 @@ 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 Upon reset of a market (repaying all borrow shares), the borrow share price suddenly decreases. + /// @dev When repaying all borrow shares, 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. /// @param marketParams The market to borrow assets from. From c7f438a1720188a04b2772a695d291f170286170 Mon Sep 17 00:00:00 2001 From: Romain Milon Date: Mon, 13 Nov 2023 09:53:01 +0100 Subject: [PATCH 3/5] docs(morpho): fix indentation Signed-off-by: Romain Milon --- src/interfaces/IMorpho.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interfaces/IMorpho.sol b/src/interfaces/IMorpho.sol index 275cf994e..6e8f06e7f 100644 --- a/src/interfaces/IMorpho.sol +++ b/src/interfaces/IMorpho.sol @@ -130,7 +130,7 @@ 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 When withdrawing all supply shares, the supply share price instantly resets to `VIRTUAL_ASSETS`:`VIRTUAL_SHARES`. + /// @dev When withdrawing all supply shares, the supply share price instantly resets to `VIRTUAL_ASSETS`:`VIRTUAL_SHARES`. /// @dev Supplying a large amount can revert for overflow. /// @param marketParams The market to supply assets to. /// @param assets The amount of assets to supply. From e396cbef57de01e6d7aad41a430425a5217f3f57 Mon Sep 17 00:00:00 2001 From: MathisGD Date: Mon, 13 Nov 2023 10:03:31 +0100 Subject: [PATCH 4/5] chore: fmt --- src/interfaces/IMorpho.sol | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/interfaces/IMorpho.sol b/src/interfaces/IMorpho.sol index 6e8f06e7f..4b682b600 100644 --- a/src/interfaces/IMorpho.sol +++ b/src/interfaces/IMorpho.sol @@ -130,7 +130,8 @@ 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 When withdrawing all supply shares, the supply share price instantly resets to `VIRTUAL_ASSETS`:`VIRTUAL_SHARES`. + /// @dev When withdrawing all supply shares, the supply share price instantly resets to + /// `VIRTUAL_ASSETS`:`VIRTUAL_SHARES`. /// @dev Supplying a large amount can revert for overflow. /// @param marketParams The market to supply assets to. /// @param assets The amount of assets to supply. @@ -172,7 +173,8 @@ 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 When repaying all borrow shares, the borrow share price instantly resets to `VIRTUAL_ASSETS`:`VIRTUAL_SHARES`. + /// @dev When repaying all borrow shares, 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. /// @param marketParams The market to borrow assets from. From ecab98a16bc83af73506ef99cfefa4883f010814 Mon Sep 17 00:00:00 2001 From: MathisGD <74971347+MathisGD@users.noreply.github.com> Date: Mon, 13 Nov 2023 15:23:07 +0100 Subject: [PATCH 5/5] docs: minor improvement Co-authored-by: Quentin Garchery Signed-off-by: MathisGD <74971347+MathisGD@users.noreply.github.com> --- src/interfaces/IMorpho.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interfaces/IMorpho.sol b/src/interfaces/IMorpho.sol index 4b682b600..aabc3e823 100644 --- a/src/interfaces/IMorpho.sol +++ b/src/interfaces/IMorpho.sol @@ -130,7 +130,7 @@ 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 When withdrawing all supply shares, the supply share price instantly resets to + /// @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. /// @param marketParams The market to supply assets to. @@ -173,7 +173,7 @@ 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 When repaying all borrow shares, the borrow share price instantly resets to + /// @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.