> For the complete documentation index, see [llms.txt](https://docs.wing.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wing.finance/rules/peer-to-peer-pool.md).

# Peer-to-Peer Pool

## &#x20;Pool Mechanism

The Peer-to-Peer Pool is built on the ordinary lending pool. When the user supplies assets in the Peer-to-Peer pool, the funds will be deposited into the ordinary lending pool through the Peer-to-Peer pool and enjoy the APR in the ordinary lending pool. It means that the supplier can enjoy the supply APR of the ordinary lending pool if not paired.

When a borrower participates in the Peer-to-Peer pool, the assets supplied by the suppliers into the ordinary lending pool through the Peer-to-Peer pool will be withdrawn and paired with the borrowing assets. At this time, since the capital utilization rate of both sides is 100%, the supplier and the borrower can enjoy more favorable interest rates. Suppliers will get higher interest rates and borrowers will get lower loan interest rates.

Currently, the ordinary lending pool is Compound V2 (<https://v2-app.compound.finance/>)

## Incentives in the Peer-to-Peer Pool&#x20;

First, the incentives for one asset will be allocated to Supply, Borrow with below ratios:

|     Pool    | Ratio |
| :---------: | :---: |
| Supply Pool |  50%  |
| Borrow Pool |  50%  |

Next, All Assets will share WING equally.&#x20;

Let's go through an example：

Say the WING distribution rate of the NFT Pool is 103.68 WING/day, and there are 5 assets in the pool with the asset values listed below:

<table><thead><tr><th width="280" align="center">Assets</th><th width="187.33333333333331" align="center">Supply</th><th align="center">Borrow</th></tr></thead><tbody><tr><td align="center">USDT</td><td align="center">$500</td><td align="center">$100</td></tr><tr><td align="center">USDC</td><td align="center">$200</td><td align="center">$500</td></tr><tr><td align="center">WETH</td><td align="center">$100</td><td align="center">$100</td></tr><tr><td align="center">COMP</td><td align="center">$200</td><td align="center">$200</td></tr><tr><td align="center">DAI</td><td align="center">$300</td><td align="center">$100</td></tr></tbody></table>

We calculate the WING distribution obtained by each asset Supply, Borrow are as follows:

<table><thead><tr><th width="115.33333333333331" align="center">Assets</th><th width="305" align="center">Supply WING distribution Amount per day</th><th align="center">Borrow WING distribution Amount per day</th></tr></thead><tbody><tr><td align="center">USDT</td><td align="center">103.68/5/2= 10.368</td><td align="center">103.68/5/2= 10.368</td></tr><tr><td align="center">USDC</td><td align="center">103.68/5/2= 10.368</td><td align="center">103.68/5/2= 10.368</td></tr><tr><td align="center">WETH</td><td align="center">103.68/5/2= 10.368</td><td align="center">103.68/5/2= 10.368</td></tr><tr><td align="center">COMP</td><td align="center">103.68/5/2= 10.368</td><td align="center">103.68/5/2= 10.368</td></tr><tr><td align="center">DAI</td><td align="center">103.68/5/2= 10.368</td><td align="center">103.68/5/2= 10.368</td></tr></tbody></table>

### **Incentives for a Wallet Address**

Last, say a user supplied WETH worth $100 and borrowed USDC worth $100. Based on the process above, the WING incentives this user earned on the day is: *$100/$100\*10.368+$100/$200\*10.368=15.552  WING*

## Supply and Borrow&#x20;

（1）Supply The asset supplied by the user in the Peer-to-Peer pool will be deposited in the ordinary lending pool to enjoy the interests. But when a user borrows that asset, which means that a Peer-to-Peer pairing is formed /the asset is paired, the supply asset will be withdrawn to the Peer-to-Peer pool. Then the Supply APR of the suppliers increases.

（2）Borrow Borrowers need to collateralize assets for borrowing. When a borrower enters the Peer-to-Peer pool to borrow some asset, the borrowed asset will be paired with the same supply asset. After paired, the borrower will enjoy the Peer-to-Peer borrow interest rate.

## **Token Incentives**

It should be noted that when the borrower and the supplier complete the loan at the Peer-to-Peer layer, there is no lending exposure at the ordinary lending pool layer, so they cannot obtain token distribution incentives. Therefore, for both borrowers and suppliers, when the reward from ordinary pool is higher than that of Peer-to-Peer pool, Peer-to-Peer lending mechanism will not be used for matching.

When the user's funds are in the ordinary lending pool, there are only COMP incentives. When the user's funds complete the Peer-to-Peer match, there are only pWING incentives.

## Rate and Interest

Peer-to-Peer Lending APR= a\*Borrow APR +(1-a)\*Supply APR&#x20;

“a” is a set constant in the range \[0,1]

Supply APR: The Supply APR of the token corresponding to the common lending pool

Borrow APR: The Borrow APR of the token corresponding to the common lending pool

By setting the value of “a”, we can adjust the degree of attraction of the Peer-to-Peer pool to the Suppliers and the Borrowers in the underlying pool.&#x20;

“a” actually represents the proportion of benefits obtained by both borrowers and lenders. In the initial stage, “a” can be set as 50%, which can be dynamically adjusted later according to market conditions. For example, the value of “a” can be increased to attract suppliers, so as to reduce the risk of contract liquidation.

Now a=50%.

**Example**: If the supply APY of one asset in ordinary pool is 2%, and the borrow APY of one asset in ordinary pool is 4%.

then P2P Borrow APY=P2P Supply APY=2%\*50%+4%\*50%=3%

## Liquidation and Auction&#x20;

Peer-to-Peer Pool does not have a front-end liquidation market, so liquidators need to liquidate at the contract level once the borrow limit is up to 100%. The liquidator can liquidate up to 90% of the collateral in a single liquidation, and the minimum liquidation is 5%.

Wing team has developed an automatic liquidation robot. If the borrower's Borrow Limit exceeds 100%, it will be liquidated by the liquidation robot in time.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.wing.finance/rules/peer-to-peer-pool.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
