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
Minting and Burning are exposed as public function in USSD contract, there is no restriction
Summary
mintRebalance and burnRebalancer are exposed as public function which means any one can call these functions and create an imbalance between the supply of USSD and Collateral. This will impact the rebalancing logic and net value of USSD against the dai value.
Vulnerability Detail
mint and burn should be operated by the rebalancer which evaluates the USSD against the collateral and decide on whether to add supply or remove supply.
But, since these functions are exposed as public, the USSD token value can be manipulated by any one.
function mintRebalancer(uint256 amount) public override { _mint(address(this), amount);
}
function burnRebalancer(uint256 amount) public override { _burn(address(this), amount);
}
Tool used
Manual Review
Recommendation
Attach the onlyBalancer() modifier to both the above functions so that the functions are not availabe to every one, but only to the rebalancer contract.
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
ravikiran.web3
high
Minting and Burning are exposed as public function in USSD contract, there is no restriction
Summary
mintRebalance and burnRebalancer are exposed as public function which means any one can call these functions and create an imbalance between the supply of USSD and Collateral. This will impact the rebalancing logic and net value of USSD against the dai value.
Vulnerability Detail
mint and burn should be operated by the rebalancer which evaluates the USSD against the collateral and decide on whether to add supply or remove supply.
But, since these functions are exposed as public, the USSD token value can be manipulated by any one.
Impact
USSD value can be easily manipulated.
Code Snippet
https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/USSD.sol#L204C2-L210
function mintRebalancer(uint256 amount) public override {
_mint(address(this), amount);
}
function burnRebalancer(uint256 amount) public override {
_burn(address(this), amount);
}
Tool used
Manual Review
Recommendation
Attach the onlyBalancer() modifier to both the above functions so that the functions are not availabe to every one, but only to the rebalancer contract.
Duplicate of #777
The text was updated successfully, but these errors were encountered: