Steadefi

Steadefi
DeFiHardhatFoundryOracle
35,000 USDC
View results
Submission Details
Severity: low
Valid

A single point of failure in the oracle could potentially result in the protocol being unable to function properly

Summary

In the event that Chainlink experiences a failure or becomes a target of attack, and it's unable to provide price feeds, the protocol will be left without a reliable source of price data.

Vulnerability Details

As shown in the code below, the issue is that the protocol relies solely on a single source, Chainlink, for price information. In the event that Chainlink experiences a failure or becomes a target of attack, and it's unable to provide price feeds, the protocol will be left without a reliable source of price data. This can lead to a situation where the protocol cannot function as intended.

function convertToUsdValue(
GMXTypes.Store storage self,
address token,
uint256 amt
) public view returns (uint256) {
return amt * 10**(18 - IERC20Metadata(token).decimals())
* self.chainlinkOracle.consultIn18Decimals(token)
/ SAFE_MULTIPLIER;
}

To address this issue, it's advisable to incorporate a dual or multiple oracle approach. This involves using more than one oracle provider to fetch and validate price information. By cross-referencing price data from different sources, the protocol can enhance its reliability and resilience to potential failures or malicious attacks on a single oracle provider.

Impact

This can lead to a situation where the protocol cannot function as intended

Tools Used

Vscode

Recommendations

Implementing a dual oracle system can help ensure that the protocol continues to operate effectively even when one data source becomes unreliable.

Updates

Lead Judging Commences

hans Lead Judge almost 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

Chainlink oracle revert is not handled, need a backup oracle

Support

FAQs

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