# Account Health

## What is Account health?

In essence, Account health is a proportion between your Borrow Limit(Borrow Capacity) and your Borrow Capacity Used.

$$
BC\_{u} = \sum(CF\_a \* C\_{(u, a)} \*Deposit\_{(u,a)} \* Price\_a)
$$

where, for user *u* and asset *a:*

* *CF* is asset's Collateral Factor
* *C* is 1 for assets  used as collateral, otherwise 0
* *Deposit* is amount of asset deposited
* *Price* is the equivalent asset's price in U.S. Dollars&#x20;

$$
\\
BCU\_{u} = \sum((Borrow\_{(u,a)} \* Price\_a) / LT\_a)
$$

where

* *Borrow* is amount of asset borrowed
* *LT*  is Liquidation Threshold for the asset *a.*

Altogether,

$$
AccountHealth\_u = 1 - BCU\_u/BC\_u
$$

### Special case: Supply and Borrow in the same asset

It's a completely healthy situation to borrow the same asset as the collateral: Depositing amount *D* and borrowing amount *B* should effectively be seen as Deposit *D-B*, but only until Borrow starts exceeding Deposit. In this moment, a healthy account can become burned-out(with total negative saldo) and there's nothing liquidators can do about it.&#x20;

To prevent that, an *overlap\_factor* is introduced to smoothen the account health formula while still be tolerable with the same deposit-borrow asset:

If&#x20;

$$
Borrow\_{(u, a)} > C\_{(u,a)} \*Deposit\_{(u,a)}
$$

Then&#x20;

$$
BC\_{u,a} =0
\\
BCU\_{(u,a)} =( \frac{(Borrow\_{(u, a)} - C\_{(u,a)} \*Deposit\_{(u,a)})}{ LT\_a}  + OverlapCharge\_{(u,a)}) \* Price\_a
$$

Otherwise

$$
BC\_{u,a} = CF\_a \*(Deposit\_{(u,a)}- Borrow\_{(u,a)}) \* Price\_a
\\
BCU\_{(u,a)} = OverlapCharge\_{(u,a)} \* Price\_a
$$

Given

$$
OverlapCharge\_{(u,a)} = min(Borrow\_{(u, a)} , C\_{(u,a)} \* Deposit\_{(u,a)}) \* overlap\_factor
$$

{% hint style="warning" %}
Liquidators can liquidate part of your debt when your Account Health goes below 0.
{% endhint %}

## Why has my Account health changed?

Even if you don't interact with the protocol, your account health is subject to change:

* Your Deposit increased or decreased its value
* Your Borrows increased or decreased its value
* Interest on your deposits/borrows has been accounted.
* Your debt has been liquidated in order to increase your account health

## What is liquidation?

Liquidators can liquidate part of your debt when your Account Health goes below 0%. This means, when your Account Health goes below 0%, a liquidator can step in and take up to 50% of your debt for one asset and the corresponding amount of your deposit + premium. The related parameters(Liquidation Threshold and Liquidation Penalty) are listed in "Asset Parameters" section.


---

# 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.vires.finance/faq/account-health.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.
