> For the complete documentation index, see [llms.txt](https://dextr-protocol.gitbook.io/dextr-avmm-whitepaper-v3.0/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dextr-protocol.gitbook.io/dextr-avmm-whitepaper-v3.0/liquidity-provisioning/lp-ranking-and-trade-settlement.md).

# LP Ranking & Trade Settlement

### LP Eligibility and Priority

In Dextr, liquidity prioritization follows a structured framework based on specific criteria:

**Eligibility Criteria:**

* **Active Range:** Only LPs with active price ranges relevant to the current Oracle Price are eligible.
* **Available Liquidity:** LPs with liquidity balances exceeding 10% of the order size are considered eligible.

**LP Priority:**

1. **Fee Quoted Priority:** LPs offering the lowest LP fees receive priority in trade settlement, ensuring competitive prices for traders.
2. **REP Points Priority:** When multiple eligible LPs quote the same fee, priority is given to those with higher REP Points balances.

{% hint style="info" %}
**Equal REP Points Balance Rule:** If multiple LPs have the same REP Points balances, the LP who created the position first is given the priority.
{% endhint %}

**Fee Distribution:**&#x20;

* Fees are distributed solely to LPs who settle the trade.
* If a single LP settles the trade alone, they retain 100% of the quoted fee
* When multiple LPs settle the trade, fees are split based on the settled trade value.&#x20;

<figure><img src="/files/GvdVOXECho3LHVtgsrKr" alt=""><figcaption><p>Trade Execution Flow</p></figcaption></figure>

### **Directly Matched Trades (DMT)**

If no eligible LPs match the user's intent, the AVS checks for "Coincidence of Wants" (CoW), where another trader has a complementary intent (e.g., selling the token the first user wants to buy at the same price).

**If Coincidence of Wants Exists:**

* The intents are matched directly without LP intervention.&#x20;
* Token balances for both users are updated in their modular smart accounts.&#x20;
* Only the protocol fee is applied; no LP fee will be charged from the trader since LPs are not involved in executing this trade.

**If No Coincidence of Wants Exists:**&#x20;

* In the absence of a CoW, the AVS searches external liquidity sources via aggregator services for a matching or better price.&#x20;

{% hint style="info" %}
Additional fees may be applicable when external liquidity sources are involved. These fees may be charged by the liquidity aggregators and liquidity sources.
{% endhint %}
