The RAACHousePrices
contract is designed to manage house prices associated with RAAC tokens. However, the contract exhibits an inconsistency between its documented intentions and its implementation regarding timestamp tracking. While the documentation claims that the contract "updates timestamp for each token individually" and "returns token-specific update timestamp," the actual implementation uses a single global timestamp (lastUpdateTimestamp) for all tokens.
The function getLatestPrice(uint256 _tokenId)
returns (tokenToHousePrice[_tokenId], lastUpdateTimestamp)
, implying that each token should have its individual timestamp.
The setHousePrice(uint256 _tokenId, uint256 _amount)
function also updates only a single global timestamp (lastUpdateTimestamp) instead of maintaining a separate timestamp per token. this will cause a discrepancy, leading to incorrect timestamp reporting for token-specific price updates.
While the oracle is trusted, inaccurate historical tracking can complicate analytics, and on-chain data reconciliation.
It affects data granularity and tracking which may cause incorrect timestamp reporting for integrating protocols and difficulty in auditing price update history
No way to determine when a specific token's price was last updated as the timestamp returned might be from a different token's update
Manual Code Review
Documentation Review and Cross-checking with Implementation
Implement token-specific timestamp tracking
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.