# Gamma: subnet service credits

Gamma is a dollar-valued credit for one subnet's service, minted by burning that subnet's alpha. A customer hotkey holds it like an API key and spends it at the subnet's services, and spent gamma is destroyed.

_Source: https://beta.taostats.io/docs/concepts/protocol-changes/gamma_

_Last reviewed: 2026-11-24_

> [!NOTE]
> **Live on mainnet**
>
> Gamma shipped in runtime spec **488** (block 9,442,681, 2026-11-05) and is switched on network-wide, with a TAO/USD price oracle set. Each subnet owner decides whether its own subnet accepts gamma. Gamma from emission shipped in spec **490** (block 9,478,217, 2026-11-10).

## In one line

Gamma is a credit for one subnet's service, valued in US dollars when it is made. You make it by burning that subnet's alpha. Your hotkey spends it at the subnet's services, and spent gamma is destroyed.

## Terms

| Term | Meaning |
|---|---|
| Gamma | The credit. 1 gamma is worth $1 when it is minted. |
| Mint | Make gamma by burning the subnet's alpha. |
| Deposit | The gamma one hotkey holds on one subnet, owned by a coldkey. The hotkey spends it, like an API key. |
| Daily cap | An optional limit on what a deposit's hotkey can spend per day. A cap of 0 pauses the deposit. |
| Service | A URL that a validator or the subnet owner publishes from its hotkey, pointing to a document that describes what it sells. Hotkeys spend gamma at a service's hotkey. |
| Price oracle | The one account, chosen by root, that posts the TAO/USD price on chain. |

## Why it exists

Subnets that sell compute, inference or storage each run their own account system off chain: customers prepay into it and trust its billing. Gamma gives every subnet one standard on-chain credit instead. A hotkey works as the API key, balances and spending are visible on chain, and the alpha burned to pay for them can be checked by anyone.

## Who does what

| Role | Can |
|---|---|
| Customer coldkey | Mint into its deposits, move gamma between its own hotkeys, set or remove each deposit's daily cap, close empty deposits |
| Customer hotkey | Spends its deposit at the subnet's services, with no fee, and signs requests to them. It doesn't need to be registered, funded or associated with a coldkey |
| Validator or subnet owner hotkey | Publishes a service. The hotkey's coldkey signs it |
| Subnet owner | Switches gamma on for its subnet, and pays shares of its subnet's emission into other subnets' gamma |
| Lease beneficiary | Switches gamma on and publishes the subnet owner hotkey's service, through its `SubnetLeaseBeneficiary` proxy |
| Root | Switches gamma on network-wide and on any subnet, chooses the price oracle, and whitelists subnets that can receive gamma from emission |
| Oracle | Feeds the TAO/USD price |

## Minting gamma

There are two ways, each a single transaction:

| Call | You pay with | What happens |
|---|---|---|
| `mint_gamma` | TAO from your balance | The TAO buys the subnet's alpha, which is burned. No stake is created. It counts as TAO flowing into the subnet, the same as staking |
| `mint_gamma_with_stake` | Alpha you already have staked | That alpha is burned |

The gamma lands in a deposit on the hotkey you choose. Use a fresh hotkey for each deposit, never a staking hotkey or a coldkey, because whoever holds the hotkey can spend the deposit. If the hotkey is already associated with a coldkey, only that coldkey can open a deposit on it, so nobody can take the deposit slot of a hotkey someone else owns. There is one deposit per hotkey per subnet: if another coldkey already opened it, use a different hotkey. A coldkey holds at most 64 deposits per subnet.

A new deposit opens with the daily cap the mint names, or with no cap if the mint names none. Naming a cap at mint time means the deposit is never open without one. A mint that names a cap fails on an existing deposit with a different cap (`GammaDepositDailySpendCapMismatch`).

Minting needs gamma switched on both network-wide and on the subnet. It doesn't work on the root subnet or on a subnet whose token isn't trading yet.

### How much gamma you get

The burned alpha is valued at the lower of two prices, both read before the mint trades:

- **Spot:** the pool price right now.
- **Gamma price:** a slow price that every subnet keeps. It drops to spot at once when spot falls. When spot rises, it closes half the gap every 600 blocks (about 2 hours), and never more than doubles in that time. A new subnet's gamma price starts at the median subnet alpha price.

**gamma = alpha burned × the lower price × the TAO/USD price**

Because the price is read before the trade and the gamma price climbs slowly, pumping the price in the same block or over a few blocks doesn't increase the gamma you get.

- Minting with TAO: the swap moves the price against you, so you usually get a little less gamma than the dollars you paid.
- Minimum mint: 0.1 gamma. You can also set a minimum you'll accept, and the mint fails below it.
- A TAO mint can't be larger than the largest single stake the pool accepts.

### The TAO/USD price

| Rule | Detail |
|---|---|
| Who posts it | One price oracle account, chosen by root (`sudo_set_tao_usd_price_oracle`) |
| Price falls | The chain accepts a lower price at once |
| Price rises | The accepted price climbs toward a higher feed by at most 0.0066% a block, about 2% an hour |
| Stale feed | Minting stops if the last feed is more than 300 blocks old (about an hour) |
| New oracle | Setting or removing the oracle clears the price. No minting until the new oracle feeds |

## Spending gamma

The deposit's own hotkey spends it. It signs `spend_gamma`, naming a service's hotkey on the subnet and an amount:

1. Your hotkey spends gamma from its deposit at the service's hotkey.
2. The spent gamma is destroyed, and the chain adds it to the running total your hotkey has spent at that service.
3. The service reads that total at a finalized block and credits your hotkey with the increase.
4. You send requests to the service, signed with your hotkey, and the service draws on your credit.

| Rule | Detail |
|---|---|
| No fee | `spend_gamma` pays no transaction fee, so the hotkey needs no TAO. The chain refuses a spend that would fail before it enters a block |
| Minimum | 0.1 gamma, unless the spend empties the deposit |
| Limits | Within the deposit's balance and what its daily cap allows right now |
| One at a time | A hotkey has one spend pending per subnet. A second is refused until the first is in a block |
| Services only | A spend at a hotkey with no service on the subnet is refused (`ServiceDoesNotExist`) |
| Spent to zero | The deposit stays open with its cap, ready to refill, until its coldkey closes it |

### Daily caps

The coldkey sets, changes or removes a deposit's daily cap with `set_gamma_deposit_daily_spend_cap`.

| Rule | Detail |
|---|---|
| Values | 0 pauses the deposit. Any other cap is at least 0.1 gamma |
| Refill | What the cap allows refills evenly at the cap per 7,200 blocks (about a day), up to the cap |
| New cap | A cap set where there was none starts full |
| Changed cap | Keeps what it allows now, up to the new cap. Ending a pause refills from zero |

### Moving and closing

`move_gamma` moves gamma between your own hotkeys on one subnet. A move takes the whole balance, or at least 0.1 gamma while leaving at least 0.1. A move to a hotkey with no deposit opens one with the origin's daily cap. A move that empties the origin closes it. Moving the whole balance to another hotkey revokes the old hotkey's access to it.

`close_gamma_deposit` closes an empty deposit.

## Services

A validator (a hotkey with a validator permit on the subnet), or the subnet owner for its owner hotkey, publishes a **service** with `set_service`. A service is a URL (up to 256 bytes) to a document that says what the services are, how to reach them and how they are paid for. The coldkey that owns the hotkey signs it and pays a normal fee. Publishing an empty URL removes the service.

The validator permit is checked when the service is published. A service follows a hotkey swap, but what was spent at it stays under the old hotkey, so a service lists its old hotkeys in its document. A service is removed when its neuron is deregistered. The service of the subnet owner's hotkey is marked as the owner's. On a leased subnet, the beneficiary publishes the owner's service through its `SubnetLeaseBeneficiary` proxy.

Anyone with a validator permit can publish any URL, including one that points to another service's document. The document lists the hotkeys allowed to publish it, so spend only at a hotkey that the service's own document lists.

Example: a provider runs inference on a subnet.

