ChainlinkOracle::_getData() doesn't check for stale prices and round validation.
The function _getData() retrieves the latest round data using latestRoundData(), but it does not check if the updatedAt timestamp is recent or if, the answeredInRound matches the roundId this leaves the function vulnerable to using stale data if the Chainlink oracle fails to update.
Code will execute with prices that don’t reflect the current pricing resulting in a potential loss of funds for users.
The _getData function should include checks to verify the freshness of the data:
Ensure that the updatedAt timestamp is within an acceptable threshold.
Verify that answeredInRound matches or exceeds roundId to confirm the data is from the latest round.
LightChaser: ## [Medium-4] Insufficient oracle validation
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.