15,000 USDC
View results
Submission Details
Severity: gas
Valid

Redundant _to == address(0) check in mint

Summary

The (_to == address(0)) check on mint(address _to, uint256 _amount) is redundant as the OpenZeppelin ERC20 _mint method which is called later has that check already.

Vulnerability Details

Impact

Redundant check wasting gas.

Tools Used

Recommendations

Remove:
if (_to == address(0)) {
revert DecentralizedStableCoin__NotZeroAddress();
}

Support

FAQs

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