The total underlying of the vault may be unexpectedly reduced
Vulnerability Detail
Withdrawing the underlying protocol may not be successful when the vault is short of exiting the protocol, but the total underlying in the vault may unexpectedly decrease
Impact
if amountToWithdraw < minimumPull, It will jump out of the current loop. At this time, no bottom layer is extracted, but savedTotalUnderlying will be reduced. Vault.sol#L111-L127
atrixs
medium
savedTotalUnderlying may be unexpectedly reduced
Summary
The total underlying of the vault may be unexpectedly reduced
Vulnerability Detail
Withdrawing the underlying protocol may not be successful when the vault is short of exiting the protocol, but the total underlying in the vault may unexpectedly decrease
Impact
if
amountToWithdraw < minimumPull
, It will jump out of the current loop. At this time, no bottom layer is extracted, but savedTotalUnderlying will be reduced. Vault.sol#L111-L127Code Snippet
see impact
Tool used
Manual Review
Recommendation
Duplicate of #363