Subnet Pool
A mechanism that manages the exchange between TAO and subnet tokens. Each subnet has its own pool that determines token prices and handles staking operations.
A subnet pool is where staking happens in Dynamic TAO . Each subnet needs its own pool to handle the exchange between TAO and subnet tokens. A subnet pool holds:
- TAO that people stake into the subnet
- Subnet tokens (ALPHA) that can be given out
The pool's main job is to set fair exchange rates between TAO and subnet tokens. These rates change automatically based on how much TAO and ALPHA the pool holds. When more people stake TAO, they get ALPHA in return, changing the pool's balance and the exchange rate.
REFERING TO SUBNET TOKENS AS ALPHA
Each subnet has its own token (ALPHA for subnet 1, BETA for subnet 2, etc.). For simplicity, we refer to all subnet tokens as "ALPHA".
A subnet pool is like a container that holds two types of tokens: TAO and subnet tokens (ALPHA). Every time someone stakes or unstakes, they're trading with this pool, not with other people directly. The pool's balance determines the exchange rate between TAO and ALPHA.
Pool Balance
Think of the pool as having two sides:
- TAO side: Holds all staked TAO into that subnet
- ALPHA side: Holds subnet tokens ready for exchange
The relationship between these sides determines the price:
Let's make few examples showing how the price changes based on the pool balance:
- If a pool has 100 TAO and 100 ALPHA, each ALPHA costs 1.00 TAO
- If a pool has 200 TAO and 100 ALPHA, each ALPHA costs 2.00 TAO
- If a pool has 150 TAO and 200 ALPHA, each ALPHA costs 0.75 TAO
Staking TAO
When you stake TAO, those important things happen:
- Your TAO goes into the pool
- The pool gives you ALPHA
- The ALPHA price increases because there's now more TAO and less ALPHA in the pool
- The subnet's emission rate increases because there's more TAO in the pool
Staking Formula:
Let's shortly see an example how this works exactly:
Current Pool:
- 100 TAO and 100 ALPHA
- Price: 1 TAO per ALPHA
You stake 50 TAO:
- 100 TAO + 50 TAO = 150 TAO in the pool
- You receive 33.33 ALPHA
- 100 - ((100 × 100) ÷ (100 + 50)) = 33.33 ALPHA
- 100 ALPHA - 33.33 ALPHA = 66.67 ALPHA in the pool
- Price: 150 TAO÷ 66.67 ALPHA= 2.25 TAO per ALPHA
PROBABILITY OF SLIPPAGE
Large stakes or unstakes may result in slippage. You might get fewer tokens than expected because your action changes the pool's price in the process. See "Understanding Slippage" below for more details.
Unstaking ALPHA
When you unstake ALPHA, the process works in reverse:
- Your ALPHA goes back to the pool
- The pool gives you TAO
- The ALPHA price decreases because there's now less TAO and more ALPHA in the pool
- The subnet's emission rate decreases because there's less TAO in the pool
Unstaking Formula:
Let's again see an example how this works exactly:
Current Pool:
- 150 TAO and 66.67 ALPHA
- Price: 2.25 TAO per ALPHA
You unstake 15 ALPHA:
- 66.67 ALPHA + 15 ALPHA = 81.67 ALPHA in the pool
- You receive 27.55 TAO
- 150 - ((150 × 66.67) ÷ (66.67 + 15)) = 27.55 TAO
- 150 TAO - 27.55 TAO = 122.45 TAO in the pool
- Price: 122.45 TAO ÷ 81.67 ALPHA= 1.50 TAO per ALPHA
When you stake or unstake, you might receive fewer tokens than you expect. This difference is called slippage, and it happens because your own action changes the pool's price while you're using it.
Why Slippage Happens
Every pool must maintain a balanced relationship between its TAO and ALPHA. This balance follows a formula:
This constant (K) cannot change during a transaction. When you stake 100 TAO, the price changes with each piece of your stake. Think of it like filling a bucket:
- Your first TAO gets the current price
- As you add more TAO, each piece gets fewer ALPHA tokens
- By the end, your last TAO gets the least ALPHA
This happens because each piece of TAO you add makes the remaining ALPHA more expensive in the pool. In this example the pool must keep K constant, so as you add more TAO, you get progressively fewer ALPHA tokens.
In summary, each piece of ALPHA you return to the pool changes the price. As you add more ALPHA, the remaining TAO becomes more expensive. This is why larger unstakes receive proportionally less TAO in return.