Oracle
Overview
This guide is only for validator nodes
The Slinky Oracle consists of two main elements:
An on-chain component that retrieves price data from the sidecar with each block, forwards these prices to the blockchain through vote extensions, and compiles prices from all validators involved.
A sidecar process dedicated to polling price information from various providers and delivering this data to the on-chain component.
For additional information on the oracle, refer to the Slinky repository at https://github.com/skip-mev/slinky/.
Pre-compiled binaries will be made available in the future. Currently, users are advised to compile the necessary software from the source code.
Tutorial
Step 1: Clone the Repository
Clone the slinky repository.
Step 2: Running The Sidecar
Config Setup
To operate the oracle sidecar, it is essential to have valid configuration files for both the oracle component and the market component. The oracle executable recognizes flags that specify each configuration file. Below are recommended default settings suitable for the existing Initia Devnet environment.
Oracle Component
The oracle component determines how often to poll price providers, multi-plexing behavior of websockets, and more. This has been tested by Skip and is safe to use. The recommended oracle component can be found in config/core/oracle.json
within the Slinky repo.
Market Component
The market component determines what markets the side-car should be fetching prices for. The desired markets will be stored on-chain and pulled by the sidecar. To properly configure the sidecar, you must point the sidecar to the GRPC port on a node (typically port 9090
). This can be done by adding the --market-map-endpoint
flag when starting the sidecar or modifying the oracle.json
component as shown below.
Starting The Sidecar
Initiating the oracle sidecar process is accomplished by executing the binary.
The GRPC server operates with the default settings of 0.0.0.0:8080
, and if activated, the Prometheus metrics endpoint uses 0.0.0.0:8002
as its default host and port.
Step 3: Validating Prices
Upon launching the oracle, you should observe successful price retrieval from the provider sources. Additionally, you have the option to execute the test client script available in the Slinky repository by using the command make run-oracle-client
.
Step 4: Enable Oracle Vote Extension
In order to utilize the Slinky oracle data in the Initia node, the Oracle setting should be enabled in the config/app.toml
file.
Last updated