# APY calculation

The **Total APY** for each pool calculates in the pool asset.

Firstly we fetch and calculate several values:

* Supply rate APY (for leveraged lending)
* Borrow rate APY (for leveraged lending)
* Reward market state (which could include additional supply or borrow rates APYs)
* Leverage factor (which is multiplied by all the above APYs)

Then calculate the **Base APY** and **Reward APY** (subtracting Borrow from Supply).

For wstETH and ezETH, we also calculate the Liquidity staking APY, which we receive from third-party sources.

Finally, to get the **Total APY** we sum up the **Base APY** (and add its compound factor), **Reward APY**, and liquidity staking APY.


---

# 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.clip.finance/clip-finance-yield-strategies/apy-calculation.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.
