Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 960 Bytes

050.md

File metadata and controls

33 lines (23 loc) · 960 Bytes

georgits

high

Missing access control

Summary

Anyone can mint and burn tokens by calling mintRebalancer() and burnRebalancer()

Vulnerability Detail

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).

Impact

Anyone can mint and burn tokens.

Code Snippet

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);
    }

Tool used

Manual Review

Recommendation

Add onlyBalancer modifier to mintRebalancer() and burnRebalancer() functions.