Becoming a Reporter

Reference Guides

Windows Users:

WSL (Windows Subsystem for Linux)

Visual Studio Code w/WSL Extension

Python V3.9 --- Installation Guide

Github Signum-Feeds Installation Guide (IMPORTANT)

Signum Feeds Setup and Usage

The Signum Feeds CLI handles all the functionality of reporting data and customizing the how you report.

Follow the installation and setup instructions in the Signum Feeds Documentation

Main Functions of Reporting

Staking/Unstaking

Reporting data requires a staked reporter to run the submitValue function:

/**
 * @dev Allows a reporter to submit a value to the oracle
 * @param _queryId is ID of the specific data feed. Equals keccak256(_queryData)
 * @param _value is the value the user submits to the oracle
 * @param _nonce is the current value count for the query id
 * @param _queryData is the data used to fulfill the data query
 */
function submitValue(
    bytes32 _queryId,
    bytes calldata _value,
    uint256 _nonce,
    bytes memory _queryData
) external {

Stake Amount:

To ensure that oracle data is always secured by a minimum amount, the stake amount is a function of the price of STT (Test Token), the stake amount dollar target, and the minimum stake amount:

stakeAmount = maxUSD(stakeAmountDollarTarget, minStakeAmount)

The stake amounts will vary from chain to chain, but as an example, Pulsechain's mainnet stakeAmount is as follows:

stakeAmount = maxUSD($750, 75000 STT (Test Token))

  • whenever the price of STT (Test Token) is greater than $0.0001, the stakeAmount is always 75000 TRB

  • whenever the price of STT (Test Token) is less than $0.0001, the stakeAmount is stakeAmountDollarTarget/priceOfSTT

The stake amount only changes when someone calls the function updateStakeAmount, which can be called by anyone, and depends on the 12+ hour old reported price of STT (Test Token).

Notes:

Once a value is submitted, the reporter is then locked from submitting again for the reporterLock time period (usually 12 hours) divided by the number of full stakes. If the stake amount is 10 STT (Test Token) and a reporter has 60 STT (Test Token) staked, for example, that reporter can submit once every two hours.

For all reported values, the _queryId must be the keccak256 hash of the _queryData. For information on how to get the queryId or how to parse the _queryData, see the Creating a Query section.

The _nonce can be either correct or 0 for a valid report. The nonce represents the number of submissions for a given query. The purpose of the _nonce is to prevent two parties from submitting at the same time for the same ID and wasting gas with no reward.

Submitting Values

Reporting data requires a staked reporter to run the submitValue function:

/**
 * @dev Allows a reporter to submit a value to the oracle
 * @param _queryId is ID of the specific data feed. Equals keccak256(_queryData)
 * @param _value is the value the user submits to the oracle
 * @param _nonce is the current value count for the query id
 * @param _queryData is the data used to fulfill the data query
 */
function submitValue(
    bytes32 _queryId,
    bytes calldata _value,
    uint256 _nonce,
    bytes memory _queryData
) external {

Setting up a Reporter

Our Github repository page has detailed instructions for configuring and running your own reporter. The guide is located within this Github repository.

Last updated