The Standard

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

Chainlink validations

Summary

Chainlink data basic validations are missing.

Vulnerability Details

The contract fetches Oracle data and only pays attention to the price, ignoring other parameters:

(,int256 priceEurUsd,,,) = Chainlink.AggregatorV3Interface(eurUsd).latestRoundData();
(,int256 assetPriceUsd,,,) = Chainlink.AggregatorV3Interface(asset.token.clAddr).latestRoundData();

Verifying results from Chainlink Oracle is always recommended, so it does not contain stale data or wrong values. You can read more here:
https://github.com/code-423n4/2021-10-mochi-findings/issues/87

Impact

The contract blindly accepts any results from the Oracle. A stale Oracle might cause incorrect distribution of the assets.

Tools Used

Manual review.

Recommendations

Verify Oracle data, e.g.

require(answeredInRound >= roundID, "...");
require(timeStamp != 0, "...");
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.