Core Contracts

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

Misleading Price Update Timestamp

Summary

setHousePrice function leads to price missinterpretation since one updated item will say all other prices were also updated.

Vulnerability Details

The `setHousePrice` function can update any tokenId price but it also sets lastUpdateTimestamp so it gives the impression that all token ids were updated too at that timestamp but only one of them was.

https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/primitives/RAACHousePrices.sol#L49-L56

function setHousePrice(
uint256 _tokenId,
uint256 _amount
) external onlyOracle {
tokenToHousePrice[_tokenId] = _amount;
lastUpdateTimestamp = block.timestamp;
emit PriceUpdated(_tokenId, _amount);
}

Impact

users will assume that all of the _tokenId were updated at that lastUpdateTimestamp but it was probably not.

Tools Used

Manual

Recommendations

add a mapping for every single tokenId to track their own time of price update.

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.