Closed code423n4 closed 2 years ago
This would be the opposite of what we want to achieve - we want to keep down prices for small users, which means that we want to always keep a reserve in the vault Adapter from which they can withdraw. If we empty out the vaultadapter by letting larger fish empty them out the cost of withdrawals would drastically go up for the smaller fish
Works as expected. Invalid.
Handle
cmichel
Vulnerability details
Vulnerability Details
The two
BaseVaultAdaptor.withdraw
functions first check if theamount
is already in the adapter, if not they withdraw the fullamount
again from the vault.If one wants to minimize withdrawals from the yield-earning strategies, it'd be better to only withdraw the difference of
amount
and what's already in the vault adaptor from the vault strategies.Recommended Mitigation Steps
Withdraw the difference from vault to adopter and then withdraw the full adaptor amount to the recipient.