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 27, 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
Chainlink oracle's price check may be insufficient validated
Summary
Chainlink oracle's price check may be insufficient.
Vulnerability Detail
The function getLatestPrice in ControllerPeggedAssetV2.sol checks for round completeness and price, but does not check for staleness of price. (uint256 updatedAt variable)
The above checks for the staleness of the sequencer, not the staleness of price.
/// @--audit this checks for the staleness of the sequenceruint256 timeSinceUp =block.timestamp- startedAt;
if (timeSinceUp <= GRACE_PERIOD_TIME) {
revertGracePeriodNotOver();
}
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
peanuts
medium
Chainlink oracle's price check may be insufficient validated
Summary
Chainlink oracle's price check may be insufficient.
Vulnerability Detail
The function getLatestPrice in ControllerPeggedAssetV2.sol checks for round completeness and price, but does not check for staleness of price. (uint256 updatedAt variable)
The above checks for the staleness of the sequencer, not the staleness of price.
Impact
Oracle may return a stale price.
Code Snippet
https://github.com/sherlock-audit/2023-03-Y2K/blob/main/Earthquake/src/v2/Controllers/ControllerPeggedAssetV2.sol#L296-L317
Tool used
Manual Review
Recommendation
Recommend checking for the updated price as well
Duplicate of #70
The text was updated successfully, but these errors were encountered: