Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

OracleFreshnessPolicyLib

Git Source

Functions

getPolicy

function getPolicy(
    Mode mode,
    bool oracleFrozen,
    bool isFad,
    uint256 engineMarkStalenessLimit,
    uint256 poolMarkStalenessLimit,
    uint256 routerOrderExecutionStalenessLimit,
    uint256 routerLiquidationStalenessLimit,
    uint256 fadMaxStaleness
) internal pure returns (Policy memory policy);

isStale

function isStale(
    uint256 oraclePublishTime,
    uint256 maxStaleness,
    uint256 currentTimestamp
) internal pure returns (bool);

_effectiveLiveMarkLimit

function _effectiveLiveMarkLimit(
    uint256 engineMarkStalenessLimit,
    uint256 poolMarkStalenessLimit
) private pure returns (uint256);

Structs

Policy

struct Policy {
    bool closeOnly;
    bool requireStoredMark;
    bool allowAnyStoredMark;
    uint256 maxStaleness;
}

Enums

Mode

enum Mode {
    OpenExecution,
    CloseExecution,
    Liquidation,
    PoolReconcile,
    CloseCommitFallback,
    MarkRefresh
}