# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dextr-protocol.gitbook.io/dextr-avmm-whitepaper-v3.0/liquidity-provisioning/lp-ranking-and-trade-settlement.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
