Closed c4-submissions closed 11 months ago
https://github.com/code-423n4/2023-11-kelp/blob/main/src/oracles/ChainlinkPriceOracle.sol#L37-L39
The Chainlink oracle is used to get the token price from the price feed. But the method latestAnswer() has been deprecated as per Chainlink docs.
latestAnswer()
The method latestAnswer() has been deprecated by Chainlink. latestRoundData() should be used as per their documentation.
latestRoundData()
https://docs.chain.link/data-feeds/api-reference#latestanswer
Implement the AggregatorV3Interface and use latestRoundData() instead of deprecated latestAnswer()
Oracle
Closing this issue as the warden data are missing.
Lines of code
https://github.com/code-423n4/2023-11-kelp/blob/main/src/oracles/ChainlinkPriceOracle.sol#L37-L39
Vulnerability details
Summary
The Chainlink oracle is used to get the token price from the price feed. But the method
latestAnswer()
has been deprecated as per Chainlink docs.Vulnerability Details
The method
latestAnswer()
has been deprecated by Chainlink.latestRoundData()
should be used as per their documentation.https://docs.chain.link/data-feeds/api-reference#latestanswer
Recommendations
Implement the AggregatorV3Interface and use
latestRoundData()
instead of deprecatedlatestAnswer()
Assessed type
Oracle