The contract exhibits a severe vulnerability as it uses the latestRoundData
function without checking for stale data. The absence of this check could result in the retrieval of outdated or incorrect prices, as highlighted in the Chainlink documentation.
The root cause of the vulnerability is the omission of a check for stale data in the usage of latestRoundData
. This oversight may lead to the acceptance of outdated prices, compromising the accuracy of the retrieved data.
Without the implementation of a stale data check, the contract risks using obsolete prices from the latestRoundData
function. This could have significant consequences, especially in financial applications where up-to-date and accurate pricing data is crucial.
Manual Review
It is imperative to enhance the security of the contract by implementing a thorough check for stale data when using the latestRoundData
function. The provided recommendation code snippet can serve as a starting point, ensuring that only current and valid price data is utilized.
Example:
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.