ver0759
high
The burnRebalancer(uint256 amount)
function can be called by everyone, This will cause the token of the UUSD
contract to be destroyed at will.
In the USSD.sol
file, the burnRebalancer(uint256 amount)
function can be called by anyone:
function burnRebalancer(uint256 amount) public override {
_burn(address(this), amount);
}
The attacker can call the burnRebalancer(uint256 amount)
to destroy the tokens of UUSD
contract.
Tokens of UUSD
contract are destroyed at will.
Manual Review
Add onlyBalancer
modifier to burnRebalancer(uint256 amount)
function:
modifier onlyBalancer() {
require(msg.sender == address(rebalancer), "bal");
_;
}
function burnRebalancer(uint256 amount) public override onlyBalancer {
_burn(address(this), amount);
}