> For the complete documentation index, see [llms.txt](https://chi-protocol.gitbook.io/chi-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chi-protocol.gitbook.io/chi-docs/concepts/dual-stability-mechanism-dsm.md).

# Dual Stability Mechanism (DSM)

## Introduction to the DSM&#x20;

The Dual Stability Mechanism (DSM) is the cornerstone of Chi Protocol, making USC the first capital-efficient stablecoin in DeFi that minimises counterparty risks without relying on centralised exchanges (CEXes) or exposing itself to censorable collateral. The DSM ensures USC's solvency and stability while generating protocol-level rewards for all stakeholders. This innovative mechanism allows USC to operate securely and efficiently, aligning with the decentralised ethos of DeFi.

<figure><img src="/files/ZGCN5tPlyNT3zn1wRdWv" alt=""><figcaption><p>Dual Stability Mechanism Scenarios</p></figcaption></figure>

## What is the DSM?

The Dual Stability Mechanism (DSM) is the integrated system that enables USC to maintain its $1 peg on external markets while preserving a 1:1 collateralisation ratio with USD against the protocol’s reserves. The DSM considers two main factors:

### 1. USC Price&#x20;

Subject to the market demand for USC and fluctuations in the price of ETH, the market price of USC can trade in the following ways:

{% tabs %}
{% tab title="Above $1" %}

<figure><img src="/files/cJRegEYCFYHSfrtpnkbZ" alt=""><figcaption><p>State of USC Above $1</p></figcaption></figure>

{% hint style="success" %}
USC trades above $1 when:

1. **Increased Market Demand:** Users buy USC from the open market, driving up its price due to higher demand.
2. **ETH Price Appreciation:** The price of ETH rises, causing an imbalance in the USC/ETH liquidity pool on Uniswap (where the USD value of ETH exceeds the quantity of USC in the pool), leading to an upward pressure on USC's price.
   {% endhint %}
   {% endtab %}

{% tab title="At $1" %}

<figure><img src="/files/I1GN9mgTUmvZP7vGfble" alt=""><figcaption><p>State of USC At $1 </p></figcaption></figure>

{% hint style="success" %}
USC trades at $1 when:

1. **Stable Market Conditions:** There is no significant buy or sell pressure on USC from the open market, maintaining its equilibrium.
2. **ETH Price Stability:** The price of ETH remains constant, and the USC/ETH liquidity pool on Uniswap is balanced, meaning the USD value of ETH equals the quantity of USC in the pool.
   {% endhint %}
   {% endtab %}

{% tab title="Below $1" %}

<figure><img src="/files/sw26z3o5VfI76VXcSr0I" alt=""><figcaption><p>State of USC Below $1 </p></figcaption></figure>

{% hint style="success" %}
USC trades below $1 when:

1. **Increased Selling Pressure:** Users sell USC on the open market, driving its price down due to excess supply.
2. **ETH Price Decline:** The price of ETH decreases, causing an imbalance in the USC/ETH liquidity pool on Uniswap (where the USD value of ETH is less than the quantity of USC in the pool), leading to downward pressure on USC's price.
   {% endhint %}
   {% endtab %}
   {% endtabs %}

### 2. Reserve State&#x20;

Similarly, depending on ETH price fluctuations, the reserves of the protocol can be in the following states:

{% tabs %}
{% tab title="Excess Reserves " %}

<figure><img src="/files/evRC9MLHI0uKrIfF6mL0" alt=""><figcaption><p>State of Excess Reserves</p></figcaption></figure>

{% hint style="success" %}
**Excess Reserves:** When the price of ETH rises, the value of the protocol's reserves exceeds the total circulating supply of USC (`reserveValue > uscTotalSupplyValue)`. This state indicates that the protocol has more collateral than necessary, providing a buffer that enhances stability.
{% endhint %}
{% endtab %}

{% tab title="Equilibrium Reserves" %}

<figure><img src="/files/5JpyQTnp3M69HiJq4tNR" alt=""><figcaption><p>State of Equilibrium Reserves </p></figcaption></figure>

{% hint style="success" %}
**Balanced Reserves:** When the price of ETH remains stable and the value of the protocol's reserves matches the total circulating supply of USC ( `reserveValue = uscTotalSupplyValue`) the reserves are balanced. In this state, the protocol maintains a 1:1 collateralisation ratio, ensuring that USC is fully backed.
{% endhint %}
{% endtab %}

{% tab title="Deficit Reserves " %}

<figure><img src="/files/y78ivOSKNEDogA3s0iqz" alt=""><figcaption><p>State of Deficit Reserves </p></figcaption></figure>

{% hint style="success" %}
**Deficit Reserves:** When the price of ETH falls, the value of the protocol's reserves becomes less than the total circulating supply of USC  (`reserveValue < uscTotalSupplyValue`). This state indicates a shortfall in collateral, which may require corrective actions such as reducing the supply of USC to maintain the stability and solvency of the system.
{% endhint %}
{% endtab %}
{% endtabs %}

Based on the combination of market price of USC and the state of the protocol's reserves, the protocol defines and executes internal arbitrage opportunities. These scenarios create a total of nine possible arbitrage opportunities:

<details>

<summary><strong>Above $1:</strong></summary>

* Above $1 and Excess Reserves
* Above $1 and Equilibrium Reserves
* Above $1 and Deficit Reserves

</details>

<details>

<summary><strong>At $1:</strong></summary>

* At $1 and Excess Reserves
* At $1 and Deficit Reserves ( *USC In Arbitrage Contract ≥ Reserves Difference* )
* At $1 and Deficit Reserves (*USC In Arbitrage Contract < Reserve Difference*)

</details>

<details>

<summary><strong>Below $1:</strong> </summary>

* Below $1 and Excess Reserves
* Below $1 and Equilibrium Reserves
* Below $1 and Deficit Reserves

</details>

Following the execution of the arbitrage, USC retains the peg and full collateralisation in LSTs, LRTs, and ETH in USD denomination.

{% hint style="info" %}
**Note:** The delta represents the amount of USC that needs to be sold or bought back from the USC/ETH pool on Uniswap to adjust the price precisely to $1. For a deeper understanding of the mathematical logic behind delta calculation, visit our HackMD technical article: [Quadratic AMM](https://hackmd.io/@IceiDWpdTsmagGXND8BflA/S1D3UhXXa)
{% endhint %}
