This repository has been archived by the owner on Nov 19, 2023. It is now read-only.
0xChinedu - Chainlink's latestRoundData return stale or incorrect result #54
Labels
Excluded
Excluded by the judge without consulting the protocol or the senior
Non-Reward
This issue will not receive a payout
0xChinedu
medium
Chainlink's latestRoundData return stale or incorrect result
Summary
Chainlink's latestRoundData() is used but there is no check if the return value indicates stale data. This could lead to stale prices according to the Chainlink documentation:
https://docs.chain.link/docs/historical-price-data/#historical-rounds
Vulnerability Detail
In ExchangeRate.sol, you are using latestRoundData, but there is no check if the return value indicates stale data.
This could lead to stale prices according to the Chainlink documentation:
https://docs.chain.link/data-feeds/price-feeds/historical-data
Related report:
code-423n4/2021-05-fairside-findings#70
Impact
Function could return stale price data for the underlying asset.
Code Snippet
https://github.com/sherlock-audit/2023-03-notional/blob/main/contracts-v2/contracts/internal/valuation/ExchangeRate.sol#L57
Tool used
Manual Review
Recommendation
Consider Adding Checks For Stale Data
The text was updated successfully, but these errors were encountered: