> For the complete documentation index, see [llms.txt](https://docs.tensorusd.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tensorusd.com/user-type/validator.md).

# Validator

### What Validators Do

Validators observe the TensorUSD auction contract on-chain, track which miners win liquidation auctions, and use those results to assign weights to miners on the Bittensor network. Those weights determine each miner's share of TAO emissions each epoch.

👉 [https://github.com/TensorUSD/subnet/blob/feat/refund/docs/validator.md](<https://github.com/TensorUSD/subnet/blob/feat/refund/docs/validator.md&#xA;>)

Every `AuctionFinalized` event is recorded. At the end of each epoch, the validator scores every miner's wins using this formula:

`bonus_ratio = min((winning_bid - debt_balance) / debt_balance, 0.20)`

`reward = 1.0 + bonus_ratio`

| Winning Bid vs Debt       | bonus\_ratio | reward |
| ------------------------- | ------------ | ------ |
| Exactly debt (bid = debt) | 0.00         | 1.0    |
| 10% over debt             | 0.10         | 1.1    |
| 20%+ over debt (capped)   | 0.20         | 1.2    |

* Minimum reward per win: 1.0
* Maximum reward per win: 1.2
* Multiple wins in the same epoch accumulate:

total\_reward(miner) = sum of reward(win\_i) for all wins in tempo window

***

### Weight Setting

Scores are smoothed over time using an exponential moving average (EMA), then submitted to the chain as weights:

`score = α × new_reward + (1 - α) × previous_score`

`weights = L1_normalise(scores)   →   submitted via subtensor.set_weights()`

Each miner's TAO emission share is proportional to their normalised weight. Miners that haven't won any auction in the epoch get no weight increase — their score decays toward zero via the EMA.

***

### How to Run

`uv run neurons/validator.py \`

&#x20; `--netuid 421 \`

&#x20; `--subtensor.network test \`

&#x20; `--wallet.name <wallet_coldkey> \`

&#x20; `--wallet.hotkey <wallet_hotkey> \`

&#x20; `--logging.info`

| Flag                       | Description                      |
| -------------------------- | -------------------------------- |
| `--netuid 421`             | Subnet UID to validate on        |
| `--subtensor.network test` | Connect to the testnet           |
| `--wallet.name test`       | Name of the local wallet         |
| `--wallet.hotkey default`  | Hotkey to use for this validator |
| `--logging.info`           | Enable info-level logs           |

***

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.tensorusd.com/user-type/validator.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
