You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.
sherlock-admin opened this issue
May 23, 2023
· 0 comments
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelHighA valid High severity issueRewardA payout will be made for this issue
USSD contract makes trades on Uniswap via its swap router. The amountOutMinimum is set to 0 which means the trade will be successful even if it results in 0 amount of output token. This will lead to heavy sandwiching and frontrunning attacks leading to guaranteed loss making trades for USSD.
Vulnerability Detail
USSD.UniV3SwapInput() creates trade data and calls Uniswap router with amountOutMinimum set to 0.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelHighA valid High severity issueRewardA payout will be made for this issue
blockdev
high
Uniswap trades are not slippage protected
Summary
USSD contract makes trades on Uniswap via its swap router. The
amountOutMinimum
is set to 0 which means the trade will be successful even if it results in 0 amount of output token. This will lead to heavy sandwiching and frontrunning attacks leading to guaranteed loss making trades for USSD.Vulnerability Detail
USSD.UniV3SwapInput()
creates trade data and calls Uniswap router withamountOutMinimum
set to 0.Impact
High. 100% of the Uniswap trades will result in gaining 0 or dust amount of the output token.
Code Snippet
Tool used
Manual Review
Recommendation
Determine a suitable slippage percentage and calculate the minimum amount of output token expected. Set
amountOutMinimum
to that expected amount.Duplicate of #673
The text was updated successfully, but these errors were encountered: