# LP APY Methodology

RateX calculates and displays the APY of each contract by breaking down the composition of LPs, separately calculating the various sources of yield, and aggregating them based on weighted amounts.

1. **AMM APY.** The AMM APY consists of two components:
   1. **Fees APY**: This is the total swap fees earned over a rolling 7-day period in the AMM, expressed as a percentage of the average TVL for LPs during the same period.
   2. **Underlying APY**: The rolling 7-day APY of the underlying asset.
2. **Reserve APY.** The Reserve APY is based on the exposure of YT in the Reserve. The Reserve portion is divided into Synthetic PT and ST components, and each is calculated separately:
   1. **Synthetic PT APY**: The fixed APY of PT.
   2. **Underlying APY**: The rolling 7-day APY of the underlying asset.
3. **Base APY.** The **Base APY** is the sum of the AMM APY and the Reserve APY:

$$
\
{Base APY} = \text{AMM APY} + \text{Reserve APY}
$$

4. **Reward APY (if applicable).** If a reward is present, the **Reward APY** is calculated based on the dollar value of the reward token, which is determined by its quantity over the reward period, divided by the average TVL of LPs during the same period.
5. **Estimated Points APY (if applicable).** The **Estimated Points APY** is derived by subtracting the rolling 7-day APY of the underlying asset from the implied yield of YT. This reflects the expected value of points from YT holders.
6. **Total Combined APY.** The **Total Combined APY** is the sum of the Base APY, Reward APY (if any), and Estimated Points APY (if any):

$$
{Total Combined APY} = \text{Base APY} ; + ; \text{Rewards APY} ; + ; \text{Est. Points 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.rate-x.io/ratex/ratex-protocol/mechanism-of-leveraged-yield-trading/liquidity-provision/lp-apy-methodology.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.
