# Yield Curve

<figure><img src="/files/UejDEPP2hJ3o6kaTVMxN" alt=""><figcaption></figcaption></figure>

The protocol currently uses a piecewise linear curve to let the market determine the current fixed rate yield. The market demand/supply is indicated by the ratio between `Total Yield` and `Idle Yield` (see [Yield Manager](/yield-manager.md)).&#x20;

At any point in time, `Total Yield` is tracked by

```
Total Yield = Idle Yield + Locked Yield
```

The best of the fixed term yield the protocol can offer, is the current yield. The worst the protocol can offer is 0 yield.&#x20;

Now let's consider the boundary case. When `Idle Yield / Total Yield = 1`, this means all yield is idle, i.e. there are a lot of LP2 (supply) but no LP1 (demand). In this case, new LP1 should get a good deal, so the right end of the curve is at the current yield.&#x20;

On the other end, when hen `Idle Yield / Total Yield = 0`, this means no yield is idle, i.e there are a lot of LP1 already (insufficient supply for the demand). In this case, new LP1 should shouldn't get a good deal, so the left end of the curve is at 0.

The curve in between is trying to let the market (demand vs supply) converges to a fixed yield rate.&#x20;


---

# 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.duo.exchange/yield-curve.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.
