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 Nov 26, 2023. It is now read-only.
sherlock-admin opened this issue
May 23, 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
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
Brenzee
medium
Chainlink's latestRoundData might be stale or incorrect
Summary
Returned data from
latestRoundData
is not checked if it is valid and not stale.Vulnerability Detail
Here is an example of StableOracleWETH.sol contract
As we can see
latestRoundData
returned values are not being verified.Impact
This could lead to stale/incorrect prices according to Chainlink https://docs.chain.link/data-feeds/price-feeds/historical-data
Code Snippet
https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/oracles/StableOracleDAI.sol#L48
https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/oracles/StableOracleWBTC.sol#L23
https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/oracles/StableOracleWETH.sol#L23
Tool used
Manual Review
Recommendation
Add check statements, that verify if data is valid and not stale.
Example for StableOracleWETH.sol
Duplicate of #31
The text was updated successfully, but these errors were encountered: