Core Contracts

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

`LendingPool.getNFTPrice()` Doesn't Check if the Price is Stale

Summary

LendingPool.getNFTPrice() does not check if the price is stale. As a result, a stale price could be used, allowing borrowers to borrow more than they are permitted, which poses a potential risk of fund loss.

Vulnerability Details

The getNFTPrice() function only verifies that the price is non-zero but fails to check if the price is stale. Consequently, a stale price could be utilized, allowing borrowers to exceed their borrowing limits, resulting in potential fund loss. Alternatively, borrowers could face unfair liquidation.

function getNFTPrice(uint256 tokenId) public view returns (uint256) {
(uint256 price, uint256 lastUpdateTimestamp) = priceOracle.getLatestPrice(tokenId);
if (price == 0) revert InvalidNFTPrice();
return price;
}

Impact

A stale price could be used, enabling borrowers to borrow more than they are allowed, resulting in a potential risk of fund loss. Alternatively, borrowers could face unfair liquidation.

Tools Used

Manual review

Recommendations

Implement a check for stale prices.

Updates

Lead Judging Commences

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

LendingPool::getNFTPrice or getPrimeRate doesn't validate timestamp staleness despite claiming to, allowing users to exploit outdated collateral values during price drops

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

LendingPool::getNFTPrice or getPrimeRate doesn't validate timestamp staleness despite claiming to, allowing users to exploit outdated collateral values during price drops

Support

FAQs

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

Give us feedback!