Core Contracts

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

Incorrect Debt Amount in BorrowerLiquidated Event in StabilityPool::liquidateBorrower

Summary

The liquidateBorrower function is responsible for liquidating a borrower by repaying their debt in the LendingPool. However, the BorrowerLiquidated event emits the scaled debt (scaledUserDebt) instead of the actual debt (userDebt). This discrepancy can lead to misleading or incorrect reporting of liquidation amounts.

Vulnerability Details

The BorrowerLiquidated event currently emits scaledUserDebt, which is not the actual amount owed by the borrower.

The function retrieves userDebt from lendingPool.getUserDebt(userAddress), then scales it using WadRayMath.rayMul(userDebt, lendingPool.getNormalizedDebt()), which adjusts the value using an index-based scaling factor.

The emitted value in BorrowerLiquidated(userAddress, scaledUserDebt) does not represent the real debt that was liquidated.

Impact

Users tracking liquidation amounts may overestimate debt repayment figures.

Tools Used

Manual Review

Recommendations

Modify the event emission to use userDebt instead of scaledUserDebt.

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Validated
Assigned finding tags:

StabilityPool::liquidateBorrower emits scaled debt (scaledUserDebt) instead of actual debt (userDebt) in BorrowerLiquidated event, causing misleading liquidation reports

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Validated
Assigned finding tags:

StabilityPool::liquidateBorrower emits scaled debt (scaledUserDebt) instead of actual debt (userDebt) in BorrowerLiquidated event, causing misleading liquidation reports

Support

FAQs

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

Give us feedback!