Unnecessary address(0) check in DecentralizedStableCoin.mint()
The DecentralizedStableCoin.mint() function first checks if _to is not the 0 address and then calls the _mint() function of the ERC20 interface. The _mint() function of the ERC20 interface already implements address(0) check for the recipient so the check on L58 is not needed.Having such a check at the beginning of mint() will revert if address(0) is passed and gas won't be spent for the rest of the code.However if the function reverts due to the same check failing in _mint() then the gas used for the checks above will also be returned , so the check at L58 is redundant.The burn function is the same.
Gas optimization
Manual review
Remove the address(0) check on line 58 of DecentralizedStableCoin.sol
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.