The swap
function in SmartVaultV3
lacks slippage protection for users,which expose users to sandwich attack resulting in users receiving less than expected from trades.
In SmartVaultV3
, the swap
function uses calculateMinimumAmountOut
to determine the minimum amount of output tokens for a swap. However, if the user's collateral minus the swap amount is still enough to cover the minted EUROs
, this function returns zero as the minimum amount out. This means there is no floor to the number of tokens the user should receive, leaving them vulnerable to market manipulation and sandwich attacks .
Users can suffer financial losses due to receiving far fewer tokens than expected when swapping. T
manual review
Modify the swap function to allow users to set their own minimumAmountOut
, and then do check that the user given minAmountOut
, not make the vault undercollateralised after the swap
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.