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

Use constants instead of type(uintx).max

Summary

[G-16] Use constants instead of type(uintx).max

type(uint120).max or type(uint128).max, etc. it uses more gas in the distribution process and also for each transaction than constant usage.

file: /src/DSCEngine.sol
329 if (totalDscMinted == 0) return type(uint256).max;

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

Support

FAQs

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