Core Contracts

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

Lack of Normalized Debt Check Before Division

Summary :-

Lack of Normalized Debt Check Before Division

Vulnerability Details :-

The function _update directly calls ILendingPool(\_reservePool).getNormalizedDebt() and uses it for division. If getNormalizedDebt() returns 0, this will cause a division by zero error, leading to a transaction revert.

Impact :-

  • Unexpected reverts during minting or burning operations.

  • Potential denial of service if the lending pool's normalized debt is temporarily 0.

Tools Used :-

Manual code review

Recommendations :-

Before performing the division, ensure that normalizedDebt is greater than 0:

uint256 normalizedDebt = ILendingPool(_reservePool).getNormalizedDebt();
if (normalizedDebt == 0) revert InvalidAmount(); // Prevent division by zero
uint256 scaledAmount = amount.rayDiv(normalizedDebt);
Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
inallhonesty Lead Judge 4 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.