The permissionless lending needs to achieve the following.

Current stage

LPs are also lenders.

Each borrower has two state variables: Collateral Ratio ($\text{CR}$) and Utilization Ratio ($\text{UR}$). Borrower borrows $y_0$ amount of $Y$ by collateralizing $x_0$ amount of $X$ at price ${\large p}{\scriptsize\text{borrow}}$. If the current price of $X$ in $Y$ is ${\large p}{\scriptsize\text{current}}$, then

$$ \text{CR}=\frac{{\large p}{\scriptsize\text{current}}x_0}{y_0}=\frac{{\large p}{\scriptsize\text{current}}}{{\large p}_{\scriptsize\text{borrow}}}. $$

Aggregate Liquidation LP should support interest collection. This can happen only if ${\large p}{\scriptsize\text{current}}>{\large p}{\scriptsize\text{borrow}}$. Then there must be enough liquidity to the left of ${\large p}{\scriptsize\text{current}}$ and to the right of ${\large p}{\scriptsize\text{borrow}}$. This is NOT Jain’s idea, where the liquidity to cover the debt is at the same place in the price space.

For each borrow position, we need to keep track of the liquidity that is available to liquidate it. We introduce

$$ \text{UR}\coloneqq\frac{\text{principal}+\text{interest}}{\text{unlocked range order tokens to the right}}=\frac{\text{P}+\text{I}}{\text{UT}}, $$

where

$$ \text{UT}=\sum_{\text{tick }:p_a>p_{\text{borrow}},\ p_b<p_{\text{current}}}\text{unlocked tokens in tick}. $$

Regarding $\text{UR}$

If UR is still shooting up, we can close someone’s position using some rule such as the person with the lowest CR