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
PriceOracleSentinel disables Borrowing and Liquidations because it believes the L2 sequencer has failed the Chainlink health check. The lastUpdateTimestamp is updated roughly every 24 hours by Chainlink even if the answer is unchanged, this causes borrowing and liquidations to be disabled for an hour roughly once per day even though the sequencer is healthy. I believe the startedAt timestamp would reflect the timestamp of a new round (when the status has changed).
Existing code:
/**
* @notice Checks the sequencer oracle is healthy: is up and grace period passed.
* @return True if the SequencerOracle is up and the grace period passed, false otherwise
*/
function _isUpAndGracePeriodPassed() internal view returns (bool) {
(, int256 answer, , uint256 lastUpdateTimestamp, ) = _sequencerOracle.latestRoundData();
return answer == 0 && block.timestamp - lastUpdateTimestamp > _gracePeriod;
}
Proposed fix:
/**
* @notice Checks the sequencer oracle is healthy: is up and grace period passed.
* @return True if the SequencerOracle is up and the grace period passed, false otherwise
*/
function _isUpAndGracePeriodPassed() internal view returns (bool) {
(, int256 answer, uint256 startedAt, , ) = _sequencerOracle.latestRoundData();
return answer == 0 && block.timestamp - startedAt > _gracePeriod;
}
PriceOracleSentinel disables Borrowing and Liquidations because it believes the L2 sequencer has failed the Chainlink health check. The
lastUpdateTimestamp
is updated roughly every 24 hours by Chainlink even if the answer is unchanged, this causes borrowing and liquidations to be disabled for an hour roughly once per day even though the sequencer is healthy. I believe thestartedAt
timestamp would reflect the timestamp of a new round (when the status has changed).Existing code:
Proposed fix:
Chainlink docs sample code: https://docs.chain.link/data-feeds/l2-sequencer-feeds#example-code
The text was updated successfully, but these errors were encountered: