Core Contracts

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

The Function Will Revert If The Remaining Collateral Equals The Required Collateral

Summary

The current check, checks if the required collateral is greater than the remaining which is correct but doesn't check if its equal.

Vulnerability Details

If the remaining collateral(collateralValue - nftValue) == the required collateral (userDebt.percentMul(liquidationThreshold)), this check will revert which is not supposed to happen.

// @audit if the remaining callateral == required callateral it will revert
if (collateralValue - nftValue < userDebt.percentMul(liquidationThreshold)) {
revert WithdrawalWouldLeaveUserUnderCollateralized();
}

Impact

  • Undercollateralized NFTs will pass this check causing the NFT to bypass the undercollateralization

  • Attacker can utilize this to withdraw their undercollateraized NFT before it is liquidated

Tools Used

manual review

Recommendations

```solidity

if (collateralValue - nftValue <= userDebt.percentMul(liquidationThreshold)) {

revert WithdrawalWouldLeaveUserUnderCollateralized();

}

````

Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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