# Gamma: subnet service credits (spec 488)

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, the subnet charges it as you use the service, and spent gamma is destroyed.

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

_Last reviewed: 2026-11-05_

> [!NOTE]
> **Deployed, switched off**
>
> Live on Finney from block **9,442,681** (2026-11-05 21:57:48 UTC), in runtime spec **488**. Gamma stays off until root switches it on network-wide (`sudo_set_gamma_enabled`), each subnet owner switches it on for their subnet, and root chooses a TAO/USD price oracle. None of these is set yet, so no subnet accepts minting.

## 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. The subnet charges it as you use the service, and charged 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. |
| Spender | The account allowed to charge a deposit. By default, the spender named by the subnet owner's service, or the subnet owner. |
| Price oracle | The one account, chosen by root, that posts the TAO/USD price on chain. |
| Service | A URL and a spender that a validator or the subnet owner publishes, so customers can find a subnet's service and know which spender to name. |

## 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 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 each deposit's spender and daily cap, close empty deposits |
| Customer hotkey | Holds a deposit and signs requests to the service, like an API key. It must be associated with the customer's coldkey, but doesn't need to be registered on the subnet |
| Validator or subnet owner hotkey | Publishes a service: a URL and the spender customers should name. The hotkey's coldkey signs it |
| Spender | Charges the deposits that name it, directly or through a `GammaSpend` proxy |
| Subnet owner | Switches gamma on for its subnet. Default spender for new deposits, unless its own service names another (on a leased subnet, the lease beneficiary takes its place) |
| Root | Switches gamma on network-wide and on any subnet, and chooses the price oracle |
| 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. That hotkey must first be associated with your coldkey (`try_associate_hotkey`, or by registering it), so nobody else can open a deposit on your API key. A new deposit opens with the default spender and no daily cap, unless the mint names a spender (directly, or by naming a service's hotkey) and a daily cap. If the deposit already exists with different terms, a mint that names terms fails.

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

1. You send a request to the subnet's service, signed with your hotkey.
2. The service reads that hotkey's deposit.
3. The spender charges the deposit (`spend_gamma`), up to its balance and daily cap.
4. The service serves what was charged.

| Point | Detail |
|---|---|
| Charge first | A spender should charge before serving, because you can change the spender or pause the deposit at any time |
| Batches | One `spend_gamma` call covers up to 512 entries. Entries it can't charge are skipped, not failed |
| Reference | Each entry can carry a 32-byte reference, repeated in its event, so customers can match each charge to their request |
| Daily cap | Optional per deposit. It refills evenly over 7,200 blocks (about a day). A cap of 0 pauses the deposit |
| Spent to zero | The deposit stays open with its spender and cap, ready to refill |

## Finding a subnet's service

A validator (a hotkey with a validator permit on the subnet) or the subnet owner, for its owner hotkey, can publish a **service** with `set_service`. A service is a URL (up to 256 bytes) to a document describing the subnet's services, plus the spender customers should name on their deposits. 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 and is removed when its neuron is deregistered. The service of the subnet owner's hotkey is marked as the owner's, and its spender is the default for new deposits. A service can name any spender, and that spender can charge deposits that name it without serving, so prefer the owner's service. On a leased subnet, the beneficiary publishes the owner's service through its `SubnetLeaseBeneficiary` proxy.

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 its API documentation, and the spender that bills.
3. You associate a fresh hotkey with your coldkey and mint gamma onto it, naming the owner's service so its spender can charge the deposit.
4. You call the API, signing requests with your hotkey.
5. The spender charges your deposit and the service answers. The charged gamma is destroyed.

## 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 use credits by moving gamma to a hotkey you give them, and take 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 |
| `NonCritical` | Mint, move, set spender and cap, close, publish a service. Not charging |
| `NonTransfer` | Close an empty deposit. Not minting, moving, changing the spender or cap, charging, or publishing a service |
| `GammaSpend` (new) | Charging only |
| `SubnetLeaseBeneficiary` | Publish the leased subnet's service |
| `NonFungible` | None |

## 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 subnet nothing further. 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 |
|---|---|
| Subnet removed | All of the subnet's gamma is destroyed. 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 until root replaces it or switches gamma off |
| 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 spenders can still charge you. A spender whose own swap is announced can't charge |
| Spender coldkey swap | Doesn't change any deposit's or service's spender. After an owner swaps coldkey, it republishes its service, and customers re-point their deposits |
| Not checked on chain | The chain records gamma charged, but can't check the service was delivered |

## btcli

```bash
# TAO/USD price, and every gamma deposit of your coldkey
btcli gamma price
btcli gamma list

# Find a subnet's services, and associate a fresh API-key hotkey
btcli query services --netuid 28
btcli wallet associate-hotkey --hotkey <api-hotkey>

# Mint with TAO, or with alpha you already have staked
btcli gamma mint --netuid 28 --hotkey <api-hotkey> --amount-tao 10 --service-hotkey <service-hotkey>
btcli gamma mint-with-stake --netuid 28 --hotkey <api-hotkey> --origin-hotkey <staking-hotkey> --amount-alpha 50 --service-hotkey <service-hotkey>

# Re-point the spender, or cap daily spending
btcli gamma set-spender --netuid 28 --hotkey <api-hotkey> --service-hotkey <service-hotkey>
btcli gamma set-cap --netuid 28 --hotkey <api-hotkey> --daily-spend-cap-gamma 5

# 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 and per coldkey, with balance, spender 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 is a new source of burned alpha.
- **Charges:** gamma spent per subnet, which is the closest on-chain signal of a subnet's paid usage.
- **Services:** a per-subnet list of published services (URL and spender), with the owner's service marked.
- **Prices:** each subnet's gamma price and the accepted TAO/USD price.

Source: subtensor [`v488`](https://github.com/RaoFoundation/subtensor/releases/tag/v488) (gamma merged in [PR #3294](https://github.com/RaoFoundation/subtensor/pull/3294); `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)
