The code returns a minAmountOut of 0. This can lead to users losing tokens to sandwich attacks.
The function calculateMinimumAmountOut calculates the miniumum amount expected from the swap. The issue is that for certain cases it returns 0 as shown below.
So users swapping their safe collateral can be sandwiched and lose all their tokens due to essentially no slippage control. This is very common on the mainnet and thus is of high severity.
Users can lost most of their funds while doing a swap due to lack of slippage control.
Manual review
Allow users to specify a minimumAmountOut which can be overriden by the contract if necessary for swaps of collateral already supporting minted tokens.
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.