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

G-01 Save 34 gas by avoiding to check if address == address(0) twice in `mint()` in ` DecentralizedStableCoin .sol`

Summary:
In the function mint in DecentralizedStableCoin.sol, it is checked if the address that was put is address(0) before calling _mint to mint the tokens. The function _mint also checks if the address that was put in is address(0). By removing the first check 34 gas are saved each time the mint function is called.

Support

FAQs

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