🥚
Oval
  • Oval Overview
    • Problem
    • System Overview
  • Integration
    • Quickstart Deployment
    • Morpho Deployment
    • Advanced Deployment
  • Mechanism Details
    • Integration with MEV-Share
    • Mechanism Description
    • Trust Assumptions
    • Oval Update Lifecycle
    • Inclusion Rates
    • Revenue Sharing
  • Contract Architecture
    • Source Adapters
    • Destination Adapters
    • Integration Controllers
    • Oval
    • Gas Profiling
  • Technical Examples
    • Aave Integration
    • Flashbots Integration
  • For Searchers
    • Getting Started
    • Header Specifications
    • Oval Node
  • OEV Data
  • Oval Demo
  • Audit and Bug Bounty
  • Oval Deployments
Powered by GitBook
On this page
  • Customizing the Integration controller
  • Deploying Oval with BaseController
  • 0. Prerequisites:
  • 1. Clone the Quickstart repo and install dependencies
  • 2. Configure the deployment options
  • 3. Deploy the ChainlinkOvalBase contract
  • Extending Integration Controllers

Was this helpful?

Edit on GitHub
  1. Integration

Advanced Deployment

Customize your Oval deployment.

PreviousMorpho DeploymentNextMechanism Details

Last updated 10 months ago

Was this helpful?

The Quickstart Deployment guide shows you how to use the simplest possible Oval deployment with a source adapter, a destination adapter and an immutable controller. Deployments can be extended by using custom components within the Oval setup.

Customizing the

Integration controllers control how an Oval instance is updated. They influence the behaviour of Oval in exactly 3 ways:

  1. Who can initiate an OEV auction, (as discussed ), known as unlockers

  2. How long the permissioned actor(s) have to initiate an auction from an update, known as lockWindow. This also governs the maximum delay a source update is blocked before being released to a downstream protocol in the event of the permissioned actor(s) going offline or MEV-Share breaking (see )

  3. How many max iterations to traverse when looking for historic values, called maxTraversal. This value is less important to control and exists to accommodate long lockWindows coupled with high speed updates on source oracles. It is safe to leave it at a value of 4.

The simplest way to customize these settings is to use the within your Oval deployment which gives you control over all 3 configurations listed above. This controller has an Owner which has exclusive permissions to modify these settings. An example usage of this controller could be to set the BaseController to be owned by your DAO or multisig, thereby giving you control over these settings within the Oval deployment.

Deploying Oval with BaseController

This example will guide you in deploying and customizing the contract, a version of Oval that uses the BaseController. The deployment flow here is very similar to that of the Quickstart Deployment tutorial except we can now configure the unlockers, lockWindow, and maxTraversal after deployment.

0. Prerequisites:

This getting started makes some assumptions:

  1. Foundry is installed on your machine. If not, it can be found .

  2. You have a wallet and the associated private key for the network you want to deploy on. If deploying on Goerli, you can fund your wallet or or .

  3. You are using Chainlink and know the address of the source Chainlink oracle you want to connect to. A full list of Chainlink oracles can be found .

  4. You have an RPC URL to connect to. If not, you can get one from .

1. Clone the Quickstart repo and install dependencies

git clone https://github.com/UMAprotocol/oval-quickstart.git
cd oval-quickstart
forge install

2. Configure the deployment options

Next, we need to define some envs to setup the deployment environment. In particular we need a private key and an RPC URL:

cp example.env .env

Then open .env file with your favorite editor and change its contents accordingly. For this advanced configuration we only need a PRIVATE_KEY and RPC_MAINNET

PRIVATE_KEY=0xPUT_YOUR_PRIVATE_KEY_HERE # This account will do the deployment
RPC_MAINNET=PUT_YOUR_RPC_URL_HERE # Your network or fork RPC Url.

3. Deploy the ChainlinkOvalBase contract

source .env # Load the variables in the .env file

forge create src/ChainlinkOvalBase.sol:ChainlinkOvalBase \ 
--private-key $PRIVATE_KEY --rpc-url $RPC_MAINNET 
--constructor-args 0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419 8

Once this deployment is done, you can call functions on your Oval contract to customize the deployment:

  1. Lastly, given that ChainlinkOvalBase inherits from OpenZepplin Ownable, you can call transferOwnership once the configuration is done to transfer the ownership to your DAO/multisig or other address.

Extending Integration Controllers

The Oval contract architecture has been designed such that custom controllers are possible, as long as they conform to the interface defined within the Integration Controllers specification. For example you might want to have a set of addresses that can disable your Oval contract, making it act as a passthrough by setting lockWindow=0. Or you may want to have a different set of addresses to manage the unlockers list. Reach out to us on Discord if you'd like support in creating custom controllers.

Next, we can directly deploy the ChainlinkOvalBase.sol contract and leave the configuration until the next step. To deploy the contract, run the forge create command. The example below deploys an Oval contract that wraps the oracle. Be sure to set the number of decimals (8 in the example below) corresponding to the decimals() value from the Chainlink oracle.

to add a new unlocker to the unlockers set (actors who can unlock prices). To add an unlocker, set the second argument to true. To remove an unlocker, set the second argument to false.

to change the lockWindow (how long a price will be locked before being automatically unlocked). This effectively controls the auction period.

to change the maximum traversals a historic lookback can loop through.

Chainlink ETH/USD
setUnlocker
setLockWindow
setMaxTraversal
Integration controller
here
BaseController
ChainlinkOvalBase
here
here
here
here
here
Infura
Controlling when to release what price