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

Non Critical Issues:Discrepancy between code and comments

Summary

  • The code implementation does not match the description provided in the corresponding comments.

Vulnerability Details

  • During the auditing process, I noticed this comment: // ($10e18 * 1e18) / ($2000e8 * 1e10). Then, I substituted it into the calculation formula (usdAmountInWei * PRECISION) / (uint256(price) * ADDITIONAL_FEED_PRECISION) for computation.

  • In the end, I found that the content of this comment is incorrect. It should be $10e8 instead of $10e18. Considering $2000e8, it can be inferred that it should be $10e8.

Tools Used

  • Manual Review

Recommendations

  • Update the comments to keep them consistent.

File src/DSCEngine.sol
- 346 // ($10e18 * 1e18) / ($2000e8 * 1e10)
+ 346 // ($10e8 * 1e18) / ($2000e8 * 1e10)

Support

FAQs

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