Instead of using the hardcoded value 1e18, it can be replaced with a constant named PRECISION
Constant variables are used to represent different types of precision throghout the code. However, in this line (https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/d1c5501aa79320ca0aeaa73f47f0dbc88c7b77e2/src/DSCEngine.sol#L331), a hardcoded value of 1e18 is used. To enhance code readability and maintain consistency in style, it is good to use the constant variable PRECISION instead.
Manual Review
Use PRECISION instead of 1e18, eg: return (collateralAdjustedForThreshold * PRECISION) / totalDscMinted;
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.