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
Rebalancing begins by fetching USSD's spot price relative to DAI from its Uniswap pool. Anyone can imbalance the pool through a flash loan before rebalancing begins which leads to a wrong USSD price. This results in incorrect rebalancing, even more so because of the fact that rebalance() function can be called by anyone.
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
blockdev
high
Rebalancing is open to flashloan attack
Summary
Rebalancing begins by fetching USSD's spot price relative to DAI from its Uniswap pool. Anyone can imbalance the pool through a flash loan before rebalancing begins which leads to a wrong USSD price. This results in incorrect rebalancing, even more so because of the fact that
rebalance()
function can be called by anyone.Vulnerability Detail
rebalance()
callsgetOwnValuation()
to determine USSD price relative to DAI:uniPool.slot()
returns the spot price's square root which is susceptible to flash loan attack as explained above.Impact
High. Almost all rebalancing transactions will result in loss for the protocol.
Code Snippet
Tool used
Manual Review
Recommendation
Use a TWAP price which will result in inaccurate price (due to being an average over time) but more resistant towards price manipulation.
Duplicate of #451
The text was updated successfully, but these errors were encountered: