Introduction
As part of our ongoing commitment to security, reliability, and best practices, Strike Finance has taken the initiative to update our price oracle implementation. This update is in response to Chainlink’s deprecation of the latestAnswer
function in their feed contracts. Following Chainlink’s strong recommendation, we will replace the deprecated function with the latestRoundData
function. This document outlines the proposal for this crucial update.
Background
The latestAnswer
function has been a staple in retrieving the latest price data from Chainlink oracles. However, with Chainlink’s latest recommendations and updates, it has been deprecated in favor of the latestRoundData
function. This newer function not only provides the latest price but also includes additional data like the update timestamp, ensuring more reliable and secure price feeds.
Objectives
- Enhance Security and Reliability: By updating to the
latestRoundData
function, we enhance the security and reliability of our oracle feeds, ensuring our protocols are less susceptible to stale or manipulated data. - Align with Best Practices: Following Chainlink’s recommendations ensures that Strike Finance stays aligned with industry best practices, maintaining our reputation as a secure and trustworthy platform.
- Improve Data Accuracy: The additional data provided by
latestRoundData
allows for better handling of edge cases and ensures the integrity of the price data used within our protocols.
Proposal Details
- Function Replacement: Replace all instances of
latestAnswer
withlatestRoundData
in our smart contracts that interact with Chainlink price feeds. - Data Handling Update: Modify our data handling logic to accommodate the additional data fields returned by
latestRoundData
, specifically focusing on the update timestamp to ensure data freshness. - Testing and Deployment: Conduct thorough testing in both testnet and mainnet environments to ensure that the updated implementation works as expected without any disruptions to our services.
Conclusion
Updating our price oracle implementation to use Chainlink’s latestRoundData
function is a necessary step to ensure the continued security, reliability, and accuracy of Strike Finance’s protocols. We invite our community to review this proposal and provide feedback, as we aim to implement these changes with minimal disruption and maximum transparency.