# Yield Curve

<figure><img src="https://937219469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh4ZWHCVneRsZMvq7EPYQ%2Fuploads%2FlVJY6rEE6GCZvem6qtip%2FScreenshot%202024-03-24%20at%209.59.59%E2%80%AFAM.png?alt=media&#x26;token=f0d2f3cf-b75a-4302-a8df-500c9dd1d9b8" 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](https://docs.duo.exchange/yield-manager "mention")).&#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;
