# AMM Liquidity Mining

## Overview

There are two ways to do add Liquidity & mine DERI. One is to add liquidity to our in-house pools([mining-amm-liquidity-mining](https://docs.deri.io/how-it-works/mining-amm-liquidity-mining "mention") or to add liquidity in existing, predefined spot DEX trading pairs (PancakeSwap & Sushiswap) to increase spot liquidity. In both cases, Liquidity Miner, earn DERI

This article deals with AMM Liquidity Mining by providing liquidity to in-house pools.

## Install Metamask or supported mobile dApps

\
**Desktop**: We're supporting the Desktop version of the Metamask wallet for interaction with Deri Protocol.

\
**Mobile:** We're supporting various mobile dApps wallets & are also working on supporting more dApps.

* *Metamask*
* *imToken*
* *Math Wallet*
* *Trust Wallet*
* *Bitkeep Wallet*
* *ONTO Wallet*
* *TockenPocket*
* *Coin98*
* Safepa

## **Add Liquidity**

**Step 1**: Visit the official website of Deri protocol: [https://deri.io](https://deri.io/). Click ‘Pools’ to enter the liquidity mining.&#x20;

<figure><img src="https://2303190827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MWcJcJ-o4endOrYuRje-887967055%2Fuploads%2F0kd19hq7rO5VRe6FGEFy%2F1.png?alt=media&#x26;token=7fdce047-1645-478a-b879-75399c380051" alt=""><figcaption></figcaption></figure>

**Step 2**: Click “Connect Wallet”, connect your wallet to Deri Protocol, and select “AMM Liquidity Mining”.&#x20;

<figure><img src="https://2303190827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MWcJcJ-o4endOrYuRje-887967055%2Fuploads%2FUDBb2YBt7RPGUEj9l25v%2F2.png?alt=media&#x26;token=682d27c9-1b0f-48e6-bb79-9f28303684f7" alt=""><figcaption></figcaption></figure>

**Step 3:** Select the chain you’d like to stake on, take 'Arbitrum' as the example. Then, select the base tokens to add as liquidity, take the “USDC” base token as the example. Note that different pool supports a number of different base tokens with different APYs. Choose according to your own preferences and requiries.&#x20;

<figure><img src="https://2303190827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MWcJcJ-o4endOrYuRje-887967055%2Fuploads%2FMvJ2a8Dnb2PHBgjTQGPk%2F3.png?alt=media&#x26;token=1fc33c03-3d2f-439f-8969-97ab468e3cc3" alt=""><figcaption></figcaption></figure>

**Step 4**: Enter the USDC amount you’d like to add as liquidity at the “ADD” section (The amount can not exceed your wallet balance). Or you can choose to add in proportion to your wallet balance. Then click the ”Add Liquidity”. <br>

<figure><img src="https://2303190827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MWcJcJ-o4endOrYuRje-887967055%2Fuploads%2FmsGTMVUFxUwxILe1imwM%2F4.png?alt=media&#x26;token=c1713f02-119e-43a0-8c51-98efc13ac558" alt=""><figcaption></figcaption></figure>

**Step 5**: Wallet will pop up for approval. Click “Confirm” to approve and the hint will prompt you that the staking is successful. Once the transaction is validated on-chain, you can see your liquidity information in the “pool Info”. The base token you added as liquidity will be marked with the tick tag.

<figure><img src="https://2303190827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MWcJcJ-o4endOrYuRje-887967055%2Fuploads%2FlieS69heWAibtxk8YWQl%2F5.png?alt=media&#x26;token=25f6dad7-ab64-418a-9c1d-a208e3d799ab" alt=""><figcaption></figcaption></figure>

### **Claim DERI rewards**

**Congratulations!** You can withdraw your liquidity at any time. DERI rewards are calculated and distributed per block based on LPs’ liquidity percentage.

In 'Claimbale Rewards' section, Click 'Claim' to claim DERI rewards.

<figure><img src="https://2303190827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MWcJcJ-o4endOrYuRje-887967055%2Fuploads%2Fznuxsv8tnVSkW4Ywn6Up%2F6.png?alt=media&#x26;token=c8a2ed3d-faf9-4899-ad2a-7735781bbb0f" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**What exactly happens to my liquidity when I am AMM liquidity mining?**&#x20;

\
Your liquidity is added & stored on the specific smart contract of the respective chain, which acts as a counterparty to the traders position. It is subject to a certain market risk, for more information regarding potential risks and profits, check out How it works [mining-amm-liquidity-mining](https://docs.deri.io/how-it-works/mining-amm-liquidity-mining "mention")article or [mining-faq](https://docs.deri.io/library/faqs/mining-faq "mention")
{% endhint %}

### **Remove Liquidity**

**Step 1:** You can withdraw your liquidity at any time by clicking”Remove”. Enter the token amount or select the percentage of liquidity you’d like to remove (e.g 100%), then click” Remove Liquidity”.<br>

<figure><img src="https://2303190827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MWcJcJ-o4endOrYuRje-887967055%2Fuploads%2FCMvoLjBkXZlBZ3H7jmi9%2F7.png?alt=media&#x26;token=d7c6ee0b-0c1f-4e06-a625-79363e51eefb" alt=""><figcaption></figcaption></figure>

**Step 2**: Wallet will pop up for approval. Click “Confirm” to approve and the hint will prompt you that the removal is done. After the transaction is validated on-chain, your pool balance information will be adjusted depending on how much liquidity you’ve removed. In the case you removed everything, the tag “Staked” will be removed too.&#x20;

<figure><img src="https://2303190827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MWcJcJ-o4endOrYuRje-887967055%2Fuploads%2F2UdWtD50IzQ212lbpEzi%2F5.png?alt=media&#x26;token=fed60204-6632-497f-94b1-2121b5436317" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2303190827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MWcJcJ-o4endOrYuRje-887967055%2Fuploads%2Fhnyw0TKbIDhQAprsesKX%2F8.png?alt=media&#x26;token=c5c49dad-ca78-45b7-be86-234f9edead75" alt=""><figcaption></figcaption></figure>

## Is the AMM Liquidity Mining on Deri pools risk-free?

No, it isn't.  In general, it is essential to comprehend that liquidity providers are the counterparts of traders on Deri Protocol. When traders realize profits, they do so at the expense of liquidity provider's provided liquidity. When traders realize losses or are liquidated, liquidity providers realize profits at the expense of traders.

Since it is very rare that all traders' positions are covered by an equal number of long and short contracts, liquidity providers step in to cover the difference between long and short positions (net position) with their liquidity. Therefore Liquidity mining on Deri Pools is subject to market risk&#x20;

However, please note that such market risk is different from the *impermanent loss* of spot exchanges (e.g. Uniswap or Sushiswap). First of all, the fact it is called "risk", instead of "loss", indicates that the LSV/mining PnL result could be negative but also positive (which depends on several factors such as funding & transaction fees, exceeding traders' profits & realizing them, etc.). Secondly, the probability of a negative result (a loss) on Deri liquidity mining pools is much smaller than that of typical spot exchanges due to the protection by arbitrageurs, although a certain market risk remains. \
\
You might think of liquidity mining on Deri as investing in a low-risk fund with potentially very high profit, whereas that risk-free liquidity mining is like depositing your money into a bank saving account.

Please refer to our [whitepaper](https://github.com/deri-finance/whitepaper/blob/master/deri_whitepaper.pdf) for further details regarding the protection by the arbitrage mechanism.


---

# 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.deri.io/mining/amm-liquidity-mining.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.
