Skip to content

shortthefomo/XRP-Oracles-depricated

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XRP-Oracles

Price Oracle pushing service

Persists the data fetched with XRP-Price-Aggregator on the XRP Ledger.

This project takes from XRPL-Persist-Price-Oracle and extends it to allow price data of anything with a feed to be pushed.

Most of the configuration of the oracle is defined in the sources.json.

{
  "basic" : {
    "config": {
      "type": "currency",
      "symbol": "USD",
      "call": 2,
      "delay": 1
    },
    "data": [
      {
        "name": "bitstamp",
        "url": "https://www.bitstamp.net/api/v2/ticker/xrpusd/",
        "selector": "data.last"
      },
      {
        "name": "binance",
        "url": "https://api.binance.com/api/v3/ticker/price?symbol=XRPUSDT",
        "selector": "data.price"
      },
      {
        "name": "bybit",
        "url": "https://api.bybit.com/spot/quote/v1/ticker/price?symbol=XRPUSDT",
        "selector": "data.result.price"
      },
      {
        "name": "kraken",
        "url": "https://api.kraken.com/0/public/Ticker?pair=XRPUSD",
        "selector": "data.result.XXRPZUSD.c[0]"
      } 
    ]
  }
}

Logging

Run with DEBUG=oracle* (prefixed) to read debug output. This is automatically prepended when running yarn dev.

RoadMap

  • Quickly extensible oracle (delivered beta)
  • Multiple pair price submissions (delivered beta)
  • Frontend (POC in progress not released yet)
  • Lib to find other Oracles on the XRPL
    • Hearbeat format and service
    • Ledger watching to find other services uploading the hearbeat
  • Monitoring and logging
  • Test Hook consuming a oracle price feed

Theory

The basic non insentivized modle is leveraged here. Trust of oracles and their data provided, is one of the core issues with orcles, once many exist. Running an oracle service is not free, its pay to play. Rough cost is 60 * 24 * 30 * 10 / 1000000 = 0.432 XRP per month pushing 1 price feed every 1 min.

TODO more writeup here.

About

Price Oracle pushing service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published