DeFiHardhat
12,000 USDC
View results
Submission Details
Severity: low
Invalid

Reserve is rounded up instead of being rounded down

Summary

When calculating reserve, it is being rounded up instead of it being rounded down

Vulnerability Details

In the calcReserve function, reserve is rounded up. Here:

    reserve = LibMath.roundUpDiv(reserve, reserves[j == 1 ? 0 : 1] * EXP_PRECISION);

The use of roundUpDiv function rounds up rather than down. Rounding up would not give the accurate figure in a reserve, but a false figure.

Impact

The reserve would be have a false high amount than what it actually holds

Tools Used

Manual review

Recommendations

Round down rather than up.

Updates

Lead Judging Commences

giovannidisiena Lead Judge
about 1 year ago
giovannidisiena Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Design choice
Assigned finding tags:

Informational/Invalid

Support

FAQs

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