Core Contracts

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

Risk of liquidation due to inability to repay debt or close liquidation during contract pause

Summary

The closeLiquidation() function currently has a whenNotPaused modifier, which prevents users from closing their liquidation if the contract is paused. This can lead to situations where users are unable to act within the grace period, potentially resulting in their liquidation.

Vulnerability Details

When a user's liquidation is initiated, they have a grace period to close it.

>> function closeLiquidation() external nonReentrant whenNotPaused {
// @audit-info Users will be liquadated due to contract pause check
address userAddress = msg.sender;
if (!isUnderLiquidation[userAddress]) revert NotUnderLiquidation();
---SNIP---
// Grace period allowable
>> if (block.timestamp > liquidationStartTime[userAddress] + liquidationGracePeriod) {
revert GracePeriodExpired();
}
---SNIP---
}

However, if the contract is paused during this period, the user cannot make repayments or execute the closeLiquidation() function due to the whenNotPaused modifier. This oversight can lead to unintended liquidations, as users may miss the opportunity to close their liquidation while the contract is paused.

Impact

Users may be unable to close their liquidation during the pause period, leading to:

  • Loss of user funds due to the inability to act within the grace period.

Tools Used

Manual Review

Recommendations

Implement a way to ensure that pause duration does not eat into the user's grace period.

Updates

Lead Judging Commences

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

Unfair Liquidation As Repayment / closeLiquidation Paused While Liquidations Enabled

inallhonesty Lead Judge 3 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.