Core Contracts

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

closeLiquidation() fails to repay borrower's debt, preventing liquidation closure

Summary

Whenever a user has an unhealthy collateral level, he/she can be flagged for liquidation. According to the documentation, the user should handle this situation by calling closeLiquidation(). This function is supposed to repay the debt and reset the liquidation flag to false.

However, the issue arises because the closeLiquidation() function does not actually repay the user’s debt. As a result, this leads to a Denial of Service (DoS), preventing the user from closing liquidation and ultimately resulting in liquidation.

Vulnerability Details

According to the documentation, closeLiquidation() is described as follows:

/**
* @notice Allows a user to repay their debt and close the liquidation within the grace period
*/

However, this is not the case, as the function does not actually repay the debt anywhere in its implementation. This prevents the user from closing liquidation.

Impact

Users may lose funds due to forced liquidation, despite following the expected process.

Tools Used

  • Manual review

Recommendations

  • Include repay() in the sequence of closing liquidation to ensure the user's debt is actually settled before resetting the liquidation flag.

Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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