Skip to content
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.

shaka - Anyone can mint and burn tokens for/from the USSD contract #68

Closed
sherlock-admin opened this issue May 23, 2023 · 0 comments
Closed
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label High A valid High severity issue Reward A payout will be made for this issue

Comments

@sherlock-admin
Copy link
Contributor

sherlock-admin commented May 23, 2023

shaka

high

Anyone can mint and burn tokens for/from the USSD contract

Summary

Anyone can mint and burn tokens for/from the USSD contract.

Vulnerability Detail

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.

Impact

Users can be prevented from mint tokens and the rebalance function will fail if ownval > 1e6 + threshold.

Code Snippet

https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/USSD.sol#L204-L210

Tool used

Manual Review

Recommendation

Add onlyBalancer modifier to mintRebalancer and burnRebalancer functions.

Duplicate of #777

@github-actions github-actions bot closed this as completed Jun 5, 2023
@github-actions github-actions bot added High A valid High severity issue Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label labels Jun 5, 2023
@sherlock-admin sherlock-admin added the Reward A payout will be made for this issue label Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label High A valid High severity issue Reward A payout will be made for this issue
Projects
None yet
Development

No branches or pull requests

1 participant