The RAACHousePrices
contract contains a vulnerability where the lastUpdateTimestamp
variable is updated globally instead of being linked to individual token (house) IDs. This design flaw makes it impossible to determine when a specific token's price was last updated. Additionally, the LendingPool::getNFTPrice
function does not perform any staleness check, which could lead to outdated price data being used in transactions.
The RAACHousePrices
contract maintains a single lastUpdateTimestamp
variable that is updated whenever any token price is modified:
When retrieving a token's price, the function does not provide a token-specific timestamp:
Since lastUpdateTimestamp
is updated every time any token price is modified, it does not provide accurate information about when a particular token's price was last changed. As a result, users and other smart contracts may incorrectly assume that a token's price is more recent than it actually is.
Furthermore, the LendingPool::getNFTPrice
function does not verify if the retrieved price is stale:
Without a mechanism to determine whether the price is outdated, users may unknowingly rely on old price data, leading to financial losses.
This vulnerability introduces two major risks:
It is impossible to track the last update timestamp of an individual token, leading to incorrect assumptions about data freshness.
Users and other contracts may rely on stale price data due to the lack of a staleness check in getNFTPrice
, which could result in incorrect pricing decisions and financial exposure.
Manual review.
Instead of using a global lastUpdateTimestamp
, store timestamps individually for each token ID:
Modify getNFTPrice
to verify whether the price is still valid before returning it:
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.