Core Contracts

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

Missing staleness validation in RAACHousePrices#getLatestPrice()

Summary

The getLatestPrice() does not check if the retrieved price is stale. This allows the protocol to rely on outdated price data, which can be exploited to manipulate borrowing and liquidation in dependent contract - LendingPool.

Vulnerability Details

Attack scenario:

  1. Assume an NFT was last priced at 100 ETH.

  2. The oracle stops updating or is manipulated, and the real estate was disappeared.

  3. A malicious user calls borrow() in LendingPool, which calls getLatestPrice() to fetch the outdated 100 ETH price.

  4. The attacker borrows far more than allowed, leading to bad debt for the protocol.

As seen above, this is only on example and so many vulnerabilities there. Real estate price is safer than others but does not mean maintain forever and even only their price is changed slower than others. But this means it doesn't ignore their stalenesss.

Impact

Severe risk of protocol bad debt: Borrowers over-borrow against outdated prices, leading to insolvency.

Unfair liquidations: Attackers trigger liquidations based on outdated low prices.

If the protocol loses funds due to incorrect price validation, users will not trust the lending system.

Tools Used

manual

Recommendations

To prevent outdated price exploitation, add a staleness check before returning the price.

At least, after a few seconds of lastUpdated, the price can be believable

function getLatestPrice(uint256 _tokenId) external view returns (uint256, uint256) {
uint256 price = tokenToHousePrice[_tokenId];
uint256 lastUpdated = lastUpdateTimestamp;
if (price == 0) revert InvalidNFTPrice();
+ if (block.timestamp > lastUpdated + MinStalenessDay) {
+ revert StalePriceError(_tokenId, lastUpdated);
+ }
return (price, lastUpdated);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 month 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 about 1 month 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.