Skip to main content

IOracleWithValidation

Git Source - Generated with forge doc

Inherits: IOracle

Title: IOracleWithValidation

Interface of the oracle that checks the deviation between a primary and a validation oracle.

Functions

PRIMARY_ORACLE

The primary oracle whose price is always returned.

function PRIMARY_ORACLE() external view returns (IOracle);

VALIDATION_ORACLE

The validation oracle used to bound-check the primary's price.

function VALIDATION_ORACLE() external view returns (IOracle);

MAX_ORACLE_DEVIATION

The maximum allowed |primary - validation| / primary deviation, in WAD (e.g. 5e16 = 5%).

function MAX_ORACLE_DEVIATION() external view returns (uint256);

validationCheckPaused

Whether the deviation check against the validation oracle is paused.

When true, price() returns the primary price without validation.

function validationCheckPaused() external view returns (bool);

pauseValidationCheck

Pauses validation: price() returns the primary price unchecked until unpauseValidationCheck is called.

Only callable by the owner. Reverts if already paused.

function pauseValidationCheck() external;

unpauseValidationCheck

Unpauses the validation check.

Only callable by the owner. Reverts if not paused.

function unpauseValidationCheck() external;

Events

ValidationCheckPaused

event ValidationCheckPaused();

ValidationCheckUnpaused

event ValidationCheckUnpaused();

Errors

ExcessiveOracleDeviation

error ExcessiveOracleDeviation();

ValidationOracleFailure

error ValidationOracleFailure();

NotAllowed

error NotAllowed();