Core Contracts

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

LendingPool: a user can be liquidated when contract is paused and cannot repay his debt

Summary

LendingPool manages liquidation. functions linked to borrowing and liquidation :

As we can see, if the contract is in a pause state, there is no way for the user to call repay() and closeLiquidation(). But stabilityPool can be called to liquidate user during pause event.
Also there is no grace period after an unpause() event, so even if there is a modifier on finalizeLiquidation, user may not have enough time to repay.

Vulnerability Details

  1. User deposit NFT into lending pool and borrow token against it

  2. Value of NFT drops, and user enter liquiditable state, initiateLiquidation is called against him : isUnderLiquidation[address(user) = true

  3. Security issue happens and owner calls pause()

  4. User is not able to repay() or closeLiquidation() because of whenNotPaused modifier

  5. StabilityPool calls finalizeLiquidation(), users is now liquidated and was blocked to cancel it

  6. Security is fix and owner calls unpause()

Impact

A user can be unfairly liquidated during a pause event and loose his NFT without having the opportunity to repay his debt. Also a grace period should be added after the unpause() event, so that user who are under liquidation have more time to repay their debt.

Tools Used

Manual

Recommendations

finalizeLiquidation() should have the whenNotPaused modifier. Furthermore, there should be a grace period after an unpause event, otherwise a user could not have the time to repay his debt after the pool is unpause()

Updates

Lead Judging Commences

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

Unfair Liquidation As Repayment / closeLiquidation Paused While Liquidations Enabled

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

Unfair Liquidation As Repayment / closeLiquidation Paused While Liquidations Enabled

Support

FAQs

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