Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: high
Invalid

Precision Loss in Interest Calculation

Summary

A precision loss issue exists in the calculateCompoundedInterest function, which results in the ratePerSecond calculation potentially being zero. This leads to no interest being accrued for borrowers while lenders continue to receive their interest. As a result, the interest source for lenders (borrowers' payments) may not be correctly accounted for, causing an imbalance in the protocol.

Severity

High - The bug leads to incorrect interest accrual calculations, potentially disrupting the lender-borrower balance and leading to economic losses.

Impact

  • Borrowers may not be charged interest if ratePerSecond rounds to zero due to precision loss.

  • Lenders continue receiving interest payments, creating a situation where payouts exceed collected interest.

  • Protocol funds could be drained over time due to this misalignment.

Vulnerability Details

Issue in calculateCompoundedInterest

uint256 ratePerSecond = rate.rayDiv(SECONDS_PER_YEAR);
  • Issue: ratePerSecond can become zero due to integer division rounding down.

  • Consequence: If ratePerSecond is zero, the interest factor remains 1 (no interest accrual), leading to an imbalance where borrowers do not pay interest, but lenders continue earning it.

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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

Give us feedback!