# Farm

Yield farming functionality for STON.fi liquidity providers.

## Overview

STON.fi farming allows LP token holders to earn additional rewards by staking their tokens in farming pools. This provides an extra incentive for liquidity providers beyond trading fees.

## How It Works

1. **Provide Liquidity**: Add tokens to a DEX pool to receive LP tokens
2. **Stake LP Tokens**: Deposit LP tokens into a farming pool
3. **Earn Rewards**: Accumulate farming rewards over time
4. **Claim & Unstake**: Harvest rewards and withdraw LP tokens when desired

## Key Features

* Multiple farming pools with different reward rates
* Flexible staking and unstaking
* Real-time reward accumulation
* NFT-based position tracking

## SDK Integration

The farming functionality is integrated into the STON.fi SDK:

```typescript
import { Farm } from '@ston-fi/sdk';

// Stake LP tokens
await farm.stake({
  lpTokenAmount: amount,
  farmAddress: farmAddress
});

// Claim rewards
await farm.claimRewards({
  farmNftAddress: nftAddress
});
```

## Available Operations

* [Stake in Farm](/developer-section/dex/farm/stake.md)
* [Claim Rewards](/developer-section/dex/farm/claim.md)
* [Unstake from Farm](/developer-section/dex/farm/unstake.md)
* [Destroy Farm NFT](/developer-section/dex/farm/destroy.md)


---

# 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.ston.fi/developer-section/dex/farm.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.
