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 24, 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
Sandwich attack could result in substantial losses
Summary
The minimum amount of tokens to be received is not set when swapping tokens.
Therefore, an attacker can launch a sandwich attack on a swap transaction to unfairly reduce the amount of tokens received by the project.
This is a substantial loss of funds.
Vulnerability Detail
In the UniV3SwapInput(bytes memory _path, uint256 _sellAmount) function, amountOutMinimum is hard-coded to 0. Therefore, the token received could be zero.
A sandwich attack could result in a significant loss of project assets.
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
innertia
high
Sandwich attack could result in substantial losses
Summary
The minimum amount of tokens to be received is not set when swapping tokens.
Therefore, an attacker can launch a sandwich attack on a swap transaction to unfairly reduce the amount of tokens received by the project.
This is a substantial loss of funds.
Vulnerability Detail
In the
UniV3SwapInput(bytes memory _path, uint256 _sellAmount)
function,amountOutMinimum
is hard-coded to 0. Therefore, the token received could be zero.A sandwich attack could result in a significant loss of project assets.
Impact
Substantial loss of property value
Code Snippet
https://github.com/sherlock-audit/2023-05-USSD/blob/6d7a9fdfb1f1ed838632c25b6e1b01748d0bafda/ussd-contracts/contracts/USSD.sol#L237
Tool used
Manual Review
Recommendation
Set the appropriate value for a
mountOutMinimum
, depending on the situation.Duplicate of #673
The text was updated successfully, but these errors were encountered: