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

Set Owner for DSC in constructor of DSCEngine

Summary

Instead of deploying the DecentralizedStableCoin.sol via EOA and then transferring the ownership to DSCEngine.sol, Deploy the DecentralizedStableCoin.sol in the constructor of the DSCEngine.sol.

Vulnerability Details

Current Methodology of deploying the DecentralizedStableCoin.sol and then transferring the ownership to the DSCEngine.sol via deployers EOA will unnecessary cost extra gas (minimum of 21000) and introduce centralisation risk

Impact

High Gas consumption (upwards of 21000) and unwanted centralisation vector

Tools Used

Manual Review

Recommendations

Deploy the DecentralizedStableCoin.sol in the constructor of the DSCEngine.sol

Support

FAQs

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