# MIP - Peer-to-peer index cursors update

**URL:** <https://forum.morpho.org/t/mip-peer-to-peer-index-cursors-update/250>\
**Category:** General\
**Created:** [January 20, 2023, 10:27am UTC](https://forum.morpho.org/t/mip-peer-to-peer-index-cursors-update/250 "2023-01-20T10:27:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MorphoLabs](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.morpho.org/morpholabs/32/633_2.png) [@MorphoLabs](https://forum.morpho.org/u/MorphoLabs)\
**Post date:** [January 20, 2023, 10:27am UTC](https://forum.morpho.org/t/mip-peer-to-peer-index-cursors-update/250/1 "2023-01-20T10:27:45Z")

</div>

## Summary

Morpho Labs proposes to update the peer-to-peer index cursor \alpha on every market of Morpho where the peer-to-peer is enabled. This change should encourage further peer-to-peer matching of the liquidity. Here are the proposed values for the peer-to-peer index cursors:

**Morpho-Aave:**

| Market | DAI | WETH | USDC | USDT | WBTC |
| --- | --- | --- | --- | --- | --- |
| \alpha | 31.5% | 47.4% | 41.5% | 70.9% | 45.4% |

**Morpho-Compound:**

| Market | USDT |
| --- | --- |
| \alpha | 58.4% |

## Context

The peer-to-peer rate proposed by the Morpho protocol is defined as r^{P2P}=\alpha\times r^B+(1−\alpha) \times r^S where r^B and r^S are the underlying pool’s borrow and supply rates. The \alpha coefficient is called the _P2P index cursor_ and represents the percentage of the spread where the peer-to-peer rate sits. Since the launch of the Morpho protocol, the peer-to-peer index cursor has positioned set to one-half of the spread (taking into account the rewards on Morpho-Compound).

## Methodology

To calculate the peer-to-peer index cursors, we introduce a curve depending on the utilization, similar to the rate curve of Aave and Compound. The utilization of a Morpho market is defined as U\_M=\frac{B}{S}, where B is the total borrowed amount and S is the total supplied amount (both on pool and in peer-to-peer). Note that the utilization is not necessarily lower than one on each Morpho market.

The proposed curve, described below, is meant to be a guideline to update the peer-to-peer index cursors as the different markets’ utilization varies. The curve should be designed so that it is symmetric on the borrow and on the supply side but also includes a bounded index cursor range and a tunable slope.

The proposed model is a simple one meeting the desired requirements:

\alpha = max( \alpha\_{floor},min(s\*log(U\_M)+K , \alpha\_{ceiling})

Where:

K= \alpha\_{target}-s\*log(U\_{target})

There are five parameters in this formula, and their meaning and choice of numerical value is explained below:

- \alpha\_{floor} and \alpha\_{ceiling} are the floor and ceiling values of the index cursor. They are necessary to bound the range of accessible index cursors. Since the underlying pool may be distributing rewards to its users, the spread is reduced to a “virtual spread” corresponding to the borrow/supply rate minus/plus the earnings “rate” of the rewards. • Note that if the spread is inverted on a given market because of the rewards, peer-to-peer matching is disabled on it. For Morpho to be better than the underlying protocol, the index cursor has to be within these modified bounds. Thus \alpha\_{floor}, \alpha\_{ceiling} are chosen to match the boundaries of the “virtual spread”.
- U\_{target} is the targeted utilization, representing the optimal operating point of the protocol. In Morpho, U\_{target} is equal to 1 when there is as much supply as borrow.
- \alpha\_{target} is the peer-to-peer index cursor at the targeted utilization. It is set to \frac{1}{2} as a first approximation, where borrowers and suppliers have the same absolute rate improvement.
- s is the slope of the logarithmic curve. It is chosen based on the existing data on the markets of Morpho, such that the variations of the historical utilization are included in the non-constant part of the curve. For simplicity, a single value of s=0.2 is derived for all markets, which makes the curve reach zero at U=0.1 and one at U=10.

In summary:

| Parameter | U\_{target} | s | \alpha\_{target} | \alpha\_{floor} | \alpha\_{ceiling} |
| --- | --- | --- | --- | --- | --- |
| Numerical value | 1 | 0.2 | \frac{1}{2} | \frac{r^S\_{virtual}-r^S}{r^B-r^S} | \frac{r^B\_{virtual}-r^S}{r^B-r^S} |

An example curve for this model is given below, with \alpha\_{floor}=0.1 and \alpha\_{ceiling}=0.8, on a logarithmic scale:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/morpho/original/1X/7b3d3aedfbc6dae68f7f61ad7d079c8a8dc6bde9.jpeg)

For more stable results, the utilization used for the computation is averaged over one month.

The results are presented in the summary.

## Next steps

After a discussion with the community, Morpho Labs will push a proposal on Morpho’s Snapshot.

---

<div class="post-metadata">

**Author:** ![MathisGD](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.morpho.org/mathisgd/32/167_2.png) [@MathisGD](https://forum.morpho.org/u/MathisGD)\
**Post date:** [January 26, 2023, 4:27pm UTC](https://forum.morpho.org/t/mip-peer-to-peer-index-cursors-update/250/2 "2023-01-26T16:27:53Z")

</div>

[The proposal is live !](https://snapshot.org/#/morpho.eth/proposal/0xd1f562976f7e589077f7ed2eff17789ada56c342a2af1d3bc470a0bd2b7c1716)

---

<div class="post-metadata">

**Author:** ![MathisGD](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.morpho.org/mathisgd/32/167_2.png) [@MathisGD](https://forum.morpho.org/u/MathisGD)\
**Post date:** [January 27, 2023, 4:57pm UTC](https://forum.morpho.org/t/mip-peer-to-peer-index-cursors-update/250/3 "2023-01-27T16:57:22Z")

</div>

Here are the instant rate changes induced by the proposal:

```auto
                aWBTC aDAI aUSDC aWETH aUSDT
Current 0.65% 2.11% 2.33% 2.26% 3.21%
Proposed 0.6% 1.86% 2.23% 2.21% 3.38%

```

---

<div class="post-metadata">

**Author:** ![MathisGD](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.morpho.org/mathisgd/32/167_2.png) [@MathisGD](https://forum.morpho.org/u/MathisGD)\
**Post date:** [February 12, 2023, 6:30pm UTC](https://forum.morpho.org/t/mip-peer-to-peer-index-cursors-update/250/4 "2023-02-12T18:30:48Z")

</div>

The transaction was just executed ! The new peer-to-peer index cursors are applied from now on.
