Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Bauchibred - Undesired behaviour of chainlink feeds when sequencer is down #78

Closed
sherlock-admin opened this issue Apr 30, 2023 · 0 comments
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A valid Medium severity issue Reward A payout will be made for this issue

Comments

@sherlock-admin
Copy link
Contributor

sherlock-admin commented Apr 30, 2023

Bauchibred

medium

Undesired behaviour of chainlink feeds when sequencer is down

Summary

No check to see if sequencer is down in Chainlink feeds

Vulnerability Detail

It is recommended to follow the code example of Chainlink:

See this, but this is not being followed and as such the answer data returned in latestRoundData(), representing sequencer could be any of the following:

// Answer == 0: Sequencer is up
// Answer == 1: Sequencer is down

Impact

Chainlink feeds lack check for when seqquencer is down

Code Snippet

https://github.com/sherlock-audit/2023-04-blueberry/blob/96eb1829571dc46e1a387985bd56989702c5e1dc/blueberry-core/contracts/oracle/ChainlinkAdapterOracle.sol#L77-L97

Tool used

Manual Review

Recommendation

Introduce a method to check if the sequencer is down in the protocol this could be done by implementing a boolean check as simple as the bbelow:

 bool isSequencerUp = answer == 0;
        if (!isSequencerUp) {
            revert SequencerDown();
        }

Duplicate of #142

@github-actions github-actions bot closed this as completed May 3, 2023
@github-actions github-actions bot added Medium A valid Medium severity issue Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label labels May 3, 2023
@sherlock-admin sherlock-admin added the Reward A payout will be made for this issue label May 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A valid Medium severity issue Reward A payout will be made for this issue
Projects
None yet
Development

No branches or pull requests

1 participant