Chainlink oracle uses deprecated function #822
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-34
insufficient quality report
This report is not of sufficient quality
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2023-11-kelp/blob/f751d7594051c0766c7ecd1e68daeb0661e43ee3/src/oracles/ChainlinkPriceOracle.sol#L38
Vulnerability details
Summary
Prices from Chainlink are fetched using a deprecated function.
Impact
The ChainlinkPriceOracle contract is used to interface with Chainlink price feeds to obtain the prices for the different LST assets used in the protocol.
The implementation is using the function
latestAnswer()
which is deprecated and should not be used anymore.Proof of Concept
The implementation of
getAssetPrice()
is using the deprecated function:https://github.com/code-423n4/2023-11-kelp/blob/f751d7594051c0766c7ecd1e68daeb0661e43ee3/src/oracles/ChainlinkPriceOracle.sol#L37-L39
Recommendation
Switch to
latestRoundData()
.Assessed type
Oracle
The text was updated successfully, but these errors were encountered: