shaka
high
Anyone can mint and burn tokens for/from the USSD contract.
USSD.sol
functions mintRebalancer
and burnRebalancer
can be called by anyone.
An attacker can call mintRebalancer
with an amount
equal to type(uint256).max - _totalSupply
. If new tokens are minted after that, the transaction will revert as _totalSupply
will overflow.
Users can be prevented from mint tokens and the rebalance
function will fail if ownval > 1e6 + threshold
.
https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/USSD.sol#L204-L210
Manual Review
Add onlyBalancer
modifier to mintRebalancer
and burnRebalancer
functions.