Submitted by dirk_y
M-18: Exchange rate change in case of Lossy Strategy will cause the Vault to under-collateralized for generic ERC4626 Yield Vaults
The original implementation didnt handle lossy withdrawals from underlying ERC-4626 yield vaults properly. During withdrawals from the V5 vault, the calculation of amount to withdraw/shares to burn is based on a maxWithdraw view function in the underlying yield vault. However, when the actual withdraw is performed from the yield vault, it is possible for the vault to apply losses. Based on the original implementation, this could cause the V5 vault to pay more shares (of the underlying yield vault) than intended, effectively diluting other vault depositors and causing losses for the last users who withdraw.
The updated implementation in the linked diff is further updated based on the changes for H-09. The key changes related to the original issue is that now V5 vault shares can be converted into the underlying yield vault shares through methods like _convertAssetsToYVAssets (for asset conversions in this instance) to ensure that withdrawals burn the correct number of V5 vault shares in exchange for the underlying yield vault shares when the vault is in an under-collateralised state.
However, technically the updated implementation doesnt solve the original issue because the _redeem method still doesnt handle the case where the withdrawal from the underlying yield vault realises losses. The vault is still considered collateralised based on the underlying maxWithdraw call, so it is possible that withdrawing a given number of assets actually burns more of the underlying yield vault shares owned by the V5 vault than intended; this still impacts those that withdraw/redeem later from the V5 vault.  
Although the mitigation is technically unsuccessful, I personally agree with this comment from the sponsor on the original issue.
Although I do disagree with: When withdrawing, people will only be able to withdraw their shares of deposits which indeed socializes the loss. 
The losses only impact those that try to withdraw last from the V5 vault since there arent enough of the underlying yield vault shares left to redeem.
To summarise, I think this is quite a specific use case that either needs to be explicitly supported, or the use of underlying lossy strategies should be discouraged. My personal opinion is that despite the mitigation not being resolved, I wouldnt suggest any further changes; just wanted to be explicit that the original mitigation technically isnt resolved. I would suggest that vaults employing underlying lossy strategies should be discouraged instead.
ERC4626
