SIP-357: Chainlink Node With Staleness Check

Author
StatusDraft
TypeGovernance
NetworkOptimism
ImplementorTBD
ReleaseTBD
Created2023-09-29

Simple Summary

This sip proposes to incorporate a staleness check on the chainlink node used for SNX staking in the V3 system.

Abstract

The chainlink node would have a staleness check based on the heartbeat of the respective network. The configuration on optimism would be 2,400 seconds.

Staleness is measured by fetching the timestamp of the latest chainlink price push and comparing it to the timestamp of the current block. If the difference exceeds the configured maximum staleness parameter, the oracle would revert when called, otherwise it would return the oracle price and timestamp.

Motivation

Currently the configured chainlink node does not incorporate any staleness check. However, it is considered best practice that prices are checked for staleness before being consumed (e.g. staking, unstaking and liquidation). Hence, in case the oracle is stale, all activity that touches the oracle would revert.

Copyright and related rights waived via CC0.