What is yield farming?

The beginner's guide to yield farming

Yield farming is a crypto trading strategy employed to maximize returns when providing liquidity to decentralized finance (DeFi) protocols.

Yield farming operates within the realm of automated market makers (AMMs) like Uniswap and SushiSwap. These decentralized exchanges use liquidity pools to facilitate crypto asset trading without relying on traditional order books. 

Yield farmers contribute to these pools by depositing pairs of tokens, such as Ethereum and a stablecoin. These pools of digital assets enable other DeFi users to swap tokens at any time without needing to wait for a suitable counterparty.

In return for contributing liquidity, they receive liquidity provider (LP) tokens, which represent their share of the pool's assets. Each time a trader uses these liquidity pools to swap their tokens, they're charged a transaction fee. The protocol collectively distributes these fees among LP token holders. 

In some instances, DeFi platforms may also distribute native governance tokens to LPs as additional rewards. This helps to incentivize participation and decentralize decision-making that shapes the future of the protocol.

A wide range of other DeFi lending protocols exist that allow certain liquidity providers to stake their LP tokens. The secondary yield earned from this yield farming strategy may boost the potential returns a liquidity provider can make when participating in DeFi protocols.

LP holders must unstake their tokens and redeem them to receive any accumulated yields. The protocol automatically credits these rewards to the LP's connected crypto wallet.

Web3 image

The main components of yield farming


Yield farming consists of the following components:

  1. Cryptocurrency
  2. Liquidity Pools
  3. LP Tokens
  4. Smart contracts

Kraken helps you get started in yield farming and the most exciting parts of DeFi.

Get started by signing up for a Kraken account today.

How does yield farming work?


The process of yield farming can be intricate, involving several steps and considerations. Here is a simplified breakdown of the mechanics:

  1. Select a platform: Choose a DeFi platform that supports yield farming and offers the desired tokens for liquidity provision. Popular options include Curve (CRV), Compound (COMP), and yearn.finance (YFI).
  2. Provide liquidity: Deposit a pair of crypto tokens into a liquidity pool. For instance, you might provide equal amounts of Ethereum and a stablecoin like DAI. Protocols built on different blockchain networks may support different cryptocurrency assets.
  3. Receive LP tokens: Upon depositing, you'll receive LP tokens representing your share of the pool. You can stake these tokens on other platforms.
  4. Staking and yielding: Stake your LP tokens on the same platform or another one offering yield farming. This strategy can yield staking rewards in the form of additional tokens. Yield farming platforms often display rates as annual percentage yield (APY).
  5. Claim and reinvest: Periodically, yield farmers claim the rewards and decide whether to reinvest their yield farming returns to compound gains.

Risks of yield farming


While the potential for attractive yield farm returns exists, it is not without its risks. There are three main dangers all crypto traders must consider before trying to farm yields on DEXs.

  1. Impermanent loss
  2. Smart contract exploits
  3. Rug pulls

Impermanent loss

Because of the way liquidity pools work, liquidity providers can sometimes end up making a lower return on their deposited assets than if they had simply held them and not participated in a liquidity pool.

This problem is known as impermanent loss. Impermanent loss often occurs because of extreme volatility in the crypto market.

It's worth noting, however, that an impermanent loss is often an unrealized loss — meaning that it only becomes a realized loss if the LP decides to redeem their LP tokens when the value of their deposited tokens are lower.

In some cases, LPs may benefit from waiting for their transaction fees or staking rewards to offset any losses, or see if asset prices eventually recover over time if market volatility subsides.

Smart contract exploits

Smart contracts are crucial pieces of computer code that enable DeFi platforms to operate without human intermediaries.

However, in some cases, these software programs can contain bugs or vulnerabilities that attackers can exploit. Such bugs can lead to loss of funds or manipulation of rewards.

The Solana wormhole exploit is a leading example of how devastating a smart contract exploit can be. A hacker discovered a bug that enabled them to mint 120,000 wrapped wormhole Ethereum (whETH) without putting down any collateral. The hacker then simply redeemed the tokens for ETH totaling $320 million.

To prevent these issues, independent code audits can help to minimize this risk, but some vulnerabilities can still go unnoticed.

Rug pulls

A DeFi rug pull is a type of scam in the decentralized finance (DeFi) space where bad actors create a new project or protocol with its own native token. The actors create a liquidity pool for the new token and retain a vast majority of its circulating supply.

In the pool, the native token is paired with a more popular cryptocurrency such as ETH or a stablecoin. They then attract users to contribute to the liquidity pool and buy their crypto token by adding the popular crypto token into the pool to remove their project's token.

Eventually, once the pool has grown to a certain size, the founder(s) flood the liquidity pool with their stash of native tokens and remove all of the popular cryptocurrency.

This action sends the value of the project's native token to zero, leaving everyone holding a worthless cryptocurrency while they make off with the valuable cryptocurrency.

Popular yield farming platforms


aaveAave Price

$100.40
24H
Change
+2,09 %
High
101
Low
96

compCompound Price

$52.43
24H
Change
+0,91 %
High
53
Low
51

crvCurve Price

$0.30
24H
Change
+7,60 %
High
0,30
Low
0,27

uniUniswap Price

$7.97
24H
Change
+1,33 %
High
8
Low
8

yfiyEarn Price

$5 957.71
24H
Change
+2,42 %
High
5 967
Low
5 724

Get started with yield farming


Kraken lets you buy, sell and trade the leading cryptocurrencies that are shaping the DeFi ecosystem, including those in the yield farming space

Sign up for your Kraken account today to get started in the exciting world of decentralized finance and yield farming.