Lack of slippage protection when withdrawing from curveVault
through _withdrawFromVault()
When the reserve is in a state of lack of liquidity, the _withdrawFromVault()
function is called and inside it curveVault.withdraw()
will be called. The implementation is as below :
As seen in the code above, the maxLoss
value is set to 0
. This can cause the tokens withdrawn to be less than they should be and can also be a victim of a sandwich attack. With the amount withdrawn not being in accordance with what it should be, the next impact is that the user does not receive the assets according to what they should and also a loss for the protocol
Losses for users and protocols due to receiving less tokens than expected and not being able to cover the lack of liquidity
Manual Review
Consider set value for maxLoss
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.