# Formulas

**Circulating Supply**

*Circulating Supply = 1 000 000 000 - Tokens that are not circulating/locked.*

Tokens that are not circulating/locked include:

* balance of the community treasury [dydx15ztc7xy42tn2ukkc0qjthkucw9ac63pgp70urn](https://www.mintscan.io/dydx/address-estimation/dydx15ztc7xy42tn2ukkc0qjthkucw9ac63pgp70urn) (can be transferred to any recipient with a governance proposal, but otherwise locked)
* balance of the community treasury vester [dydx1wxje320an3karyc6mjw4zghs300dmrjkwn7xtk](https://www.mintscan.io/dydx/address-estimation/dydx1wxje320an3karyc6mjw4zghs300dmrjkwn7xtk) (locked and vesting linearly to the community treasury until Aug 3, 2026)
* balance of the rewards treasury vester [dydx1ltyc6y4skclzafvpznpt2qjwmfwgsndp458rmp](https://www.mintscan.io/dydx/address-estimation/dydx1ltyc6y4skclzafvpznpt2qjwmfwgsndp458rmp) (locked and vesting linearly to the rewards treasury until Aug 3, 2026)
* investor/employees tokens that are locked, i.e. percentage of tokens that they are not allowed to move freely. Number of these tokens are determined by the following table:

| Date                | Locked tokens |
| ------------------- | ------------- |
| Before Dec 1st 2023 | 500 000 000   |
| Dec 1st 2023        | 350 000 000   |
| Jan 1st 2024        | 316 666 667   |
| Feb 1st 2024        | 283 333 333   |
| Mar 1st 2024        | 250 000 000   |
| Apr 1st 2024        | 216 666 667   |
| May 1st 2024        | 183 333 333   |
| Jun 1st 2024        | 150 000 000   |
| Jul 1st 2024        | 141 666 667   |
| Aug 1st 2024        | 133 333 333   |
| Sep 1st 2024        | 125 000 000   |
| Oct 1st 2024        | 116 666 667   |
| Nov 1st 2024        | 108 333 333   |
| Dec 1st 2024        | 100 000 000   |
| Jan 1st 2025        | 91 666 667    |
| Feb 1st 2025        | 83 333 333    |
| Mar 1st 2025        | 75 000 000    |
| Apr 1st 2025        | 66 666 667    |
| May 1st 2025        | 58 333 333    |
| Jun 1st 2025        | 50 000 000    |
| Jul 1st 2025        | 45 833 333    |
| Aug 1st 2025        | 41 666 667    |
| Sep 1st 2025        | 37 500 000    |
| Oct 1st 2025        | 33 333 333    |
| Nov 1st 2025        | 29 166 667    |
| Dec 1st 2025        | 25 000 000    |
| Jan 1st 2026        | 20 833 333    |
| Feb 1st 2026        | 16 666 667    |
| Mar 1st 2026        | 12 500 000    |
| Apr 1st 2026        | 8 333 333     |
| May 1st 2026        | 4 166 667     |
| Jun 1st 2026        | 0             |

**Trading Fee collection**

Trading Fees are calculated based on Taker Order Fee Quote Quantums and Maker Order Fee Quote Quantums that can be collected from Match event logs of Proposed Operations messages

*Trading Fees are determined as the sum of all Taker Order Fee Quote Quantums and Maker Order Fee Quote Quantums in a block*

Trading Fees are reported in terms of USDC

**Gas Fee collection**

Gas Fees are determined as the sum of gas fees of all transactions in a block

Gas Fees are reported in terms of dYdX

**Staking APR**

$$
APR = \frac{\frac{\text{Trading Fees + Gas Fees paid in USDC}}{\text{dYdX price}}+\text{Gas Fees paid in dYdX}}{\text{Staking Bonded Pool Balance}}
$$

where Staking Bonded Pool is [dydx1fl48vsnmsdzcv85q5d2q4z5ajdha8yu3uz8teq](https://www.mintscan.io/dydx/address/dydx1fl48vsnmsdzcv85q5d2q4z5ajdha8yu3uz8teq) and\
dYdX price is collected from [OKX](https://www.okx.com/docs-v5/en/)&#x20;

The API endpoint returns the average Staking APR of past 1 000 blocks

**Trading Rewards Distribution**

$$
\text{Block's Trading Rewards}= min(C \* S/p,T)
$$

where C is constant ranging from 0 to 1. C is currently 0.5,&#x20;

S is sum of trader's scores and determined as *S = total taker fees paid - maximum possible maker rebate \* total volume + total positive maker fees,*

p is price of dYdX and

T is balance of Reward Treasury [dydx16wrau2x4tsg033xfrrdpae6kxfn9kyuerr5jjp](https://www.mintscan.io/dydx/address-estimation/dydx16wrau2x4tsg033xfrrdpae6kxfn9kyuerr5jjp)
