> For the complete documentation index, see [llms.txt](https://ston-fi.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ston-fi.gitbook.io/docs/developer-section/dex/farm.md).

# 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](/docs/developer-section/dex/farm/stake.md)
* [Claim Rewards](/docs/developer-section/dex/farm/claim.md)
* [Unstake from Farm](/docs/developer-section/dex/farm/unstake.md)
* [Destroy Farm NFT](/docs/developer-section/dex/farm/destroy.md)
