Core Contracts

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

Loss of user funds due to Unfair Liquidation

Summary

NFTs newly deposited by a user who is already being marked for liquidation will still get liquidated although they have no impact on the loan.

Vulnerability Details

When a user is marked for liquidation, they have a grace period within which they can call closeLiquidationto reduce debt and prevent this from happening. However, if the user still deposits** more NFTs as collateral (In an attempt to improve healthFactor) **these newly added NFTs are still liquidated when finalizeLiquidation is called because the process loops through the entire nft array and liquidates everything.It does not check whether some NFTs were added after liquidation was initiated. This leads to unintended and unfair collateral loss, even though the newly added NFTs were never part of the original liquidation decision.

All NFTs deposited from the time initiateLiquidation is called will still get liquidated if the user failed to closeLiquidation within the grace period.

Impact

Users lose NFTs that were never supposed to be liquidated.

Tools Used

Manual Review

Recommendations

Implement a check to stop more NFT deposits when a user has been marked for liquidation.

Updates

Lead Judging Commences

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

Users can deposit NFTs using LendingPool::depositNFT while under liquidation, leading to unfair liquidation of NFTs that weren't part of original position

Support

FAQs

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