Core Contracts

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

Staleness of NFT price is not checked.

Summary

Contract - LendingPool.sol

function getNFTPrice(uint256 tokenId) public view returns (uint256) {
(uint256 price, uint256 lastUpdateTimestamp) = priceOracle.getLatestPrice(tokenId);
// @audit - it's not checking staleness of price, by leveraging lastUpdateTimestamp.
if (price == 0) revert InvalidNFTPrice();
return price;
}

It's fetching lastUpdateTimestamp but not cheaking w.r.t heartbeat of oracle.

Vulnerability Details

It can lead to stale price return, if the feed not updated frequently.

Impact

Wrong NFT price fetching from oracle.

Tools Used

Manual

Recommendations

verify lastUpdateTimestamp w.r.t heartbeat of oracle feed.

Updates

Lead Judging Commences

inallhonesty Lead Judge 3 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 3 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.