# ATD (Automated Token Distributor)

## Overview

The Automated Token Distributor (ATD) is a core component of VALOR's token distribution strategy. This document explains the ATD’s budget distribution mechanisms.

The below models can be updated due to the balance update

## 1. Budget Distribution

ATD’s budget distribution framework employs a probabilistic approach based on a standard normal distribution to allocate resources effectively across various tokens and market segments.

### Key Definitions and Variables

**Normal Distribution (PDF)**: A probability distribution function used to allocate budgets fairly, with a mean of 0 and a standard deviation of 1.**Budget Allocation Ratios**: Ratios are derived from the PDF to determine the portion of the total budget allocated to each token.**Total Budget**: It is set at 110% of the inflow over 24 hours. It is rounded down to 9 decimal places, and the remainder is discarded.

### Process Explanation

**Total Budget Calculation**:Case 1 (Accumulated Inflow < Accumulated Outflow):

The total budget is set at 110% of the inflow over the past 24 hours plus any carried-over budget

$B_{total} = \left\lfloor (1.1 \times Inflow) \times 10^9 \right\rfloor / 10^9$Here, $Inflow$ is the inflow over the past 24 hours.

Case 2 (Accumulated Inflow > Accumulated Outflow):

The total budget is set at sum of each sSPL supply and ideal price.

$B_{total} = \sum S \times P_{idl}$

**Random Factor Generation**:Generate a random number within the range of [-0.5, 0.5] from a normal distribution with a mean of 0 and a standard deviation of 1. This controls the variability in budget allocation.

Calculate the probability density $p(x_i)$ for each random factor $x_i$. This density influences how the budget is divided. The probability density function is:

$p(x_i) = \frac{1}{\sqrt{2\pi}} e^{-\frac{x_i^2}{2}}$

**Budget Allocation**:Convert these densities into budget allocation ratios:

$R_i = \frac{p(x_i)}{\sum_{j=1}^{9} p(x_j)}$Allocate the total budget to various tokens using these ratios:

$B_i = \left\lfloor R_i \times B_{total} \times 10^9 \right\rfloor / 10^9$

## 2. Price Setting

The ATD's price-setting mechanism dynamically adjusts token prices around an ideal price to reflect market values.

### Key Definitions and Variables

**Ideal Price (**$P_{idl}$**)**: The target price for the tokens.**Previous Price (**$P_{prv}$**)**: The market price of the token before adjustment.**Next Price (**$P_{nxt}$**)**: The price of the token after adjustment.**Standard Deviation (**$\sigma$**)**: Controls the spread of price values around $P_{idl}$

### Standard Deviation Calculation

The standard deviation $\sigma$ is calculated as:

This calculation determines the range of price fluctuations around the ideal price $P_{idl}$, adjusting for market volatility.

### Price Determination Model

#### Random Price Determination Model

This model dynamically calculates the next token price using a probability distribution function centered on $P_{idl}$.

**Detailed Process**

**Define Price Range**:Establish the effective price range for the next pricing cycle:

$\text{Effective Price Range} = [P_{prv} \times 0.7, P_{prv} \times 1.3]$

**Generate PDF**:Create a normal distribution centered on $P_{idl}$ with the calculated $\sigma$.

**Calculate Area Under Curve**:Determine the total probability area under the PDF within the defined range:

$A = \int_{P_{prv} \times 0.7}^{P_{prv} \times 1.3} f(x) \, dx$

**Generate Random Factor and Set Next Price**:Select a random value within the range [0, A], and determine the corresponding price using the inverse cumulative distribution function (CDF):

$P_{nxt} = f^{-1}(r)$Here, $f^{-1}$ is the inverse function of the CDF, accurately determining the price corresponding to the random value $r$.

**Final Quantity Adjustment**:Calculate the maximum quantity that can be purchased with the allocated budget:

$Q_i = \left\lfloor \frac{B_i}{P_{nxt}} \right\rfloor$Round down to ensure accurate quantity calculation. (If $Q_i < 1$, set $Q_i$ to 1)

Adjust the final price using the actual quantity purchased:

$P_{final} = \left\lfloor \frac{B_i}{Q_i} \times 10^3 \right\rfloor / 10^3$The final price $P_{final}$ is rounded down to 3 decimal places.

$B_i^\text{new} = B_i - (Q_i \times P_{final})$

## Data

Token | Ideal Price ($VALOR) |
---|---|

Voodoo Doll ($VD) | 1.5300 |

Gold Teeth ($GT) | 2.5800 |

JB Whiskey ($JBW) | 3.0000 |

Canteen ($CT) | 4.5250 |

G Badge ($GB) | 4.8750 |

Holy Water ($HW) | 9.0500 |

Used Engine ($UE) | 13.6083 |

Enhanced Bullet ($EB) | 20.6000 |

Oil Lighter Case ($OLC) | 27.4250 |

## Examples

### PDF and simulation when the ideal price is 2.28

### PDF and simulation when the ideal price is 50.4

Last updated