1. The subnet owner switches gamma on for the subnet.
2. The owner publishes a service from its owner hotkey: a URL to a document describing its API.
3. You create a fresh hotkey, mint gamma onto it, and set a daily cap.
4. Your hotkey spends gamma at the owner's service hotkey. The spent gamma is destroyed.
5. You call the API, signing requests with your hotkey. The service checks what your hotkey has spent and serves against it.

## Gamma from emission

A subnet owner can also pay part of the subnet's own emission into another subnet's gamma. These are **gamma shares** in the subnet's [emission split](https://beta.taostats.io/docs/concepts/protocol-changes/etao#gamma-shares):

- Each share names one target subnet and takes at most **10%** of the subnet's `alpha_out`. A subnet can have up to 16 shares. The five ordinary slots and the gamma shares together sum to 100%.
- A target must have gamma switched on and be **whitelisted by root** (`sudo_set_subnet_gamma_emission_whitelisted`). A subnet can't target itself, and a subnet under a lease can't have gamma shares.
- Each block, the gamma shares of `alpha_out` accrue. At the subnet's epoch they are split between the targets and converted: the chain sells the subnet's alpha, buys the target's alpha with all of the TAO, and burns it. Each side trades within 2% of the higher (sale) or lower (purchase) of its fast-moving and spot prices.
- The gamma, valued the same way as a [mint](#how-much-gamma-you-get), goes to the **subnet owner's** deposit at the subnet owner hotkey on the target. `GammaEmissionMinted` reports each conversion.
- Alpha that can't convert in one go (price outside the 2% band, pool too small, stale TAO/USD price, gamma switched off on the target, or under 0.1 gamma) waits for the next epoch.
- If root removes a target from the whitelist, or the target is dissolved, its share moves to the subnet's miner slot and its unconverted alpha goes to the miners.

> [!WARNING]
> **Emission deposits open paused**
>
> When gamma emission opens a new deposit at the owner hotkey, the deposit has a daily cap of **0**, so the owner hotkey can't spend it yet. The owner coldkey sets a cap, or removes it, to start spending. An existing deposit keeps its cap.

This lets one subnet pay for another subnet's service out of emission, for example compute or storage it relies on, without the owner selling alpha first.

## What you can and can't do

| Can | Can't |
|---|---|
| Move gamma between your own hotkeys on one subnet | Send it to another coldkey |
| Let someone else spend gamma by opening a deposit on a hotkey they hold, and move it back at any time | Turn it back into alpha or TAO |
| Hold up to 64 deposits per subnet | Use it on another subnet |

Gamma is deliberately not transferable between coldkeys. A transferable credit would let a subnet push its emissions into another subnet's gamma and sell it.

## Proxies

| Proxy type | Gamma calls allowed |
|---|---|
| `Any` | All, including spending |
| `NonCritical` | Mint, move, set or remove the daily cap, close, publish a service. Not spending |
| `NonTransfer` | Close an empty deposit only. It can't mint, move, lift a cap or publish a service, so it can't hand itself spending power |
| `SubnetLeaseBeneficiary` | Publish the leased subnet owner's service |
| `NonFungible` | None |
| `GammaSpend` | None. Deprecated |

Spending is signed by the deposit's hotkey, so only an `Any` proxy of that hotkey can spend for it.

## Effect on the subnet

Minting buys the subnet's alpha (when paying with TAO) and burns it, so alpha supply shrinks and the TAO stays in the subnet pool. Spent gamma pays the service nothing on chain. The value of the burned alpha goes to the subnet's alpha holders. The subnet's own costs are still paid from its emissions.

## Risks

| Risk | Detail |
|---|---|
| Leaked hotkey | Whoever holds a deposit's hotkey can spend it, up to its daily cap. The coldkey pauses it (cap 0) or moves the gamma to a new hotkey |
| Subnet removed | All of the subnet's gamma is destroyed, and what was spent at its services is cleared. Holders get nothing |
| No claim | Gamma gives no claim on anyone. Each subnet decides whether, and at what prices, it accepts its gamma |
| Trusted price oracle | A compromised oracle can raise the accepted price by about 2% an hour, about 61% a day, until root replaces it or switches gamma off |
| Hotkey swap | The coldkey's deposit at the old hotkey moves to the new hotkey, so the old hotkey can no longer spend it. If the new hotkey already holds another coldkey's deposit, the old deposit is paused instead. What the old hotkey spent at services stays under it |
| Coldkey swap | Your deposits move to the new coldkey. The swap fails if the new coldkey would hold more than 64 deposits on a subnet. While a swap is announced, your own gamma calls are refused, but your deposits' hotkeys can still spend |
| Not checked on chain | The chain records gamma spent at a service, but can't check the service was delivered |

## btcli

```bash
# TAO/USD price, and the gamma deposits of your coldkey
btcli query tao-usd-price
btcli gamma list
btcli gamma show --netuid 28 --hotkey <api-hotkey>

# Find a subnet's services
btcli query services --netuid 28

# Mint with TAO and cap daily spending from the start, or mint with alpha you already have staked
btcli wallet new-hotkey -H <api-hotkey>
btcli gamma mint --netuid 28 --hotkey <api-hotkey> --amount-tao 10 --daily-spend-cap-gamma 5
btcli gamma mint-with-stake --netuid 28 --hotkey <api-hotkey> --origin-hotkey <staking-hotkey> --amount-alpha 50

# Spend at a service, signed by the deposit's hotkey
btcli gamma spend --netuid 28 --service-hotkey <service-hotkey> --amount-gamma 5 -H <api-hotkey>

# Change, pause or remove the daily cap
btcli gamma set-cap --netuid 28 --hotkey <api-hotkey> --daily-spend-cap-gamma 5
btcli gamma set-cap --netuid 28 --hotkey <api-hotkey> --daily-spend-cap-gamma 0
btcli gamma set-cap --netuid 28 --hotkey <api-hotkey> --remove-cap

# Move gamma back from a hotkey you gave someone, then close the empty deposit
btcli gamma move --netuid 28 --origin-hotkey <their-hotkey> --destination-hotkey <api-hotkey> --amount-gamma all
btcli gamma close --netuid 28 --hotkey <their-hotkey>

# Publish a service (validator or subnet owner hotkey)
btcli tx set-service --netuid 28 --url https://example.com/services.json -w <coldkey> -H <hotkey>
```

## What it means for Taostats data

- **Deposits:** per subnet, per coldkey and per hotkey, with balance and daily cap.
- **Mints:** `GammaMinted` events with TAO paid, alpha burned, value and gamma. TAO mints also count as TAO inflow to the subnet.
- **Burns:** gamma minting, by users and from emission, is a new source of burned alpha.
- **Gamma from emission:** each subnet's gamma shares and targets, the whitelist, and `GammaEmissionMinted` conversions (alpha sold on the paying subnet, alpha bought and burned on the target).
- **Spending:** `GammaSpent` events (subnet, hotkey, service, amount), and the running total each hotkey has spent at each service. Gamma spent per service is the closest on-chain signal of a service's paid usage.
- **Services:** a per-subnet list of published services (hotkey and URL), with the owner's service marked.
- **Prices:** each subnet's gamma price and the accepted TAO/USD price.

> [!NOTE]
> **Previously**
>
> Before spec 493 (block 9,549,412, 2026-11-20), each deposit named a separate spender account that charged it in batches, and services named that spender. The upgrade removed spenders, deprecated the `GammaSpend` proxy type, and paused the subnet owner's uncapped deposit at its owner hotkey.

Source: subtensor `main` at [`a68c6e8`](https://github.com/RaoFoundation/subtensor/tree/a68c6e8c65411a842fbf69269dc385aa13041391) (gamma in [PR #3294](https://github.com/RaoFoundation/subtensor/pull/3294), gamma emission in [release 489](https://github.com/RaoFoundation/subtensor/pull/3308), hotkey spending in [PR #3343](https://github.com/RaoFoundation/subtensor/pull/3343); `subnets/gamma.rs`, `subnets/serving.rs`, `subnets/tao_usd_price.rs`, runtime proxy filters, `docs/guides/gamma.mdx`, `docs/guides/services.mdx`) · [Gamma, explained (Rufus)](https://s3.hippius.com/rufus/public/gamma-explained.html)
