Core Contracts

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

Unresolved Liquidation Process Leading to Potential Insolvency

Summary

The initiateLiquidation function in LendingPool.sol allows initiating liquidation for undercollateralized users but does not enforce actual debt repayment. If neither the borrower nor the Stability Pool covers the outstanding debt, the protocol can accumulate bad debt, leading to insolvency.

Vulnerability Details

The function initiateLiquidation only updates the state by marking a user as under liquidation and recording the timestamp. However, it does not enforce any debt repayment mechanism. The liquidation process relies solely on:

  1. The borrower voluntarily repaying their debt within a grace period.

  2. The Stability Pool having sufficient funds to cover the debt in exchange for the NFT.

If neither of these conditions is met, the protocol accrues bad debt, creating an insolvency risk. The issue arises due to the lack of an automatic enforcement mechanism for liquidation settlement, meaning an undercollateralized position could persist indefinitely.

Code Snippet (LendingPool.sol)

function initiateLiquidation(address userAddress) external nonReentrant whenNotPaused {
if (isUnderLiquidation[userAddress]) revert UserAlreadyUnderLiquidation();
// update state
ReserveLibrary.updateReserveState(reserve, rateData);
UserData storage user = userData[userAddress];
uint256 healthFactor = calculateHealthFactor(userAddress);
if (healthFactor >= healthFactorLiquidationThreshold) revert HealthFactorTooLow();
isUnderLiquidation[userAddress] = true;
liquidationStartTime[userAddress] = block.timestamp;
emit LiquidationInitiated(msg.sender, userAddress);
}

This function fails to ensure that a liquidation event leads to the actual repayment of debt, leaving the protocol vulnerable to insolvency.

Impact

If neither the borrower nor the Stability Pool covers the outstanding debt:

  • The protocol accumulates bad debt, leading to insolvency over time.

  • Liquidators are not incentivized to step in since there is no enforced mechanism to settle the debt.

Tools Used

Manual code review

Recommended Mitigation

To prevent insolvency, the liquidation process should enforce actual debt settlement by:

  • Implementing a forced liquidation mechanism where external liquidators can repay the debt and claim collateral.

  • Introducing penalties or additional incentives for liquidators to ensure bad debt does not accumulate.

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement
inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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

Give us feedback!