The mint
function in RAACNFT
contract uses house prices from RAACHousePrices
contract without validating whether the price data is stale, potentially allowing users to mint NFTs at outdated prices that don't reflect current market values.
In RAACHousePrices.sol
, prices are updated by the oracle and a timestamp is recorded:
However, in RAACNFT.sol
's mint
function, prices are used without any staleness check:
The key issues are:
While lastUpdateTimestamp
exists, it's never checked during minting
No maximum staleness threshold is enforced
Price validation only checks for non-zero values and sufficient payment
Users could mint NFTs at outdated prices during oracle downtime or delays, either paying too much or too little depending on market movements. This is particularly severe for real estate assets where price differences can represent significant monetary values.
Manual Review
Add a staleness threshold check in the mint
function:
Additionally, consider adding a price tolerance mechanism that requires prices to be recently confirmed if they have moved beyond a certain threshold.
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.