Core Contracts

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

lastUpdateTimestamp should be set for individual nft's not at global level.

Vulnerability Details

Inside RAACHousePrices contract there is a state variable lastUpdateTimestamp which is updated whenever price is updated for a particular houseNFT.
This creates a problem when we try to fetch price for a particular token, as along with the price it will also return lastUpdateTimestamp, now contract calling this function will think this timestamp is for that particular token but in reality it is not.

Impact

In LendingPool::getNFTPrice we are calling RAACHousePrices::getLatestPrice which returns lastUpdateTimestamp, now this timestamp was updated for some other token, so for our tokenId it is returning stalePrice.
This stale price will be used while withdrawing nft and healthFactor of the user, causing unfair liquidation.

Tools Used

Manual Review

Recommendations

lastUpdateTimestamp should be set at individual nft level not at the global level.

Updates

Lead Judging Commences

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

RAACHousePrices uses a single global lastUpdateTimestamp for all NFTs instead of per-token tracking, causing misleading price freshness data

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

RAACHousePrices uses a single global lastUpdateTimestamp for all NFTs instead of per-token tracking, causing misleading price freshness data

Support

FAQs

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