# Pool-to-Peer Mechanism

The Pool-to-Peer model is a mechanism of liquidity provision for perpetuals DEXs where trader's orders are instantly matched and executed against a pool of liquidity at the price published by a decentralized oracle. This model eliminates the need for traditional order books by creating a unified liquidity pool that serves as the counterparty to all trades.

***

#### There are two main entities in a pool-to-peer model:

{% columns %}
{% column %}

### **Liquidity Providers (LPs)**

The LPs are the users who deposit their assets in the pool which will in turn act as the liquidity against which other traders can trade and in return the LP provider earns fees. LPs essentially become the counterparty to all trader positions, earning a share of trading fees, margin fees, and liquidation penalties in proportion to their pool contribution.
{% endcolumn %}

{% column %}

### **Traders**

The Traders are users who want to use the DEX to long or short any assets available in the pool on their desired level of leverage. The Traders will collateralize their position using any asset and then gain the price exposure of the asset in the pool. When traders profit, they're paid from the pool; when they lose, their losses flow back to the pool, benefiting LPs.
{% endcolumn %}
{% endcolumns %}

***

### **Oracle-Enabled Execution**

The matching of the orders between the Traders and the collective of LPs in the pool is enabled by an external oracle price feed. This oracle system provides real-time market prices, allowing for instant trade execution without waiting for order book matching or dealing with slippage from insufficient liquidity at specific price levels.

***

<figure><img src="/files/9TCujgp48pHVHabJ3Xyq" alt=""><figcaption></figcaption></figure>

#### **Key Benefits**

<table data-header-hidden><thead><tr><th width="201.48828125"></th><th></th></tr></thead><tbody><tr><td><strong>Instant Execution</strong>:</td><td>No waiting for order matching</td></tr><tr><td><strong>Deep Liquidity</strong>: </td><td>Pool aggregates all LP contributions</td></tr><tr><td><strong>Minimal Slippage</strong>: </td><td>Oracle pricing eliminates bid-ask spreads</td></tr><tr><td><strong>24/7 Trading</strong>:</td><td>Always available liquidity for supported assets</td></tr></tbody></table>


---

# 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://docs.flash.trade/flash-trade/flash-trade-protocol/technical-architecture/pool-to-peer-mechanism.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.
