georgits
high
Anyone can mint and burn tokens by calling mintRebalancer()
and burnRebalancer()
In USSD.sol there are several functions which must be called exclusively by rebalancer
. mintRebalancer()
and burnRebalancer()
are 2 of these functions. The issue is that there is no check if msg.sender
is rebalancer
(as implemented in the onlyBalancer
modifier).
Anyone can mint and burn tokens.
https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/USSD.sol#L204-L210
function mintRebalancer(uint256 amount) public override {
_mint(address(this), amount);
}
function burnRebalancer(uint256 amount) public override {
_burn(address(this), amount);
}
Manual Review
Add onlyBalancer
modifier to mintRebalancer()
and burnRebalancer()
functions.