DeFiFoundry
60,000 USDC
View results
Submission Details
Severity: medium
Invalid

Single oracle dependency leads to single point of failure

https://github.com/Cyfrin/2024-07-zaros/blob/main/src/external/chainlink/ChainlinkUtil.sol#L26

Summary

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.

Description

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.

Impact

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.

Proof of Concept

Consider the following scenario:

  1. There exists a low liquidity market which the Chainlink oracle is pointing at.

  2. This low liquidity market is subject to a flash loan attack, unbeknownst to Zaros.

  3. Zaros users interact with this low liquidity market in its time of vulnerability, losing precious funds.

  4. As there is no other oracle checking for inconsistencies in the data, these users will become victim to the flash loan attack.

Tools Used

Manual Review

Recommended Mitigation Steps

  1. Implement Redundant Oracle: Add a secondary oracle in the ChainlinkUtil.sol contract constructor to ensure redundancy.

  2. Fallback Mechanism: Modify the getPrice() function to include a fallback mechanism that retrieves data from the secondary oracle if the primary oracle fails.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.