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

[M-04] answeredInRound is Deprecated

Summary

The variable answeredInRound in Chainlink is used to indicate in which round the current price (answer) was recorded. According to Chainlink's documentation, this variable is marked "deprecated," which typically means that its use is no longer recommended and could be removed or its behavior changed in the future.

Vulnerability Details

The fact that it is marked as "deprecated" implies that its value should not be trusted for critical DSCEngine logic. In general, it's a good practice to avoid using deprecated features in your code to ensure future compatibility and avoid potential bugs or issues.

Impact

High

Tools Used

Manual code review

Recommendations

To make sure, you can add a check between answeredInRound and roundId, since answeredInRound cannot be fully trusted you can add updatedAt in the logic to ensure that the Oracle data is recent.

Support

FAQs

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