> For the complete documentation index, see [llms.txt](https://abcdefs-organization.gitbook.io/ringo-documentation-1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://abcdefs-organization.gitbook.io/ringo-documentation-1/liquidity-risk.md).

# Liquidity Risk

The **liquidity risk** assessment in the **Ringo protocol** focuses on evaluating how easily positions can be entered or exited, especially during market stress or volatility. This ensures that assets within the protocol remain liquid, stable, and accessible.

**Liquidity Risk Components**

The liquidity risk is assessed separately for **Lending Pools** and **Automated Market Maker (AMM) Pools**, using distinct formulas and metrics tailored to each type of pool.

***

**1. Lending Pools Liquidity Risk (Rl,l)**

**Formula:** `Rl,l = wu * U + wc * Cd`

Where:

* **Utilization Rate (U):** Measures the proportion of deposited funds that are currently borrowed. A higher utilization indicates more of the pool is in use.
* **Deposit Concentration (Cd):** Reflects the potential impact of large withdrawals from the pool. If a few users control a large portion of the pool, the risk increases.

**Weights:**

* `wu`: Weight assigned to the **Utilization Rate (U)**.
* `wc`: Weight assigned to the **Deposit Concentration (Cd)**.

These metrics help gauge the pool’s ability to handle liquidity demands without significant slippage or withdrawal delays.

***

**2. AMM Pools Liquidity Risk (Rl,p)**

**Formula:** `Rl,p = wd * Dr + wc * Cr`

Where:

* **Depth Ratio (Dr):** Measures how the pool's total value locked (TVL) compares to the market’s liquidity requirements. It is calculated as:

  `Dr = 1 - min(Pool TVL / Target TVL, 1)`
* **Concentration Ratio (Cr):** Reflects how concentrated liquidity is among the largest liquidity providers. It is calculated as:

  `Cr = Largest LP Share / Total Pool TVL`

**Weights:**

* `wd`: Weight assigned to the **Depth Ratio (Dr)**.
* `wc`: Weight assigned to the **Concentration Ratio (Cr)**.

These metrics help assess the risk associated with liquidity being tied to a small number of providers or insufficient depth to accommodate large transactions.

***

**Role in Ringo Protocol**

* **Risk Mitigation:** By calculating the liquidity risk of both lending and AMM pools, the Ringo protocol can prevent liquidity shortages or inefficiencies, especially during high market volatility.
* **Dynamic Adjustments:** The protocol adjusts asset allocations dynamically based on these risk metrics, ensuring funds are allocated to pools with adequate liquidity and minimal exposure to potential liquidity crises.
* **Real-Time Monitoring:** The Ringo protocol continuously monitors liquidity risk, updating the risk metrics as market conditions change, allowing for real-time risk management and portfolio optimization.

***

**Conclusion**

Liquidity risk assessment in the Ringo protocol ensures that funds remain accessible and stable, minimizing the impact of liquidity challenges. By evaluating **Utilization Rate**, **Deposit Concentration**, **Depth Ratio**, and **Concentration Ratio**, the protocol can dynamically manage and mitigate risks in **Lending Pools** and **AMM Pools**, ensuring secure and efficient fund management.
