Closed sherlock-admin2 closed 1 year ago
2 comment(s) were left on this issue during the judging contest.
0xyPhilic commented:
invalid because the chances of this occuring are very small and issue can be considered informational
darkart commented:
Invalid
Oxhunter526
medium
ChainlinkAdapterOracleL2
Susceptible to DoS Due to Lack of Error HandlingSummary
The
ChainlinkAdapterOracleL2
contract, designed to fetch price data from Chainlink's data feeds on Layer 2 networks, lacks adequate error handling and fallback logic. Specifically, the contract heavily relies on Chainlink'slatestRoundData()
function to retrieve the latest price data. However, without proper error handling, this reliance poses a risk of potential denial of service (DoS) attacks. If the contract's access to the Chainlink data feed is denied or encounters an error, the contract will revert, leading to a potential permanent disruption in querying prices.Vulnerability Detail
The vulnerability stems from the
getPrice
function within theChainlinkAdapterOracleL2
contract. This function employs the ChainlinklatestRoundData()
function to fetch price information. However, it does not implement any fallback mechanism to handle situations where access to the Chainlink data feed is denied. Consequently, if the Chainlink multisigs decide to block the contract's access to the data feed, the contract will permanently fail to query prices, rendering it unable to provide accurate price information.\Impact
Price data unavailability hampers value assessments and triggers operational instability, causing economic disruptions.
Code Snippet
Link
Tool used
Manual Review
Recommendation
The contract should implement proper error handling and fallback logic within the
getPrice
function.