Core Contracts

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

Lack of Liquidator Incentives May Lead to Bad Debt Accumulation

Summary

An issue was identified in the LendingPool.sol contract where the liquidation process lacks incentives for liquidators. The initiateLiquidation() function allows anyone to trigger liquidation if a borrower's health factor falls below the threshold. However, since liquidators must pay gas fees without any reward, there is little motivation to liquidate undercollateralized borrowers. This could lead to the accumulation of bad debt and significant financial losses for the protocol.

Vulnerability Details

Affected Function:

  • initiateLiquidation() in LendingPool.sol

https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/pools/LendingPool/LendingPool.sol#L447-L463

Liquidation is a crucial aspect of lending protocols to prevent bad debt. The current implementation relies on external actors (liquidators) to call initiateLiquidation(), but it does not provide any compensation for them. Since executing this function requires gas fees, rational actors may avoid triggering liquidation, especially during network congestion or periods of high gas prices.

If no liquidators step in, bad debt will accumulate, leading to potential insolvency and severe losses for the protocol.

Code Snippet:

function initiateLiquidation(
address userAddress
) external nonReentrant whenNotPaused {
if (isUnderLiquidation[userAddress])
revert UserAlreadyUnderLiquidation();
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);
}

Proof of Concept (PoC)

Preconditions:

  • A borrower’s health factor drops below the healthFactorLiquidationThreshold.

  • The initiateLiquidation() function requires an external liquidator to call it.

  • There is no reward mechanism for the liquidator.

Steps to Trigger:

  1. Borrower health factor falls below the threshold.

  2. Liquidators recognize that calling initiateLiquidation() will cost gas without compensation.

  3. No liquidator calls the function.

  4. Borrower's bad debt remains unliquidated, increasing risk to the protocol.

Impact

The absence of incentives for liquidators increases the risk of bad debt accumulation, which could eventually lead to insolvency. If liquidation fails, lenders may be unable to withdraw their funds, causing significant financial losses and potentially triggering a bank run on the protocol.

Tools Used

Manual Review

Recommendations

A proper incentive mechanism should be introduced to encourage liquidation. Potential solutions include:

  • Implementing a liquidation bonus, where liquidators receive a portion of the borrower’s collateral.

  • Allowing liquidators to claim a fee from the liquidated funds.

  • Integrating a protocol-owned bot to automate liquidations in case no external actor steps in.

Updates

Lead Judging Commences

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

Appeal created

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

No incentive to liquidate

Support

FAQs

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