Users with a high reserve ratio do not have slippage protection when calling the SmartVaultV3.swap function, which will cause losses.
When executing the SmartVaultV3.swap function, if collateralValueMinusSwapValue >= requiredCollateralValue is satisfied (which represents the user's collateral value > minimum collateral value + swap amount), the amountOutMinimum of the swap operation will be set to 0, that is, slippage protection will not be performed.
##Impact
This operation will cause users with a high reserve ratio to suffer from the risk of losing slippage protection when performing swap operations, suffering losses due to currency price fluctuations, or sandwich attacks.
Suggestion: Add an input parameter minOut in the swap function. On the premise of meeting the minimum reserve ratio, let users set amountOutMinimum themselves.
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.