15,000 USDC
View results
Submission Details
Severity: medium
Valid

staleCheckLatestRoundData

Summary

The additional check you added to the staleCheckLatestRoundData function checks if the updatedAt variable is equal to 0 or if the answeredInRound variable is less than the roundId variable. If either of these conditions is true, the function will revert with the OracleLib__StalePrice error..

Vulnerability Details

In libraries/OracleLib.sol =>
Add below code, to do staleCheckLatestRoundData =>
if (updatedAt == 0 || answeredInRound < roundId) {
revert OracleLib__StalePrice();
}

Impact

This means that if the data from the Chainlink Oracle is not up-to-date or if the latest round of data has not been answered yet, the function will revert and prevent further execution.

Tools Used

Manual Review

Recommendations

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.