This repository has been archived by the owner on Nov 12, 2023. It is now read-only.
Saeedalipoor01988 - No check if Arbitrum L2 sequencer is down in Chainlink feeds at smart-contract-EVM/contracts/adaptor/chainlinkAdaptor.sol #12
Labels
Non-Reward
This issue will not receive a payout
Saeedalipoor01988
medium
No check if Arbitrum L2 sequencer is down in Chainlink feeds at smart-contract-EVM/contracts/adaptor/chainlinkAdaptor.sol
Summary
Chainlink recommends that users using price oracles, check whether the Arbitrum Sequencer is
active.
Using Chainlink in L2 chains such as Arbitrum requires to check if the sequencer is down to avoid prices from looking like they are fresh although they are not.
This is duty of project to check that Arbitrum L2 sequencer is down or up ! this is not duty of external project to tell your project i am online or offline :)
Vulnerability Detail
The ChainlinkExpandAdaptor.getMarkPrice() function is using IChainlink(chainlink) to get the price of asset. There is no check that the sequencer is down:
If the sequencer goes down, the index oracles may have stale prices, since L2-submitted transactions (i.e. by the aggregating oracles) will not be processed.
Impact
please check Vulnerability Detail.
Code Snippet
https://github.com/sherlock-audit/2023-04-jojo/blob/main/smart-contract-EVM/contracts/adaptor/chainlinkAdaptor.sol#L43
Tool used
Manual Review
Recommendation
It is recommended to follow the code example of Chainlink:
https://docs.chain.link/data-feeds/l2-sequencer-feeds#example-code
Use a chainlink oracle to determine whether the sequencer is offline or not, and don't allow orders to be executed while the sequencer is offline.
Duplicate of #101
The text was updated successfully, but these errors were encountered: