https://github.com/Cyfrin/2024-07-zaros/blob/main/src/external/chainlink/ChainlinkUtil.sol#L26
A vulnerability has been identified in the ChainlinkUtil.sol
contract where reliance on a single Chainlink oracle can lead to service disruptions or inaccurate data feeds. Implementing a redundant oracle with a fallback mechanism can mitigate the risk of single-point failure and ensure continuity of service.
The ChainlinkUtil.sol
contract currently relies on a single Chainlink oracle for fetching critical data. This dependency poses a risk of service interruption or inaccurate data retrieval if the primary oracle becomes unavailable, unresponsive, or provides erroneous data. Introducing a fallback mechanism with a secondary oracle can enhance the robustness and reliability of the data feed.
Reliance on a single Chainlink oracle exposes the system to potential data feed interruptions or inaccuracies, leading to incorrect price feeds and potentially flawed decision-making processes. This vulnerability can affect the accuracy of financial calculations and disrupt service operations.
Consider the following scenario:
There exists a low liquidity market which the Chainlink oracle is pointing at.
This low liquidity market is subject to a flash loan attack, unbeknownst to Zaros.
Zaros users interact with this low liquidity market in its time of vulnerability, losing precious funds.
As there is no other oracle checking for inconsistencies in the data, these users will become victim to the flash loan attack.
Manual Review
Implement Redundant Oracle: Add a secondary oracle in the ChainlinkUtil.sol
contract constructor to ensure redundancy.
Fallback Mechanism: Modify the getPrice()
function to include a fallback mechanism that retrieves data from the secondary oracle if the primary oracle fails.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.