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 Oct 1, 2023. It is now read-only.
sherlock-admin opened this issue
Mar 28, 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
minhtrng
medium
Outdated staleness check of price feed
Summary
Checks for stale price data are outdated.
Vulnerability Detail
The function
getLatestPrice
checks for stale data like this:According to https://ethereum.stackexchange.com/questions/133890/chainlink-latestrounddata-security-fresh-data-check-usage the variable
answeredInRoundId
is a legacy variable and the check for staleness should be based on theupdatedAt
parameter of thelatedRoundData
function.Impact
outdated staleness check could cause price data to pass checks even though stale
Code Snippet
https://github.com/sherlock-audit/2023-03-Y2K/blob/ae7f210d8fbf21b9abf09ef30edfa548f7ae1aef/Earthquake/src/v2/Controllers/ControllerPeggedAssetV2.sol#L315
Tool used
Manual Review
Recommendation
Apply the check suggested in the link above.
Duplicate of #70
The text was updated successfully, but these errors were encountered: