OracleUtils

Git Source

implements common utility methods for Fluid Oracles

State Variables

HUNDRED_PERCENT_DELTA_SCALER

The scaler for max delta point math (100%)

uint256 internal constant HUNDRED_PERCENT_DELTA_SCALER = 10_000;

RATE_OUTPUT_DECIMALS

output precision of rates

uint256 internal constant RATE_OUTPUT_DECIMALS = 27;

Functions

isRateOutsideDelta

checks if mainSourceRate_ is within a maxDeltaPercent_ of checkSourceRate_. Returns true if so.

function isRateOutsideDelta(uint256 mainSourceRate_, uint256 checkSourceRate_, uint256 maxDeltaPercent_)
    internal
    pure
    returns (bool);