15,000 USDC
View results
Submission Details
Severity: low

L Current implementation of `DecentralizedStableCoin::burn()` should be rethought

Summary

Note that burn() functions, especially does that've been prefixed as onlyOwner accessible function are mostly used to burn tokens of users and not only restricted to owner, where as this is also a centralization issue, this is common practice
However the current implementation of the burn() function has a balance check of msg.sender to ensure that the amount that's to be burnt is less than this balance, where as that's a correct move, this would only ever function for the owner

Vulnerability Details

See Summary, additionally take a look at the burn() function

function burn(uint256 _amount) public override onlyOwner {
//@audit
if (_amount <= 0) {
revert DecentralizedStableCoin__MustBeMoreThanZero();
}
if (balance < _amount) {
revert DecentralizedStableCoin__BurnAmountExceedsBalance();
}
super.burn(_amount);
}

Impact

Incomplete functionality I beleive, since the widely implementation is thar owner provides the respective user address.

Tools Used

Manual Audit

Recommend Mitigation

The burn() implementation should be rethought and a fix should be made if necessary.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.