> For the complete documentation index, see [llms.txt](https://usdfil.gitbook.io/main/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://usdfil.gitbook.io/main/yield.md).

# Yield

The following documentation explains how the displayed yield is estimated.

The protocol generates APY from yield-generating instruments, primarily funding rates and spot GLIF.

The APY estimate that is [displayed](https://usdfil.xyz/) is based on a **30-day rolling window**. The APY is derived from the **Internal Rate of Return (IRR)**, which accounts for the time-adjusted returns from the protocol's token flows over the time period.&#x20;

The estimated IRR is the discount rate $$r$$ that makes the **Net Present Value (NPV)** of token flows equal to zero. The NPV is:

$$0 = \sum\_{t=0}^{n} \frac{TF\_t}{(1 + r)^t}$$

Where:

* $$TF\_t$$​ is the token flow at time $$t$$,
* $$r$$ is the internal rate of return ($$IRR$$) solved for,
* $$t$$ is the time index,
* $$n$$ is the total number of time periods.

The net token flow is computed as the change in TVL minus the change in yield:

$$TF\_t=−ΔTVL+ΔYield$$

These token flows are then used to calculate the $$IRR$$ over the 30-day period.

The **Annual Percentage Yield (APY)** is calculated based on the 30-day $$IRR$$ using the following formula:

$$APY = (1 + IRR)^{365/30} - 1$$

Where:

* $$IRR$$  is the internal rate of return over the 30-day window,
* $$365/30$$ adjusts the 30-day return to an annualized return.

This method an up-to-date yield estimate that reflects the protocol's most recent performance, using a rolling 30-day window of token flows. The resulting APY gives a comprehensive measure of annual returns, incorporating compounding effects and time-based adjustments.\ <br>
