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::UniV3SwapInput() executes swaps with no slippage protection
Summary
USSD::UniV3SwapInput() executes swaps with no slippage protection. That will cause a loss of funds because of sandwich attacks when rebalancing the protocol.
Vulnerability Detail
UUSD::UniV3SwapInput() does not set any value for amountOutMinimum. This means that an adversary can perform sandwich attacks against the protocol, as it accepts any amount of tokens.
UniV3SwapInput() is used by USSDRebalancer::rebalance(). So, the attack can be performed any time the swap is invoked.
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
juancito
high
USSD::UniV3SwapInput()
executes swaps with no slippage protectionSummary
USSD::UniV3SwapInput()
executes swaps with no slippage protection. That will cause a loss of funds because of sandwich attacks when rebalancing the protocol.Vulnerability Detail
UUSD::UniV3SwapInput()
does not set any value foramountOutMinimum
. This means that an adversary can perform sandwich attacks against the protocol, as it accepts any amount of tokens.UniV3SwapInput()
is used byUSSDRebalancer::rebalance()
. So, the attack can be performed any time the swap is invoked.Link to code
Impact
Loss of funds for the protocol because of sandwich attacks when trying to rebalance it.
Code Snippet
https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/USSD.sol#L227-L240
Tool used
Manual Review
Recommendation
Define a proper
amountOutMinimum
value for executing the swaps.Duplicate of #673
The text was updated successfully, but these errors were encountered: