Harbinger is a decentralized price oracle solution for price feeds on the Tezos network. This repository contains top level documentation for the project.
If you are just interested in using Harbinger as a client, the current contract addresses are:
* Mainnet
* Coinbase
* Storage: [KT19B8uSfiQ8Cxk99ELc7MPccQ9ihyy7jhDU](https://tzkt.io/KT19B8uSfiQ8Cxk99ELc7MPccQ9ihyy7jhDU/storage)
* Normalizer: [KT1KBrn1udLLrGNbQ3n1mWgMVXkr26krj6Nj](https://tzkt.io/KT1KBrn1udLLrGNbQ3n1mWgMVXkr26krj6Nj/storage)
* Ghostnet
* Coinbase
* Storage:[KT1UcwQtaztLSq8oufdXAtWpRTfFySCj7gFM]()https://ghostnet.tzkt.io/KT1UcwQtaztLSq8oufdXAtWpRTfFySCj7gFM)
* Normalizer: [KT1ENe4jbDE1QVG1euryp23GsAeWuEwJutQX](https://ghostnet.tzkt.io/KT1ENe4jbDE1QVG1euryp23GsAeWuEwJutQX)
You can view current Harbinger data at:
If you'd like to understand more about Harbinger works, read on!
Harbinger is a signed price feed for the Tezos blockchain which provides a trusted price oracle for digital assets.
Harbinger's design was inspired by Compound's Open Price Feed. Separate entities provide signed price updates and post the signed price data on chain. This separation of responsibility leads to a decentralized solution where anyone can post signed prices on-chain, reducing dependencies on a single poster that might be offline.
Harbinger stores "candles" of prices of assets. Specifically, each data point for an asset in a Harbinger price oracle contains the following data: (1) start time, (2) end time, (3) open price, (4) high price, (5) low price, (6) close price, and (7) volume. Typically, the signed price data originates from a market order book on an exchange, where the most recent historical 1-minute candle can be retrieved and signed.
The easiest way to get started with Harbinger is to install and use the Harbinger CLI:
$ npm i -g @tacoinfra/harbinger-cli
$ harbinger --help
Contracts for Harbinger are deployed at the following addresses:
Harbinger is made up of several components in separate github repositories for discoverability. Developers, signers, posters and users may be interested in one or more of the following repositories:
Harbinger separates creating a signed price feed from the posting of signed price data on-chain.
At a high level, three components make up Harbinger:
The storage contracts are initialized with the public key of a signer. As long as updates are signed correctly, they can be posted to an Oracle.
Any service can sign updates for the Harbinger Oracle system as long as they sign the correct data. The following services provide signed price feeds:
Harbinger is made up of two contracts:
Data is posted to the price storage contract and can then be pushed to the normalizer contract by the same poster or another entity.
All price oracle data is represented in two formats:
$123.45
would be represented as 123450000
.The following asset codes are a convention in Harbinger:
Price storage contracts are bound to a single price feed and can contain an unlimited number of assets. All updates must be monotonically increasing in start time and must be signed by a specific key.
Specifically, the price storage contract can be configured with the following parameters:
A price storage contract has the following entrypoints:
update
: Receives a signed set of updates to the price storage contract.push
: Pushes the data in the price storage contract to a normalizer contract.revoke
: Revokes a price storage contract by removing the signer public key and any price data. This effectively triggers an emergency shutdown of the price oracle.Normalizer contracts normalize a single asset and can only receive updates from one Oracle. All updates must be monotonically increasing in start time.
Specifically, the normalizer contract can be configured with the following parameters:
A normalizer contract has the following entrypoints:
update
: Receives data from a price storage contract.Harbinger is written and maintained by Luke Youngblood and Keefer Taylor.