UniswapV3 doesn't provide slippage protection and will result in partial swaps
Summary
for UniV3 doesn't cause the swap to revert upon reaching that value. Instead it just cause the swap to partially fill. This is a known issue with using sqrtRatioLimit as can be seen here where the swap ends prematurely when it has been reached. This is problematic as this is meant to provide the user with slippage protection but doesn't.
Vulnerability Detail
Impact
Incorrect slippage application can result in partial swaps and loss of funds
kgothatso
high
UniswapV3 doesn't provide slippage protection and will result in partial swaps
Summary
for UniV3 doesn't cause the swap to revert upon reaching that value. Instead it just cause the swap to partially fill. This is a known issue with using sqrtRatioLimit as can be seen here where the swap ends prematurely when it has been reached. This is problematic as this is meant to provide the user with slippage protection but doesn't.
Vulnerability Detail
Impact
Incorrect slippage application can result in partial swaps and loss of funds
Code Snippet
https://github.com/sherlock-audit/2024-02-leverage-contracts/blob/main/wagmi-leverage/contracts/abstract/ApproveSwapAndPay.sol#L185
Tool used
Manual Review
Recommendation
Check the amount received from the swap and compare it against some user supplied minimum
Duplicate of #8