Core Contracts

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

No partial repayments are possible

Summary

The issue in the LendingPool contract is that users must fully repay their debt in order to exit liquidation. Partial repayments are not allowed, which means that even if a user repays 90% of their debt, their position will still be liquidated if they cannot cover the full amount.

if (userDebt > DUST_THRESHOLD) revert DebtNotZero();

Vulnerability Details

Example Scenario

  1. A user enters liquidation with a debt of 1e18 (1 token).

  2. The user repays 9e17 (90% of the debt), leaving only 1e17 remaining.

  3. When calling closeLiquidation(), the protocol checks if the debt is completely paid off.

  4. Since there is still some remaining debt (1e17), the user cannot exit liquidation and risks losing their position.

This is problematic because:

  • The protocol forces users to repay 100% instead of allowing partial repayments.

  • Even if a user repays most of their debt, they could still lose their position due to a small remaining balance.

Impact

  • Unnecessary Liquidations – Users who repay most of their debt still lose their collateral due to a small outstanding balance.

Tools Used

Manual review

Recommendations

Modify the condition to allow users to **exit liquidation if their remaining debt is below a reasonable threshold.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 month ago
Submission Judgement Published
Validated
Assigned finding tags:

LendingPool::finalizeLiquidation() never checks if debt is still unhealthy

Support

FAQs

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