You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 26, 2023. It is now read-only.
github-actionsbot opened this issue
Mar 1, 2023
· 0 comments
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
When using the latestroundData function to fetch prices from a chainlink price feed/feed registry, it is important to make sure that it returns correct and fresh prices. The answer that is returned may be carried over from the previous round
Vulnerability Detail
There are insufficient checks to deal with stale prices from Chainlink. There should be a require(answeredInround >= roundID) statement for tracking which round data is being used, and fallback to alternate oracles by the guardian if this check reverts.
Impact
Stale prices in a volatile market can be detrimental to the protocol's execution. All functions like borrow and liquidate depend on the getPrice functionality. If the returned price becomes outdated, there maybe a loss of funds to users until guardian changes the oracle address.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
Chinmay
medium
Chainlink API may return stale prices
Summary
When using the latestroundData function to fetch prices from a chainlink price feed/feed registry, it is important to make sure that it returns correct and fresh prices. The answer that is returned may be carried over from the previous round
Vulnerability Detail
There are insufficient checks to deal with stale prices from Chainlink. There should be a require(answeredInround >= roundID) statement for tracking which round data is being used, and fallback to alternate oracles by the guardian if this check reverts.
Impact
Stale prices in a volatile market can be detrimental to the protocol's execution. All functions like borrow and liquidate depend on the getPrice functionality. If the returned price becomes outdated, there maybe a loss of funds to users until guardian changes the oracle address.
Code Snippet
https://github.com/sherlock-audit/2023-02-blueberry/blob/main/contracts/oracle/ChainlinkAdapterOracle.sol#L76
Tool used
Manual Review
Recommendation
Add require(answeredInRound >= roundID) as an additional check
Duplicate of #94
The text was updated successfully, but these errors were encountered: