Deploying an oracle
Last updated
Last updated
In order to deploy an oracle first select the chain and the correct option in the main menu as well as the market you want to create the oracle for:
To deploy a chainlink adapter, choose chainlink v2, in our example we will be deploying an oracle for WETH/USDC using 1 base feed (ETH/USD) and 1 quote feed (USDC/USD). Note that custom ERC4626 vaults can be added on both end.
The oracle wil check for any existing deployment with these parameters and will return the oracle address (deploys it if needed)
To deploy a Dia instance, find the oracle and keys needed. Keys are limited in size for efficiency. If more storage is needed, please reach out. Select Dia, the pool and keys. ERC4626 vaults can also be added on both ends.
Before selecting a key at the contract level, I'd recommend testing the key first to check its correctness. you will then have to infer the number of decimals used for pricing. Here the price was 1951 USD os we can assume 8 decimals for pricing.
Now let's say we need to combine different oracles together. It is possible as well. Above we deployed an oracle for WETH/USDC, and another one for superOETHb/WETH. We can combine them in order to create a single oracle: