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
But there is no slippage control in UniV3SwapInput() function. If Unexpected swaps occur, the protocol can suffer a huge loss due to no slippage protection.
Impact
Unexpected swaps can occur, and the protocol can suffer a huge loss due to no slippage protection.
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
Nyx
high
No slippage control
Summary
When swapping amountOutMinimum is set to 0. There is no slippage protection, protocol can lose funds.
Vulnerability Detail
When the protocol needs to rebalance pool, the protocol buys collateral or sells. And it uses UniV3SwapInput() function for it.
But there is no slippage control in UniV3SwapInput() function. If Unexpected swaps occur, the protocol can suffer a huge loss due to no slippage protection.
Impact
Unexpected swaps can occur, and the protocol can suffer a huge loss due to no slippage protection.
Code Snippet
https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/USSD.sol#L227-L240
Tool used
Manual Review
Recommendation
amountOutMinimum: 0
add slippage control to UniV3SwapInput() function.
Duplicate of #673
The text was updated successfully, but these errors were encountered: