Core Contracts

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

Stepwise jump in NFT prices can lead to bad debt

Summary

We have liquidation threshold of 80%, means users can only borrow 80% of deposited collateral values. but the issue is if price of NFTs changes suddenly the lenders can suffer bad debt.

Vulnerability Details

The price of NFTs is set by oracle in this function:

function setHousePrice(
uint256 _tokenId,
uint256 _amount
) external onlyOracle {
tokenToHousePrice[_tokenId] = _amount;
lastUpdateTimestamp = block.timestamp;
emit PriceUpdated(_tokenId, _amount);
}

Consider this scenario:

  • Borrower deposit NFT with $100K value

  • Borrower borrows $80K from lending pool (80% threshold)

  • Oracle updates the price of borrower collateral and it drops to $70K

  • Now borrower have $80K debt, but $70K collateral

  • Lenders suffers $10K loss

Impact

Bad debt can occur.

Tools Used

Manual Review

Recommendations

Consider implementing TWAP mechanism to avoid this issue.

Updates

Lead Judging Commences

inallhonesty Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Too generic

Support

FAQs

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