Integration Controllers

Control behaviour of an Oval deployment.

Controllers enable extension and customization of the Oval system. They govern:

  1. Who can update the Oval system (through canUnlock)

  2. Under what conditions the Oval system returns which price (through lockWindow)

  3. Other system settings, like maxTraversal , which governs how far to look back to search within the Chainlink contract when looking for historic prices.

Each of the function defined in the interface can be overridden by an integration if custom behavior is desired, such as connecting who can update the Oval system to some external permissioning system. This is the primary venue for customization of the Oval system.

The minimal interface for an integration controller looks as follows:

interface IntegrationControler {
    // Returns true if the caller is allowed to unlock the Oval.
    function canUnlock(address caller, uint256 _lastUnlockTime) view returns (bool);

    // Time window that bounds how long the permissioned actor has to call the
    // unlockLatestValue function after a new source update is posted. 
    // If the permissioned actor does not call unlockLatestValue within this 
    // window of a new source price, the latest value will be made available 
    // to everyone without going through an MEV-Share auction.
    function lockWindow() view returns (uint256);

    // Max number of historical source updates to traverse when looking for a
    // historic value. 
    function maxTraversal() view returns (uint256);

The source code can be found here.

The base implementation contains the following controllers:

  • ImmutableController. A controller that has no permissioning and no ownership. Designed for applications that want their Oval integration point to be as immutable, permissionless, and low-cost as possible.

  • BaseController. A minimum viable "custom" controller providing the simplest possible logic to control who can unlock and update the Oval system. Can be used as a starting point to develop more custom controllers on top of the Oval system.

For more information on how to customize this see Advanced Configurationthat talks about using BaseControllers in different ways.

Last updated