# Yield Farming

Yield Farming allows users to earn reward tokens by staking user LP positions (in NFT form).&#x20;

When user stake the position, the liquidity in the user position will be transferred to farming pool position and used to calculate the LP shares over the TVL of the pool. By doing so, the position cannot be manipulated by supplying to an out-of-range etc as the amounts in the liquidity are used to calculate the shares and utilised as the liquidity of the pools.&#x20;

The ways of providing liquidity in DerpDEX:

* **Add Liquidity**

{% content-ref url="/pages/1fJmTwXQDmXvDKaQ294d" %}
[Add Liquidity](/home/getting-started/add-liquidity.md)
{% endcontent-ref %}

* Zap-to-Earn

{% content-ref url="/pages/icaTRB0aa4BskXinKBML" %}
[Zap-to-Earn](/home/products/zap-to-earn.md)
{% endcontent-ref %}

### Rewards

Reward tokens from yield farming could be multiple tokens. This is the benefits of the yield farming in DerpDEX, which working partnership with other project to incentivise DerpDEX LP.&#x20;

### APR Calculation

**Base APR**: LP trading fees based on the pool fee tier

**Farm APR**: Reward emission from farming pool

**totalShares**: Total Value Lock of the pool

**xDERP allocated**: Amount of xDERP allocated

**durationRemaining**: Remaining duration of reward emission

**total xDERP allocated**: Total allocation of the xDERP for the pool

**maxDuration**: Maximum duration of the reward emission

**userShares**: LP shares of the user position

**multiplier**: Multiplier of the reward emission

$$
Farm APR = \dfrac{(totalShares \* xDERP allocated \* durationRemaining)}{ (totalxDERPAllocated \* maxDuration)}
$$

#### Multiplier Calculation

$$
Multiplier = \dfrac{farmAPR + userShares}{userShares}
$$


---

# 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://derpdex.gitbook.io/home/products/yield-farming.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.
