Core Contracts

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

M-4 Inconsistent Price Update Tracking in RAACHousePrices::getLatestPrice

Summary

The getLatestPrice function uses a single global lastUpdateTimestamp for all tokens instead of tracking updates per token. This can lead to incorrect price data being used, as it falsely implies that all token prices were updated simultaneously when only one token's price was modified.

function getLatestPrice(
uint256 _tokenId
) external view returns (uint256, uint256) {
return (tokenToHousePrice[_tokenId], lastUpdateTimestamp);
}

Impact

  • Users or smart contracts relying on this timestamp may assume a price is recent when it is outdated.

Tools Used

Manual Review

Recommendations

  • Track timestamps per token by maintaining a mapping that stores the last update time for each _tokenId

  • Modify the function to return token-specific timestamps to ensure accuracy.

Updates

Lead Judging Commences

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