This repository has been archived by the owner on Nov 12, 2023. It is now read-only.
Avci - getAssetPrice() missed to check If Arbitrum sequencer is down #481
Labels
Non-Reward
This issue will not receive a payout
Avci
medium
getAssetPrice() missed to check If Arbitrum sequencer is down
Summary
The function getAssetPrice() in the chainlinkAdaptor.sol does not have a check for the status of the Arbitrum L2 sequencer in the Chainlink price feeds. This vulnerability could potentially be exploited by malicious actors to gain an unfair advantage.
Vulnerability Detail
Impact
If the sequencer is down, the prices provided by the Chainlink feeds may not be fresh, which can lead to incorrect pricing of the assets.
When the Sequencer is down, all L2 transactions sent from the L1 network wait in the pending queue.
Code Snippet
https://github.com/sherlock-audit/2023-04-jojo-0xdanial/blob/27cc159e9d66b7cd0e5556a7e2e154d957a82676/JUSDV1/src/oracle/JOJOOracleAdaptor.sol#L26-L35
https://github.com/sherlock-audit/2023-04-jojo-0xdanial/blob/27cc159e9d66b7cd0e5556a7e2e154d957a82676/smart-contract-EVM/contracts/adaptor/chainlinkAdaptor.sol#L43-L55
Tool used
Manual Review
Recommendation
chainlink provided useful documents about the safe usage of l2-sequencer-feeds
https://docs.chain.link/data-feeds/l2-sequencer-feeds#example-code
Duplicate of #101
The text was updated successfully, but these errors were encountered: