You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.
sherlock-admin opened this issue
May 23, 2023
· 0 comments
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelHighA valid High severity issueRewardA payout will be made for this issue
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.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelHighA valid High severity issueRewardA payout will be made for this issue
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
functionsmintRebalancer
andburnRebalancer
can be called by anyone.An attacker can call
mintRebalancer
with anamount
equal totype(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 ifownval > 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 tomintRebalancer
andburnRebalancer
functions.Duplicate of #777
The text was updated successfully, but these errors were encountered: