The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: medium
Invalid

The oracle return value from `latestRoundData()` is not validated

Summary

The oracle return value from latestRoundData() is not validated.

Vulnerability Details

The usage of the return values with latestRoundData is missing additional validations to ensure the price a valid/expected price and not staled.

Impact

Invalid or stale price may be used.

Tools Used

Manual

Recommendations

Adding addintional validation on the latestRoundData returns.

For example:

(uint80 roundID ,answer,, uint256 timestamp, uint80 answeredInRound) = AggregatorV3Interface(addr).latestRoundData();
require(answer > 0, "Chainlink price <= 0");
require(answeredInRound >= roundID, "Stale price");
require(timestamp != 0, "Round not complete");
// also back up oracle or stale price tolerance
Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Chainlink-price

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue
Assigned finding tags:

Chainlink-price

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.