# UNIT's Algorithm

[*The UNIT* paper](https://github.com/toknowwhy/the-unit-paper/blob/main/the_unit_paper.pdf) describes the basis of the UNIT's algorithm. UNIT's algorithm aims to track what it would be to hold the top cryptocurrencies over the long haul.

## How to Obtain UNIT's Value

In short, the value of 1 UNIT comes from the relative price motions of the top cryptocurrencies. To follow the value of UNIT we display three charts of the value of 1 UNIT over time on our website: the [Bitcoin chart](https://app.unitindex.org/unit/btc) (denominated in SATS), the [Ethereum chart](https://app.unitindex.org/unit/ETH) (in Finney), and the [USD chart](https://app.unitindex.org/unit/USD).

## Calculating the Value of UNIT

First, we chose the first cryptocurrency ever created, Bitcoin, to price other coins in terms of that one.

We define the weight $$w\_{C, m}$$ of a coin $$C$$ on a given month $$m$$ as the market cap of that coin at the beginning of the month over the total market cap of all coins in the UNIT at the given month.

$$
w\_{C,m}= \frac{M\_{C,m}}{\sum\_iM\_{i,m}}
$$

As usual, the total market capitalization is calculated by adding the circulating supplies $$S\_i$$ times the price of each cryptocurrency in the UNIT, $$P\_{i}$$, in terms of the first cryptocurrency, Bitcoin.

$$
\displaystyle\sum\_{i} S\_iP\_{i}
$$

Let the UNIT on month $$m$$, $$Ø\_m$$, be defined by

$$
Ø\_m = \left(\sum\_{i}\frac{P\_{i,m}}{P\_{i,m-1}} w\_{i,m-1}\right) U\_{m-1}
$$

where $$P\_{i,m}$$ is the price of a coin $$i$$ in the Unit at month $$m$$ and $$w\_{i,m}$$ is the weight of a coin $$i$$ in the Unit at month $$m$$.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.unitindex.org/theunit/the-unit/algorithm.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
