The raiseAlert()
function in the OperatorVault
contract does not verify the validity of the Chainlink price feed data before raising an alert. Specifically, it lacks checks for whether the feed data is stale or incorrect. This could result in the function raising false alerts based on outdated or incorrect data, potentially causing unnecessary gas consumption and operational issues.
Incorrect Data Handling: The function does not check if the feed's current value deviates from an expected or acceptable range, meaning it could raise an alert unnecessarily even when no actual issue is present.
Impact
High, as it can result in the application working with an incorrect asset price
Manual review
Check for Stale Data: Add logic to check the timestamp of the last price feed update (using updatedAt
) against the current block timestamp. If the feed hasn't been updated within a predefined threshold, then raise the alert.
Check for Value Deviations: Compare the feed's latest value with a reference or expected value to ensure it is within an acceptable range before raising an alert.
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.