GithubHelp home page GithubHelp logo

isabella232 / oracle-feeder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from smartcontractkit/oracle-feeder

0.0 0.0 0.0 1.21 MB

Oracle Feeder Daemon

License: Apache License 2.0

JavaScript 5.76% TypeScript 94.09% Dockerfile 0.15%

oracle-feeder's Introduction

Terra Oracle Feeder

This contains the Oracle feeder software that is used internally by Terraform Labs' validator nodes for periodically submitting oracle votes for the exchange rate of LUNA. This implementation can be used as-is, but also can serve as a reference for creating your own custom oracle feeder. For more information regarding the oracle process, please refer to the oracle module specs.

Overview

This solution has 2 components:

  1. price-server

    • Obtain information from various data sources (exchanges, forex data, etc)
    • Use data to compute the exchange rates of LUNA for a given set of fiat denominations
    • Most recent LUNA exchange rates are available through HTTP endpoint
  2. feeder

    • Reads LUNA exchange rates from a data source (price-server)
    • Periodically submits vote and prevote messages following the oracle voting procedure

You can easily modify the logic for how LUNA exchange rates are computed by either directly modifying price-server or replacing the input stream for feeder.

Prerequisites

Instructions

  1. Clone this repository
git clone https://github.com/terra-money/oracle-feeder
cd oracle-feeder
  1. Configure and launch price-server, following instructions here.
cd price-server
npm install

# Copy sample config file
cp ./config/default-sample.js ./config/default.js
# make edits
vim ./config/default.js

# price is available at `http://127.0.0.1:8532/latest`
npm run start
  1. Configure and launch feeder, following instructions here.
cd feeder
npm install

# configure to use feeder account
npm start update-key

# start voting
npm start vote -- \
   --source http://localhost:8532/latest \
   --lcd https://lcd.terra.dev \
   --chain-id columbus-4 \
   --validator terravaloper1xx \
   --validator terravaloper1yy \
   --password "<password>"

oracle-feeder's People

Contributors

bluedisk avatar davidkohcw avatar dee-effes avatar dependabot[bot] avatar etienne-napoleone avatar followmedown avatar freshfab avatar hanjukim avatar jacksteroo avatar jonaspf avatar justinkaseman avatar letspesl avatar ljk662 avatar marcelmws avatar mesyakim avatar migueldingli1997 avatar ouiliame avatar p-rial avatar riptl avatar s111s avatar terraindia avatar tomas-eminger avatar tvl83 avatar unl1k3ly avatar yun-yeo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.