Go to file
Hernán Di Pietro 8206de79ee
Update README.md
Image of system.
2021-10-05 10:56:41 -03:00
backend Refactorized PriceFetcher + Strategy class hierarchy 2021-10-05 10:52:17 -03:00
lib Fixed Hash generation 2021-10-05 10:52:26 -03:00
scripts Fixes and testing scripts. 2021-09-30 19:04:16 -03:00
teal Nonce fix. 2021-10-05 10:52:32 -03:00
test TEAL and lib fixes 2021-10-04 17:12:25 -03:00
tools Creation successful. Fixes + test deployment Betanet 2021-10-01 15:06:33 -03:00
.eslintrc.js Missing files. 2021-10-01 11:01:43 -03:00
.gitignore Initial commit 2021-09-30 15:34:21 -03:00
LICENSE Initial commit 2021-09-30 15:34:21 -03:00
README.md Update README.md 2021-10-05 10:56:41 -03:00
package-lock.json TEAL and lib fixes 2021-10-04 17:12:25 -03:00
package.json Refactorized PriceFetcher + Strategy class hierarchy 2021-10-05 10:52:17 -03:00
settings.js Refactorized PriceFetcher + Strategy class hierarchy 2021-10-05 10:52:17 -03:00

README.md

Pricecaster Service

This service consumes prices from Pyth and feeds a TEAL program with messages containing signed price data. The program code validates signature and message validity, and if successful, subsequently stores the price information in the global application information for other contracts to retrieve.

System Overview

PRICECASTER

Backend Configuration

The fetcher will get information as soon as Pyth reports a price-change. Since publishing to the pricekeeper contract will be much slower, a buffered is approach is taken where a last set of prices is kept.

The number of prices kept is controlled by the buffersize setting.

The ratio of message publications currently is to publish again as soon as the last call finished and there is any buffer data available. This is configured with the ratio setting.

As prices may vary greatly in markets in short periods of time between publications, a set of strategies are provided to decide how to select data from the buffer.

Available strategies are:

  • avg Select the average price in-buffer.
  • wavg Select the weighted-by-confidence average prices in buffer.
  • maxconf Select the price with the maximum confidence (lowest deviation between publishers)

Enabling the 'phony' setting will simulate publications but no real calls will be made. Just useful for debugging.