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
Rebalance function can be manipulated by flashloan
Summary
The rebalance flow is based on the balance token holdings of the main USSD/DAI pool which can be manipulated by flashloan
Vulnerability Detail
Given a malicious actor
They can manipulate the rebalance function either by flashloaning from the v3 pool or by increasing liquidity as the rebalance checks for the balanceOf the token in the USSD/DAI pool
Impact
If a rebalance needed it can be manipulated and can be forced to buy all the DAI / USSD in the v3 uni pool causing more depeg.
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
qckhp
high
Rebalance function can be manipulated by flashloan
Summary
The rebalance flow is based on the balance token holdings of the main USSD/DAI pool which can be manipulated by flashloan
Vulnerability Detail
Given a malicious actor
They can manipulate the rebalance function either by flashloaning from the v3 pool or by increasing liquidity as the rebalance checks for the balanceOf the token in the USSD/DAI pool
Impact
If a rebalance needed it can be manipulated and can be forced to buy all the DAI / USSD in the v3 uni pool causing more depeg.
Code Snippet
https://github.com/USSDofficial/ussd-contracts/blob/f44c726371f3152634bcf0a3e630802e39dec49c/contracts/USSDRebalancer.sol#L84
Tool used
Manual Review
Recommendation
You should use some oracle or TWAP for calculating the holdings of the pool, don't use the balanceOf the pool directly as it can manipulated.
Duplicate of #451
The text was updated successfully, but these errors were encountered: