# Understanding APY

## Annual Percentage Yield (APY)

The Annual Percentage Yield (APY) dynamically adjusts to reflect the current utilization of our lending services. The APY on Mage Finance comprises several key components:

### Supply APY <a href="#supply-apy" id="supply-apy"></a>

This represents the base interest rate earned on supplied assets and varies with the value of the supplied assets.

### Borrow APY <a href="#borrow-apy" id="borrow-apy"></a>

This is the basic interest rate applied to borrowed assets, which increases with the size of the borrowed asset and can sometimes be negative, indicating a situation where interest is paid by borrowers.

### Net APY <a href="#net-apy" id="net-apy"></a>

The Net APY is calculated as follows:

Copy

```
Net APY = (Supply balance * Supply APY - Borrow balance * Borrow APR) / (Net worth)
```

It can be negative if Borrow(Base) APY doesn't cover the entire yield.

{% hint style="info" %}
Example: A user deposits 10 ETH and borrows 15,000 USDC.

Given:

* ETH price: $2500
* ETH Supply APY: 4%
* USDC Borrow APR: 6%

Calculations:

1. Supply balance: 10 ETH \* $2500 = $25,000
2. Borrow balance: 15,000 USDC = $15,000
3. Net worth: $25,000 - $15,000 = $10,000

Now, let's apply the formula:

Net APY = (Supply balance \* Supply APY - Borrow balance \* Borrow APR) / (Net worth) = ($25,000 \* 0.04 - $15,000 \* 0.06) / $10,000 = ($1,000 - $900) / $10,000 = $100 / $10,000 = 0.01 = 1%

Therefore, the Net APY for this user is 1%.
{% endhint %}


---

# 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://learn.elara.finance/understanding-apy.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.
