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

Proxy - Not using slippage parameter or deadline while swapping on UniswapV3 #673

Open
sherlock-admin opened this issue May 24, 2023 · 0 comments
Labels
Has Duplicates A valid issue with 1+ other issues describing the same vulnerability High A valid High severity issue Reward A payout will be made for this issue

Comments

@sherlock-admin
Copy link
Contributor

Proxy

medium

Not using slippage parameter or deadline while swapping on UniswapV3

Summary

While making a swap on UniswapV3 the caller should use the slippage parameter amountOutMinimum and deadline parameter to avoid losing funds.

Vulnerability Detail

UniV3SwapInput() in USSD contract does not use the slippage parameter amountOutMinimum nor deadline.

amountOutMinimum is used to specify the minimum amount of tokens the caller wants to be returned from a swap. Using amountOutMinimum = 0 tells the swap that the caller will accept a minimum amount of 0 output tokens from the swap, opening up the user to a catastrophic loss of funds via MEV bot sandwich attacks.

deadline lets the caller specify a deadline parameter that enforces a time limit by which the transaction must be executed. Without a deadline parameter, the transaction may sit in the mempool and be executed at a much later time potentially resulting in a worse price for the user.

Impact

Loss of funds and not getting the correct amount of tokens in return.

Code Snippet

Tool used

Manual Review

Recommendation

Use parameters amountOutMinimum and deadline correctly to avoid loss of funds.

@github-actions github-actions bot added High A valid High severity issue Has Duplicates A valid issue with 1+ other issues describing the same vulnerability labels Jun 5, 2023
This was referenced Jun 5, 2023
This was referenced Jun 5, 2023
@sherlock-admin sherlock-admin added the Reward A payout will be made for this issue label Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Has Duplicates A valid issue with 1+ other issues describing the same vulnerability High A valid High severity issue Reward A payout will be made for this issue
Projects
None yet
Development

No branches or pull requests

1 participant