> For the complete documentation index, see [llms.txt](https://docs.altitude.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.altitude.fi/general/yield-generation-process/how-are-yields-distributed.md).

# How are yields distributed?

Generated yields are fully distributed to users after they (or someone else on their behalf) interacts with the protocol. At this point, any balance changes, resulting from previous harvests, are committed to the users’ account.

Distribution from each harvest performed based on the following calculation:

$$
uCh = ( uSh \* Ph \* vLTh - uBh ) \* nCh / ( vSh \* Ph \* vLTh - vUBh )
$$

where:

* uCh = user change resulting from the harvest
* uSh = user supply at time of the harvest
* Ph = price of the borrow asset at time of harvest
* vLTh = vault liquidation threshold at time of harvest
* uBh = user borrows at time of harvest
* nCh = net change in harvest (farm earnings - farm losses)
* vSh = vault supply at time of harvest
* vUBh = vault user borrows at time of harvest

The value of uCh is either subtracted from the users’ loan balance, or where no loan is due allocated to the user as claimable rewards. These can be claimed by the user at any time. These changes are all tracked in the borrow asset currency (e.g. USDC).

#### Possible adjustments

In order to remove any incentives for users to not contribute throughout the whole harvest period any rewards meeting the following criteria are allocated to the vault reserve:

* Rewards from users who’s loan-to-value is higher than the target threshold at the time of harvest
* Rewards accrued by users before their last interaction with the vault in this harvest period

For the avoidance of doubt, interest still accrues on the users’ original position until they have been committed. Therefore it may be beneficial for a user to directly commit their position by calling the commit function directly.

{% hint style="info" %}
**Why does the users original debt still accrue interest?** Of the net amount recognised during a harvest we don't know what percentage will be used to:

1. reduce user loans → with implications for debt interest on user positions
2. as claimableEarnings for users without a loan → no implications on debt interest for the user positions

As such without committing everyone after each harvest, we don't know how much debt that accumulates each harvest should be covered by individual users or the vault.
{% endhint %}


---

# 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 dynamically by asking a question.

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

```
GET https://docs.altitude.fi/general/yield-generation-process/how-are-yields-distributed.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
