From 1cd6a0325b3691904056b446e2efa9d201e6daf7 Mon Sep 17 00:00:00 2001 From: Quentin Garchery Date: Thu, 30 May 2024 10:37:19 +0200 Subject: [PATCH 1/2] docs: update reallocate natspec --- src/interfaces/IMetaMorpho.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interfaces/IMetaMorpho.sol b/src/interfaces/IMetaMorpho.sol index 4e8f648c..d68478c6 100644 --- a/src/interfaces/IMetaMorpho.sol +++ b/src/interfaces/IMetaMorpho.sol @@ -164,8 +164,6 @@ interface IMetaMorphoBase { function updateWithdrawQueue(uint256[] calldata indexes) external; /// @notice Reallocates the vault's liquidity so as to reach a given allocation of assets on each given market. - /// @notice The allocator can withdraw from any market, even if it's not in the withdraw queue, as long as the loan - /// token of the market is the same as the vault's asset. /// @dev The behavior of the reallocation can be altered by state changes, including: /// - Deposits on the vault that supplies to markets that are expected to be supplied to during reallocation. /// - Withdrawals from the vault that withdraws from markets that are expected to be withdrawn from during @@ -174,6 +172,8 @@ interface IMetaMorphoBase { /// - Withdrawals from markets that are expected to be withdrawn from during reallocation. /// @dev Sender is expected to pass `assets = type(uint256).max` with the last MarketAllocation of `allocations` to /// supply all the remaining withdrawn liquidity, which would ensure that `totalWithdrawn` = `totalSupplied`. + /// @dev A supply in a reallocation step will make the reallocation revert if the amount is greater than the amount + /// extracted (i.e. total withdrawn minus total supplied) in the previous steps. function reallocate(MarketAllocation[] calldata allocations) external; } From 321fb676a85369f553666a754128662460633459 Mon Sep 17 00:00:00 2001 From: Quentin Garchery Date: Tue, 11 Jun 2024 17:33:32 +0200 Subject: [PATCH 2/2] docs: net amount instead of extracted amount --- src/interfaces/IMetaMorpho.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interfaces/IMetaMorpho.sol b/src/interfaces/IMetaMorpho.sol index d68478c6..359987de 100644 --- a/src/interfaces/IMetaMorpho.sol +++ b/src/interfaces/IMetaMorpho.sol @@ -172,8 +172,8 @@ interface IMetaMorphoBase { /// - Withdrawals from markets that are expected to be withdrawn from during reallocation. /// @dev Sender is expected to pass `assets = type(uint256).max` with the last MarketAllocation of `allocations` to /// supply all the remaining withdrawn liquidity, which would ensure that `totalWithdrawn` = `totalSupplied`. - /// @dev A supply in a reallocation step will make the reallocation revert if the amount is greater than the amount - /// extracted (i.e. total withdrawn minus total supplied) in the previous steps. + /// @dev A supply in a reallocation step will make the reallocation revert if the amount is greater than the net + /// amount from previous steps (i.e. total withdrawn minus total supplied). function reallocate(MarketAllocation[] calldata allocations) external; }