DittoETH

Ditto
DeFiFoundryOracle
55,000 USDC
View results
Submission Details
Severity: medium
Valid

Stale prices can be used in Chainlink oracles without heartbeat checks

Summary

Chainlink data can be stale if not updated within the stipulated heartbeat. This means calls to any Chainlink oracle can produce stale data and be used to perform activities like creating shorts, asks and bids.

Vulnerability Details

Chainlink oracles define a heartbeat they use in updating prices. Prices are considered stale if they aren't updated after the heartbeat countdown elapses. The Chainlink oracle call for all oracles except the baseOracle does not have a staleness check to prevent using stale data for prices. This will allow it create asks, bids and shorts using stale and possibly inaccurate prices.

Impact

The protocol can use stale prices to perform operations like creating asks, bids, shorts and other core functionalities.

Tools Used

Vscode

Recommendations

Add a staleness check to the invalidFetchData check. The createMarket function parameters can be expanded to include a heartbeat for each new oracle added which can then be used in the invalidFetchData check.

Updates

Lead Judging Commences

0xnevi Lead Judge
almost 2 years ago
0xnevi Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Known issues
0xnevi Lead Judge almost 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

finding-644

Support

FAQs

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