The RAACHousePrices contract uses an update timestamp variable that is shared for all NFTs, leading to a condition where each call to setHousePrices(..)
overwrites this variable.
The contract RAACHousePrices.sol:L17 has a variable called lastUpdateTimestamp
. It can hold a single uint256 value. The function setHousePrice(..)
in L49 and getLatestPrice(..)
in L34 both utilize this variable. As a result, whenever the price is set for a single NFT, the variable is overwritten and the last update timestamp is reported for all NFTs, even though only a single token ID had its price updated.
Incorrect update timestamps will cause NFT related transactions to execute at an incorrect price, leading to financial loss for the protocol or the users (depending on the direction of the price error).
Manual review
The lastUpdateTimestamp
should be a mapping and the relevant functions (setHousePrice, getLatestPrice) should set/get the last update timestamp that corresponds to a specific token id.
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.