Skip to content
This repository has been archived by the owner on Dec 17, 2023. It is now read-only.

Latest commit

 

History

History
21 lines (16 loc) · 856 Bytes

008.md

File metadata and controls

21 lines (16 loc) · 856 Bytes

IceBear

medium

Lack of slippage control

Summary

In UniswapExtension.sol, the functions uniV3ExactOutputInternal() and uniV3ExactInputInternal() lack slippage control.

Vulnerability Detail

Calling uniV3ExactOutputInternal() and uniV3ExactInputInternal() can lead to slippage.

Impact

The slippage control is set to the maximum and minimum of the allowed max and min sqrt ratio,without precise slippage control, swaps done by user are susceptible to sandwich attacks.

Code Snippet

https://github.com/sherlock-audit/2023-05-ironbank/blob/main/ib-v2/src/extensions/UniswapExtension.sol#L715-L736 https://github.com/sherlock-audit/2023-05-ironbank/blob/main/ib-v2/src/extensions/UniswapExtension.sol#L744-L761

Tool used

Manual Review

Recommendation

Recommend following uniswap's way of implementing the expected minimum amount out check.