This repository has been archived by the owner on Nov 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
WATCHPUG - Lack of access control for mintRebalancer()
and burnRebalancer()
#777
Labels
Has Duplicates
A valid issue with 1+ other issues describing the same vulnerability
High
A valid High severity issue
Reward
A payout will be made for this issue
Comments
github-actions
bot
added
High
A valid High severity issue
Has Duplicates
A valid issue with 1+ other issues describing the same vulnerability
labels
Jun 5, 2023
This was referenced Jun 5, 2023
Closed
Closed
This was referenced Jun 5, 2023
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Has Duplicates
A valid issue with 1+ other issues describing the same vulnerability
High
A valid High severity issue
Reward
A payout will be made for this issue
WATCHPUG
high
Lack of access control for
mintRebalancer()
andburnRebalancer()
Summary
Lack of access control in
USSD.mintRebalancer()
andUSSD.burnRebalancer()
can lead to a denial-of-service attack and malfunction of the rebalancer as it can altertotalSupply
, which is used inrebalancer.SellUSSDBuyCollateral
to calculateownval
.Vulnerability Detail
Based on the context,
USSD.mintRebalancer()
should beonlyBalancer
as it should only be allowed to be called by the rebalancer.However, both
USSD.mintRebalancer()
andUSSD.burnRebalancer()
lack access control in the current implementation.Impact
An attacker can mint an amount of
type(uint256).max - totalSupply()
and cause a denial-of-service attack by preventing anyone else from minting.Additionally, minting will also change the
totalSupply
which alters thecollateralFactor
and cause the rebalancer to malfunction, as theSellUSSDBuyCollateral()
function relies on theUSSD.collateralFactor()
.The
totalSupply
is also used inrebalancer.SellUSSDBuyCollateral
to calculate theownval
.Code Snippet
https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/USSD.sol#L204-L210
https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/USSDRebalancer.sol#L92-L107
https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/USSD.sol#L179-L194
Tool used
Manual Review
Recommendation
USSD.mintRebalancer()
should beonlyBalancer
.The text was updated successfully, but these errors were encountered: