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

# 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;
