diff --git a/src/JBChainlinkV3SequencerPriceFeed.sol b/src/JBChainlinkV3SequencerPriceFeed.sol index fd95ef0f..fcb781ab 100644 --- a/src/JBChainlinkV3SequencerPriceFeed.sol +++ b/src/JBChainlinkV3SequencerPriceFeed.sol @@ -16,6 +16,7 @@ contract JBChainlinkV3SequencerPriceFeed is JBChainlinkV3PriceFeed { error JBChainlinkV3SequencerPriceFeed_SequencerDownOrRestarting( uint256 timestamp, uint256 gradePeriodTime, uint256 startedAt ); + error JBChainlinkV3SequencerPriceFeed_InvalidRound(); //*********************************************************************// // ---------------- public stored immutable properties --------------- // @@ -59,6 +60,9 @@ contract JBChainlinkV3SequencerPriceFeed is JBChainlinkV3PriceFeed { // slither-disable-next-line unused-return (, int256 answer, uint256 startedAt,,) = SEQUENCER_FEED.latestRoundData(); + // Check if round is valid to prevent an edge-case where Arbitrum uptime contract is not init. + if (startedAt == 0) revert JBChainlinkV3SequencerPriceFeed_InvalidRound(); + // Revert if sequencer has too recently restarted or is currently down. if (block.timestamp <= GRACE_PERIOD_TIME + startedAt || answer == 1) { revert JBChainlinkV3SequencerPriceFeed_SequencerDownOrRestarting(