Getting Started
Connect your existing protocol to Oval.
Oval works by placing a smart contract between the Chainlink and your protocol. See Contract Architecture for details. This acts like a "wrapper" over Chainlink and provides the logic needed to run OEV auctions on Chainlink updates, while maintaining compatibility with the original interface. This contract works by controlling precisely when the latest price from Chainlink is made available to the protocol, ensuring that the winner of the auction gets the first opportunity to use it (enabling Oracle related MEV extraction).
For support on launching your own Oval instance please reach out to us on Discord here in the #Oval channel. We'll guide you in custom configurations and in onboarding your Oval contract to use the the UMA permissioned unlocker (RPC).
The integration flow involves 2 steps:
Configure and deploy your instance of the Oval contract.
Update your contracts to insert Oval between your protocol and Chainlink price feeds.
This getting started guide aims to show how to deploy an Oval contract. For working examples that show how Oval works on a testnet see Flashbots Integration. For a mainnet fork example see Aave Integration. If you want to use Oval within your application we recommend first reaching out to us on Discord.
Deployment
The Oval contracts are designed to be composable and modular, enabling the deployer to customize them to their needs. We've created a minimal viable Oval configuration that is perfect for getting started. It's located in the Oval quickstart repo. This Oval contract uses Chainlink as source and destination and uses the Immutable controller to manage the Oval instance.
To deploy your own instance of this contract follow these steps:
0. Prerequisites:
This guide makes some assumptions:
Foundry is installed on your machine. If not, it can be found here.
You know what address you want to set as the permissioned actor that can initiate an auction. If this is a production mainnet deployment, reach out to the UMA team. You can contact us on discord.
You know the address of the Chainlink oracle you want to connect to. A full list of Chainlink oracles can be found here.
You have an RPC URL to connect to. If not, you can get one from Infura.
1. Clone the Quickstart repo and install dependencies
2. Configure the deployment options
Next, you need to configure the deployment options given your desired configuration. This is done through an environment file. There is a sample env within the repo that you can modify. To do this run:
Then open the .env
file with your favorite editor and change its contents accordingly. It should look something like this:
A note on the UNLOCKER
: This setting is the most complex within the config. This is the actor that can initiate the Oval auction (see here). If you are using the Oval Node then you will need to place a custom address that the UMA integration teams will give you in this field. Otherwise, this address should be something you can control and is used to initiate the auction within MEV-Share.
Note on RPC_MAINNET
RPC_MAINNET
if you want to deploy this within an Anvil fork then run:
And set the RPC_MAINNET value within the .env
file to http://127.0.0.1:8545
. Doing this will let you deploy your Oval instance to a local mainnet fork which can be useful for testing.
3. Deploy the ChainlinkOvalImmutable
Next, we can execute the deployment script to deploy your Oval contract. This can be run as follows:
This will output the deployment address of your Oval instance. You then need to configure your protocol to use this address in place of the associated Chainlink deployment.
Last updated