XNET Mobile
XNET Foundation Docs
XNET Foundation Docs
  • Build the Foundation
    • What is the XNET Foundation?
    • XNET Foundation Charter
    • Working Group
    • $XNET Token
      • Governance
        • XNET Improvement Proposals
          • XIP-1
          • XIP-2
          • XIP-3
          • XIP-4
          • XIP-5
          • XIP-6
          • XIP-7
          • XIP-8
          • XIP-9
          • XIP-10
            • XIP-10 'Pause'
          • XIP-11
      • Rewards
      • Tokenomics
      • Staking
    • Xplore 📱
Powered by GitBook
On this page
  • Implementation of Price Oracle Algorithms
  • Formula Breakdown for Reward Adjustment
  • Adjustment Factor Calculation
  • Calculation of Adjustment Factors for Various Prices:
  • Managing XNET Price Selection and Mitigating Oracle Attacks
  • Oracle Implementation
  • Sensitivity Factor k
  • Role of 𝑘 in the Adjustment Factor Formula
  • Example Usage
  • Practical Consideration
  1. Build the Foundation
  2. $XNET Token
  3. Governance
  4. XNET Improvement Proposals

XIP-5

Implementation of Price Oracle Algorithm

PreviousXIP-4NextXIP-6

Last updated 27 days ago

Draft by bigXhaan, Dharma (Dated Emissions Tab):

Implementation of Price Oracle Algorithms

In an effort to effectively manage token emissions in real time, this proposal is incorporating a price oracle algorithm. This tool aims to dynamically adjust token distribution based on the current market value of $XNET, ensuring that emissions are proportional to token worth. This strategy prevents excessive issuance during price spikes and maintains economic stability by linking the reward system directly to market conditions. The oracle algorithm allows XNET to provide a balanced incentive for network participation while safeguarding the ecosystem against inflation and ensuring a resilient supply mechanism.

A baseline price of $0.10 was chosen for the sake of this model, for simplicity of calculations and recent price stabilization. Changes to this baseline price can be explored in further proposals. Please note that this specific algorithm will only be applicable for CBRS radios- comparable to XNET

Formula Breakdown for Reward Adjustment

The reward adjustment formula is designed to dynamically scale the token rewards distributed to node operators based on the current market price of $XNET and the percentage growth of the network. This method ensures that rewards remain fair, sustainable, and aligned with the overall health and expansion of the network.

Adjustment Factor Calculation

Adjustment Factor = $\left(\frac{1}{1 + k \cdot \log \left(\frac{P}{P_0}\right)}\right)$

  • P = Current Market price of $XNET

  • P0 = Baseline price of $XNET=$0.10

  • b = Base of Logarithm =10

  • 𝑘 = Sensitivity constant, determining how sharply the rewards decrease as the price increases.

From testing, we have found a value of 𝑘=2 works well to reduce emissions at a reasonable rate. Please refer to Appendix A for more detail on the role of k.

Calculation of Adjustment Factors for Various Prices:

  • At $0.05: Adjustment Factor = $\left(\frac{1}{1 + 2 \cdot \log \left(0.5\right)}\right)$ ≈ 2.512

  • At $0.10: Adjustment Factor = $\left(\frac{1}{1 + 2 \cdot \log \left(1\right)}\right)$ ≈ 1

  • At $0.50: Adjustment Factor = $\left(\frac{1}{1 + 2 \cdot \log \left(5\right)}\right)$ ≈ 0.590

  • At $1.00: Adjustment Factor = $\left(\frac{1}{1 + 2 \cdot \log \left(10\right)}\right)$ ≈ 0.333

  • At $5.00: Adjustment Factor = $\left(\frac{1}{1 + 2 \cdot \log \left(50\right)}\right)$ ≈ 0.143

  • At $10.00: Adjustment Factor = $\left(\frac{1}{1 + 2 \cdot \log \left(100\right)}\right)$ ≈ 0.091

Price of $XNET

Adjustment Factor

$0.05

2.512

$0.10

1.000

$0.50

0.590

$1.00

0.333

$5.00

0.143

$10.00

0.091

Worked example for associated $XNET rewards for a Roofus (BLINQ-FW300) radio during an Epoch at the respective adjustment factors:

Adjustment Factor

Adjusted Coverage

Adjusted Validation

Adjusted Gold

Total Epoch Rewards

2.512

3140

3140

12560

18840.0

1.000

1250

1250

5000

7500.0

0.590

737.50

737.50

2950

4425.0

0.333

416.25

416.25

1665

2497.5

0.143

178.75

178.75

715

1072.5

0.091

113.75

113.75

455

682.5

Managing XNET Price Selection and Mitigating Oracle Attacks

Given the relatively lower liquidity of XNET, the model is indeed susceptible to potential oracle attacks, where investors might attempt to manipulate the market price to influence the reward system. To combat this risk, XNET implements a robust mechanism for selecting the token price:

Bi-weekly Price Bands: The price of XNET is updated every two weeks based on predefined price bands. These bands are designed to smooth out volatility and provide a more stable and predictable basis for reward calculations.

Discretionary Selection: The selection of the specific price within these bands is at the discretion of the XNET team. This approach allows for expert judgment to play a role in assessing market conditions, ensuring that the chosen price reflects a fair and reasonable value that is resistant to manipulation.

Mitigation Strategies:

Monitoring and Analysis: Continuous monitoring of trading patterns and price movements to identify and respond to potential manipulation attempts.

Adjustment of Price Bands: The bands themselves can be adjusted based on long-term market trends and changes in market dynamics to ensure they remain relevant and effective.

Oracle Implementation

We propose an oracle that is the volume-weighted average price, averaged over 30 days, based on data from CoinGecko. CoinGecko provides historical and real-time data for a wide variety of tokens and is plugged into many DEXs. CoinGecko provides historical information free of charge for up to one year in the past, and has a very functional API.

Sensitivity Factor k

Role of 𝑘 in the Adjustment Factor Formula

Definition: 𝑘 is a numeric constant used to modulate the impact of the logarithmic component within the formula.

Function: It scales the output of the logarithm of the ratio _P/P0 _where P is the current market price and P0 is the baseline price. The logarithm provides a smooth, controlled adjustment to the rewards as the price changes.

High 𝑘 Value: A higher value of 𝑘 means the formula is more sensitive to changes in price. Small changes in the price ratio will result in larger adjustments to the rewards, making the rewards decrease more sharply as the price increases.

Low 𝑘 Value: Conversely, a lower value of 𝑘 makes the formula less sensitive to price changes. This results in a gentler slope of reward adjustment, where rewards decrease more gradually as the price increases.

Example Usage

If the current price 𝑃 is significantly higher than the baseline price 𝑃0,, the logarithmic term log⁡𝑏(P/P0)_ _will yield a positive value. The impact of this positive value on the adjustment factor depends on 𝑘:

If 𝑘 is large, the term 𝑘× log⁡𝑏(P/P0)_ _significantly increases, leading to a smaller adjustment factor, thus reducing the rewards more substantially.

If 𝑘 is small, the increase in 𝑘× log⁡𝑏(P/P0) is more modest, leading to a less dramatic reduction in the adjustment factor, and thus a less severe cut in rewards.

Practical Consideration

Choosing the right value for 𝑘 is critical because it directly influences how the reward system reacts to market dynamics, ensuring that the mechanism is neither too volatile (which could destabilize node operator incentives) nor too stagnant (which could fail to adequately respond to significant price increases). The choice of 𝑘 should reflect strategic objectives regarding the stability and economic behavior of the network.

We created an example 30-day volume weighted average spreadsheet to illustrate the process, using both static (scraped) data from CoinGecko, as well as calculations based on a live API feed. You can find that spreadsheet here:

Link
https://docs.google.com/spreadsheets/d/1VBsZFStevZtbjeKP0lSBznMt9oCaffHgXvjKlyjmmKw/edit?usp=sharing