You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 17, 2023. It is now read-only.
sherlock-admin opened this issue
Jun 11, 2023
· 0 comments
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
When utilizing Chainlink in L2 chains like Arbitrum or Optimism, it's important
to ensure that the prices provided are not falsely perceived as fresh, even
when the sequencer is down (source).
Vulnerability Detail
If the sequencer goes down, the oracle may return stale prices since L2-submitted transactions will not be processed.
Impact
If the price oracle retrieves an incorrect price, this could lead to unexpected behaviour throughout the protocol, such as undercollateralized loans or unfair liquidations, causing loss of funds.
Code Snippet
function getPriceFromChainlink(addressbase, addressquote) internalviewreturns (uint256) {
(, int256price,,,) = registry.latestRoundData(base, quote); // @audit missing check on timestamprequire(price >0, "invalid price");
// Extend the decimals to 1e18.returnuint256(price) *10** (18-uint256(registry.decimals(base, quote)));
}
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
Madalad
medium
Missing check if Chainlink sequencer is down
Summary
When utilizing Chainlink in L2 chains like Arbitrum or Optimism, it's important
to ensure that the prices provided are not falsely perceived as fresh, even
when the sequencer is down (source).
Vulnerability Detail
If the sequencer goes down, the oracle may return stale prices since L2-submitted transactions will not be processed.
Impact
If the price oracle retrieves an incorrect price, this could lead to unexpected behaviour throughout the protocol, such as undercollateralized loans or unfair liquidations, causing loss of funds.
Code Snippet
https://github.com/sherlock-audit/2023-05-ironbank/blob/main/ib-v2/src/protocol/oracle/PriceOracle.sol#L67
Tool used
Manual Review
Recommendation
Determine whether the sequencer is offline or not when attempting to retrieve a price from a Chainlink data feed.
Duplicate of #440
The text was updated successfully, but these errors were encountered: