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
USSDRebalancer.getOwnValuation and getSupplyProportion are vulnerable to manipulation due to how they calculate token balances
Summary
USSDRebalancer.getOwnValuation uses the UniV3.slot0 function to calculate its current token price. This calculated value is the most recent spot price and can be easily manipulated.
Vulnerability Detail
The getOwnValuation function returns the most recent spot price.
All functionality that uses the spot price is vulnerable such as USSDRebalancer.rebalance, USSDRebalancer.SellUSSDBuyCollateral, and USSDRebalancer.BuyUSSDSellCollateral
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
tallo
high
USSDRebalancer.getOwnValuation and getSupplyProportion are vulnerable to manipulation due to how they calculate token balances
Summary
USSDRebalancer.getOwnValuation
uses theUniV3.slot0
function to calculate its current token price. This calculated value is the most recent spot price and can be easily manipulated.Vulnerability Detail
The getOwnValuation function returns the most recent spot price.
getSupplyProportion uses the current token0 and token1 balance.
Impact
All functionality that uses the spot price is vulnerable such as
USSDRebalancer.rebalance
,USSDRebalancer.SellUSSDBuyCollateral
, andUSSDRebalancer.BuyUSSDSellCollateral
Code Snippet
https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/USSDRebalancer.sol#L71
https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/USSDRebalancer.sol#LL83C45-L83C45
Tool used
Manual Review
Recommendation
It would be ideal to take an average of the uniswap price over certain time periods (TWAP) so its much harder to manipulate
Duplicate of #451
The text was updated successfully, but these errors were encountered: