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
getOwnValuation() can easily be manipulated to trigger rebalance().
Summary
The price of Uniswap v3 pool can be manipulated at low cost. USSDRebalancer relies on current price of USSD/DAI for rebalance triggering, which can be manipulated by attackers to force protocol to buy or sell collateral assets at specific time and conditions, making it economically profitable.
Vulnerability Detail
It is well-known that the price of an Uniswap v3 pool can be manipulated at a relatively low cost.
However, the USSDRebalancer relies solely on the current price of USSD/DAI for triggering the conditions of a rebalance, which will trigger a collateral sell and buyback or mint and collateral purchase.
An attacker could manipulate the price of USSD/DAI and force the protocol to buy or sell the collateral assets at the specific time and conditions they want.
When combined with the price manipulation of the collateral asset, this attack would be economically profitable.
PoC
Manipulate the price of DAI/USD to 0.98 so that it triggers the sale of collateral, such as ETH.
Manipulate the price of ETH/DAI to a lower value.
Place a limit order like JIT liquidity at a lower price in the WETH/DAI pool to buy WETH.
The BuyUSSDSellCollateral function is triggered, causing all ETH collateral to be sold at the manipulated price to DAI. The limit order placed at step 3 will be fulfilled.
Reverse the prices.
Impact
Manipulating the price can trigger the protocol to buy/sell collateral assets. If the collateral asset is also manipulated, it would be sold at a manipulated price.
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
WATCHPUG
high
getOwnValuation()
can easily be manipulated to triggerrebalance()
.Summary
The price of Uniswap v3 pool can be manipulated at low cost. USSDRebalancer relies on current price of USSD/DAI for rebalance triggering, which can be manipulated by attackers to force protocol to buy or sell collateral assets at specific time and conditions, making it economically profitable.
Vulnerability Detail
It is well-known that the price of an Uniswap v3 pool can be manipulated at a relatively low cost.
However, the
USSDRebalancer
relies solely on the current price of USSD/DAI for triggering the conditions of a rebalance, which will trigger a collateral sell and buyback or mint and collateral purchase.An attacker could manipulate the price of USSD/DAI and force the protocol to buy or sell the collateral assets at the specific time and conditions they want.
When combined with the price manipulation of the collateral asset, this attack would be economically profitable.
PoC
BuyUSSDSellCollateral
function is triggered, causing all ETH collateral to be sold at the manipulated price to DAI. The limit order placed at step 3 will be fulfilled.Impact
Manipulating the price can trigger the protocol to buy/sell collateral assets. If the collateral asset is also manipulated, it would be sold at a manipulated price.
Code Snippet
https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/USSDRebalancer.sol#L71-L80
Tool used
Manual Review
Recommendation
Consider using TWAP rather than the current price of the pool.
Duplicate of #451
The text was updated successfully, but these errors were encountered: