A potential vulnerability to Sandwich Attacks exists in some function in the protocol.
In the swap() function, the slippage is determined by the minimumAmountOut parameter in ISwapRouter.ExactInputSingleParams(). This value is calculated through the calculateMinimumAmountOut() function. If collateralValueMinusSwapValue >= requiredCollateralValue, then the slippage value will be 0. Otherwise, it is calculated as calculator.eurToToken(getToken(_outTokenSymbol), requiredCollateralValue - collateralValueMinusSwapValue).
The slippage protection is incorrect as a slippage value of 0 implies no protection, making the transaction vulnerable to sandwich attacks. Even if it's not 0, the slippage protection value is still incorrect. This value should be calculated off-chain based on the input quantity and then passed as a parameter to the function.
Users face potential asset losses due to vulnerabilities like front-running, sandwich, or transaction reordering attacks.
Vscode
Implementing validation for minimum amounts within the code can enhance user protection against such exploitative scenarios.
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.