Bald Honeysuckle Urchin
High
In OracleRelay::currentValue
in line 19, price is retrieved from a chainlink priceFeed using the deprecated latestAnswer
. According to Chainlink’s documentation, the latestAnswer
function is no longer recommended for use.
Ref-Chainlink Data Feeds API Reference
The latestAnswer
function from Chainlink’s AggregatorInterface
is deprecated and should not be used in modern implementations.
The latestAnswer
function may become unreliable or non-functional if it is removed or no longer supported in future Chainlink updates. Contracts depending on this function could fail to retrieve accurate prices, leading to incorrect behavior such as processing stale data, which could result in user fund losses.
Replace latestAnswer
with the latestRoundData
function available in the AggregatorV2V3Interface
. This function provides the latest price along with additional metadata such as round ID, timestamp, and other relevant details.
Ensure proper error handling for the additional data returned by latestRoundData
, such as checking for valid timestamps to account for scenarios like L2 sequencer downtime or feed delays.