Skip to content

Oracle Tables


  • Table: feeddata
  • Code:
  • Scope:
  • Key: source

The table contains conversion rate cache and weight for individual exchanges.

sourcenameName of the registered exchange
ratesstd::vector<uint64_t>Cached rates pushed by this exchange. Value stored is amount from the conversion rate asset type
weightuint64_tWeight of the exchange for the purpose of calculating weighted average between exchanges. It is equal to the last 24 hours trading volume for this exchange

Most relevant actions: regexchange, unregexchg


  • Table: oraclestate
  • Code:
  • Scope:

This singleton contains common values used by oracle during it's operation.

conversion_rate_symbolsymbolSymbol used for conversion rates asset type pushed by exchanges. Default value is 8,DUOS
trading_volume_symbolsymbolSymbol used for validation of the 24 hours trading volume asset. Default value is 8,USD
latest_timestampuint64_tStores the most recent timestamp extracted from the rates pushed by the exchanges
intervaluint8_tInterval enforced between rates pushed to the oracle. Forced to be 1 during initialization
cache_windowuint8_tTime window for exchanges/source to push the rates. Forced to be 60 during initialization
registered_sourcesuint32_tTotal number of exchange/sources registered

Most relevant actions: init


This table is deprecated and is not currently in use.


  • Table: finalaverage
  • Code:
  • Scope: time symbol_code
  • Key: param

The table contains moving averages for specified time units and windows.

Possible scopes for finalaverage table

  • SECONDS (or .1docnmjch2p3)
  • MINUTES (or .1doep2pdt4oh)
  • HOURS (or .....oumepboc)
  • DAYS (or ......2nf5.o4)
averagerateCalculated moving average with a timestamp corresponding to the latest update
paramuint64_tStores the window size and EMA alpha coefficient. See addma for details
moving_window_counteruint8_tIncremental counter which is used to track how many values were accumulated by the moving average
unituint8_tUnused. Forced to be 1

Most relevant actions: pushrate


  • Table: finalrates
  • Code:
  • Scope: 0 (seconds) / 1 (minutes) / 2 (hours) / 3 (days)

The table contains intermediate values and calculated moving averages to be used for updating finalaverage table entries.

indexuint64_tIndex pointing to the latest value in the rates vector that was updated
ratesstd::vector<urate>Cached rates calculated based on rates pushed by exchanges or calculated from rolling_moving_average of the previous scope of finalrates. Value stored is a pair of the timestamp of calculated conversion rate and associated price stored as unsigned integer
rolling_moving_averagemoving_average_implRefer to finalaverage table to see the structure of this type. This moving average is used to populate the rates vector of finalrates with scope one higher than the current one

Most relevant actions: pushrate


  • Table: lastknwnrate
  • Code:
  • Scope:

Stores the latest conversion rate pushed from any exchange.

sourceeosio::nameName of the exchange that was the last to push the new rate
latest_rateratePair of asset storing the conversion rate of USD to UOS and a uint64_t UTC timestamp when this last rate was pushed