Go to file
Hernán Di Pietro 5de95fa8bb Service booting and feeding :happy: 2021-10-08 16:03:37 -03:00
backend Service booting and feeding :happy: 2021-10-08 16:03:37 -03:00
lib Store exp as 2-comp signed (Pyth emits NEGATIVE exponent!) 2021-10-08 15:45:46 -03:00
teal Store exp as 2-comp signed (Pyth emits NEGATIVE exponent!) 2021-10-08 15:45:46 -03:00
test Service booting and feeding :happy: 2021-10-08 16:03:37 -03:00
tools Added Deployment tool. 2021-10-07 15:47:14 -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 Service booting and feeding :happy: 2021-10-08 16:03:37 -03:00
package.json Service booting and feeding :happy: 2021-10-08 16:03:37 -03:00
settings.js Service booting and feeding :happy: 2021-10-08 16:03:37 -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.