The getHousePrice
function in RAACNFT contract incorrectly uses tokenToHousePrice
instead of getLatestPrice
from the oracle contract. This implementation has three critical issues:
Returns 0 if oracle address hasn't been set
Returns 0 if price hasn't been set
Returns potentially stale prices without timestamp validation
Current implementation:
Users can receive incorrect or stale price information
Zero prices returned without error indication
No way to distinguish between unset oracle, unset price, or actual zero price
Downstream contracts relying on this function could make incorrect financial decisions
Potential for economic exploits if price staleness isn't checked
Use getLatestPrice
and handle timestamp:
Manual code review
Foundry testing framework
Static analysis
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.