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

save gas when deploying

Summary

The current implementation has 3 step process to use the contract

Deploy DSCEngine.sol → Deploy DecentralizedStableCoin.sol → change the owner of DecentralizedStableCoin.sol to DSCEngine

However, you can make it as 1 step process and save gas. Also, it reduces user risk.

- i_dsc = DecentralizedStableCoin(dscAddress);
+ i_dsc = new DecentralizedStableCoin();

This will reduce the steps and save gas

Support

FAQs

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