-
Notifications
You must be signed in to change notification settings - Fork 4
Unhandled chainlink revert can lock price oracle access #15
Copy link
Copy link
Open
Labels
1st place🤖_primaryAI based primary recommendationAI based primary recommendationQ-03QA (Quality Assurance)Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntaxAssets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntaxbugSomething isn't workingSomething isn't workingdowngraded by judgeJudge downgraded the risk level of this issueJudge downgraded the risk level of this issuegrade-aprimary issueHighest quality submission among a set of duplicatesHighest quality submission among a set of duplicatesselected for reportThis submission will be included/highlighted in the audit reportThis submission will be included/highlighted in the audit reportsponsor acknowledgedTechnically the issue is correct, but we're not going to resolve it for XYZ reasonsTechnically the issue is correct, but we're not going to resolve it for XYZ reasons
Description
Metadata
Metadata
Assignees
Labels
1st place🤖_primaryAI based primary recommendationAI based primary recommendationQ-03QA (Quality Assurance)Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntaxAssets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntaxbugSomething isn't workingSomething isn't workingdowngraded by judgeJudge downgraded the risk level of this issueJudge downgraded the risk level of this issuegrade-aprimary issueHighest quality submission among a set of duplicatesHighest quality submission among a set of duplicatesselected for reportThis submission will be included/highlighted in the audit reportThis submission will be included/highlighted in the audit reportsponsor acknowledgedTechnically the issue is correct, but we're not going to resolve it for XYZ reasonsTechnically the issue is correct, but we're not going to resolve it for XYZ reasons
Lines of code
https://github.com/code-423n4/2024-05-bakerfi/blob/main/contracts/oracles/EthOracle.sol#L31
Vulnerability details
Description
Chainlink's multisigs can immediately block access to price feeds at will. Therefore, to prevent denial of service scenarios, it is recommended to query Chainlink price feeds using a defensive approach with Solidity’s try/catch structure. In this way, if the call to the price feed fails, the caller contract is still in control and can handle any errors safely and explicitly.
Refer to https://blog.openzeppelin.com/secure-smart-contract-guidelines-the-dangers-of-price-oracles/ for more information regarding potential risks to account for when relying on external price feed providers.
Link to code:
Similar past issues
Tools Used
Manual review
Recommended Mitigation Steps
Surround the call to latestRoundData() with try/catch instead of calling it directly and provide a graceful alternative/exit.
Assessed type
Other