Core Contracts

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

Once User Helthfactor goes beyound thresold, then he forced to either closed his position or get liquidated

Summary

Vulnerability Details

This Protocol Use a strange approch to Deal with Position.

Here major flaw present in this type of approch, and its quite different from Defi industry approch. It may give bad experience Users

I try to summarize all issues below although i mentioned some above.

  • Not Updating User's State`(isUnderLiqudation[])` once user deposit more collateral

    • In DeFi its always possible that User Health factor goes beyound Liquidation thresold due to quick assets price fluctuation. It doesn't mean we force user to pay DEBT or liqudate him

    • During this situation Protocol should give option to User to add more collateral make his position safe

  • Forcing User to pay all Of his DEBT within limited time

    • RAAC force User to pay all of his DEBT(excluding some DUST) withing 3days(present time) to survive from liquidation

    • Althogh RAAC allow User to pay any amont as DEBT repayment, but by calculating health factor status of `isUnderLiqudation[]` never changed, even if user has debt just more than DUST (> 1e6) whole position will be liquidated and All NFTs of user send to stability pool

  • During Finalizing Liquidation process RAAC never check Health Factor to ensure at current moment User is liquidatable or not, it just only check status of `isUnderLiqudation[]` mapping (i explained above how this state and this will affect) and liquidate position and all User NFTs sent to stability pool.

Impact

User experience will be impacted

Tools Used

Manual Review

Recommendations

All issue will be resolve by one simple step

  • during finalizing liquidation, Raac only need to check current health factor of User

  • if Health factor is above Liqudation stop liquidation and set

  • isUnderLiquidation[userAddress] = false;
    liquidationStartTime[userAddress] = 0;
Updates

Lead Judging Commences

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

LendingPool::finalizeLiquidation() never checks if debt is still unhealthy

Support

FAQs

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