The swap function within the SmartVaultV3 contract lacks protective measures against MEV attacks due to its current implementation. Specifically, the following areas:
Deadline: The function sets the deadline parameter in the ExactInputSingleParams to block.timestamp. This configuration permits the execution of transactions at any future point, potentially allowing malicious actors to delay transactions until market conditions turn unfavourable.
amountOutMinimum: The amountOutMinimum is derived from the calculateMinimumAmountOut function, which can return zero under certain conditions. Setting amountOutMinimum to zero makes the swap vulnerable to front-running, where attackers can manipulate the transaction.
sqrtPriceLimitX96: The parameter sqrtPriceLimitX96 is hardcoded to zero, further exposing the swap to potential front-running attacks.
Manual analysis
Allow users to specify their own values for deadline, amountOutMinimum, and sqrtPriceLimitX96 so they can set more suitable constraints for their transactions
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.