Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comments on lost fees due to bad debt or market forced removals #359

Merged
merged 10 commits into from
Dec 27, 2023
3 changes: 3 additions & 0 deletions src/interfaces/IMetaMorpho.sol
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ interface IMetaMorphoBase {

/// @notice Stores the total assets managed by this vault when the fee was last accrued.
/// @dev May be a little off `totalAssets()` after each interaction, due to some roundings.
/// @dev Warning: Bad debt on an enabled market might prevent fee to accrue.
MathisGD marked this conversation as resolved.
Show resolved Hide resolved
function lastTotalAssets() external view returns (uint256);

/// @notice Submits a `newTimelock`.
Expand Down Expand Up @@ -144,6 +145,8 @@ interface IMetaMorphoBase {
/// @notice Removing a market requires the vault to have 0 supply on it; but anyone can supply on behalf of the
/// vault so the call to `updateWithdrawQueue` can be griefed by a frontrun. To circumvent this, the allocator can
/// simply bundle a reallocation that withdraws max from this market with a call to `updateWithdrawQueue`.
/// @dev Warning: Removing a market whith supply (but which removal has been submitted) might prevent fee to accrue
/// until the next user interaction with the vault.
Jean-Grimal marked this conversation as resolved.
Show resolved Hide resolved
MathisGD marked this conversation as resolved.
Show resolved Hide resolved
/// @param indexes The indexes of each market in the previous withdraw queue, in the new withdraw queue's order.
function updateWithdrawQueue(uint256[] calldata indexes) external;

Expand Down
Loading