15,000 USDC
View results
Submission Details
Severity: gas

Not using the named return variable when a function returns, wastes deployment gas

Summary

[G-8] Not using the named return variable when a function returns, wastes deployment gas

file: /src/DSCEngine.sol
358 return totalCollateralValueInUsd;

https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/main/src/DSCEngine.sol#L358

file: /src/DSCEngine.sol
300 returns (uint256 totalDscMinted, uint256 collateralValueInUsd)

https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/main/src/DSCEngine.sol#L300

Support

FAQs

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