Oracle
Details on installing and running the oracle sidecar process.

Overview
The Slinky oracle was developed by Skip and is integrated directly into the Initia layer 1. It has two components:
An on-chain integration which fetches prices from the sidecar each block, submits them to the chain via vote extensions, and aggregates prices across all participating validators.
A sidecar process which is responsible for querying price providers and supplying prices to the on-chain module.
To learn more about the oracle, visit the Slinky repository at https://github.com/skip-mev/slinky/.
Binaries
We will provide pre-compiled binaries in the future. Please build from source for now.
Building From Source
Clone the slinky repository.
The output binary will be located in the build directory, ./build/oracle.
Running The Sidecar
Config Setup
To run the oracle sidecar you need valid configuration files for both the oracle and the metrics components. The oracle binary accepts flags for each configuration file. The following are sane defaults for the current Initia Devnet.
The path component of a provider needs to provide the mapping between the canonical base and quote names and their equivalent in the given provider API. The proper mapping files are all located in Slinky's provider directory https://github.com/skip-mev/slinky/tree/main/config/local/providers. If you execute the binary at the root of the Slinky directory, the above config is valid. Otherwise you will need to provide the proper path to the JSON mapping files.
Starting The Sidecar
Starting the oracle side car is done through the binary.
The default host and port are localhost:8080 for the GRPC server and localhost:8000 for the prometheus metrics endpoint, if enabled.
Validating Prices
After starting the oracle you should see prices being requested successfully from the provider sources. You can also optionally run the test client script in the slinky repository via make run-oracle-client.
Last updated