The swap function in SmartVaultV3.sol sets sqrtPriceLimitX96 to 0, which is suboptimal.
Referencing the Uniswap v3 documentation (https://docs.uniswap.org/contracts/v3/guides/swaps/single-swaps#swap-input-parameters), sqrtPriceLimitX96 is designed to "set the limit for the price the swap will push the pool to, which can help protect against price impact or for setting up logic in a variety of price-relevant mechanisms." However, in the swap function, this parameter is hardcoded to 0, rendering it ineffective.
The hardcoded value of 0 for sqrtPriceLimitX96 exposes the swap function to potential vulnerabilities, including increased price impact, susceptibility to front-running, and unpredictable outcomes in dynamic market conditions.
Manual Review
Adjust the swap function to use a dynamic and calculated value for sqrtPriceLimitX96.
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.