Skip to content

Latest commit

 

History

History
76 lines (51 loc) · 3.77 KB

README.md

File metadata and controls

76 lines (51 loc) · 3.77 KB

slinky

Project Status: Active – The project has reached a stable, usable state and is being actively developed. GoDoc Go Report Card Version License: Apache-2.0 Lines Of Code

A general purpose price oracle leveraging ABCI++.

Install

$ go install github.com/skip-mev/slinky

Overview

The slinky repository is composed of the following core packages:

  • abci - This package contains the vote extension, proposal, and preblock handlers that are used to broadcast oracle data to the network and to store it in the blockchain.
  • oracle - This package contains the main oracle that aggregates external data sources before broadcasting it to the network. You can reference the provider documentation here to get a high level overview of how the oracle works.
  • providers - This package contains a collection of web socket and API based data providers that are used by the oracle to collect external data.
  • x/oracle - This package contains a Cosmos SDK module that allows you to store oracle data on a blockchain.
  • x/alerts - This package contains a Cosmos SDK module that allows network participants to create alerts when oracle data that is in violation of some condition is broadcast to the network and stored on the blockchain.
  • x/sla - This package contains a Cosmos SDK module that allows you to create service level agreements (SLAs) that can be used to incentivize network participants to consistently, reliably provide data with high uptime.

Usage

To run the oracle, run the following command:

$ make run-oracle-server

To check the current aggregated prices, open a new terminal and run the following command:

$ make run-oracle-client

To see all network metrics, open a new terminal and run the following command and then navigate to http://localhost:9090:

$ make run-prom-client

To add a new provider, update the local config in config/local/generate_toml.go and then run the following command:

$ make update-local-config

To run a local blockchain, first start the oracle server and then run the following command (in a separate window):

$ make build-and-start-app

Metrics

Oracle Service Metrics

  • metrics relevant to the oracle service's health + operation are here
  • metrics relevant to the operation / health of the oracle's providers are here

Oracle Application / Network Metrics

  • metrics relevant to the network's (that is running the instance slinky) performance are here

Future Work

The oracle side car is a combination of the oracle and provider packages. This is being moved to a separate repository.