Skip to content

Latest commit

 

History

History
29 lines (15 loc) · 637 Bytes

073.md

File metadata and controls

29 lines (15 loc) · 637 Bytes

shaka

medium

No slippage protection for swaps

Summary

No slippage protection for swaps.

Vulnerability Detail

The swap executed in UniV3SwapInput function sets the parameter amountOutMinimum to zero, which means that the swap is executed without slippage protection.

Impact

The swap can be front run and the protocol receive less tokens than expected.

Code Snippet

https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/USSD.sol#L227-L240

Tool used

Manual Review

Recommendation

Use the calculated output tokens with certain error margin as the value for amountOutMinimum.