code-423n4 / 2022-12-tigris-findings

8 stars 4 forks source link

Chainlink latestAnswer() is deprecated #625

Closed code423n4 closed 1 year ago

code423n4 commented 1 year ago

Lines of code

https://github.com/code-423n4/2022-12-tigris/blob/0cb05a462e78c4470662e9d9a4f9ab587f266bb5/contracts/utils/TradingLibrary.sol#L113

Vulnerability details

Impact

Use of a deprecated API may produce incorrect results and/or break the protocol. The latestAnswer() API does not produce error if no answer has been reached and returns 0 instead.

Proof of Concept

Chainlink docs for latestAnswer() deprecated API.

Tools Used

Manual review.

Recommended Mitigation Steps

Use latestRoundData() instead.

c4-judge commented 1 year ago

GalloDaSballo marked the issue as duplicate of #316

c4-judge commented 1 year ago

GalloDaSballo marked the issue as not a duplicate

GalloDaSballo commented 1 year ago

L

c4-judge commented 1 year ago

GalloDaSballo changed the severity to QA (Quality Assurance)

c4-judge commented 1 year ago

GalloDaSballo marked the issue as grade-c