What is Yield Farming

Yield farming means depositing crypto into DeFi protocols to earn trading fees and token rewards. Key risks are impermanent loss, smart contract bugs

BASICS4 min readBy AlgoSys Editorial TeamPublished Apr 25, 2026Updated Jun 24, 2026
Contents

Yield farming (yield farming) is one of the key activities in decentralized finance (DeFi). The concept is simple: you lend your cryptocurrencies to a protocol, which then puts them to work, and in return, you receive a reward. The reward is usually in the form of additional cryptocurrencies, sometimes from transaction fees, and sometimes from new tokens issued by the protocol.

Most often, users encounter yield farming on decentralized exchanges (DEX) and lending protocols. These platforms are interested in having liquidity, so they reward those who provide it. For you, this is a way to earn passive income from assets that would otherwise just sit in your wallet.

Understanding how yield farming works is important for navigating the DeFi landscape. This strategy allows you to extract more value from your assets than simply holding them, and it is largely driving the growth and development of decentralized financial services.

KEY CONCEPTS

Yield farming is a strategy in DeFi where you lend your cryptocurrencies to a protocol to earn a reward. To make it easier, keep the following basic terms handy.

  • Liquidity pool: a set of cryptocurrencies locked in a smart contract, through which trades are made on DEX.
  • LP token: a token you receive after depositing assets into the pool, which confirms your share in it.
  • Staking: locking up cryptocurrencies in exchange for a reward to support the network or protocol.
  • Impermanent loss: the risk faced by liquidity providers that arises when the prices of the deposited assets diverge and holding them separately would be more profitable.
  • APY (annual percentage yield): the expected yield per year, taking into account compound interest.
  • Smart contract: self-executing code with agreement conditions that automates processes in DeFi.
  • Yield aggregator: a platform that automatically transfers your funds between protocols in search of the highest APY, relieving you of manual tracking of multiple platforms.

HOW IT WORKS

It all starts with you deciding to deposit assets into a specific protocol, whether it's a DEX or a lending platform. Let's take a concrete example: you deposit 1 ETH and 5,000 USDC into the liquidity pool of Uniswap V3.

In return, the protocol issues you LP tokens, which reflect your proportional share in the pool. The deposited assets themselves are then working: the protocol uses them to conduct trades of other users or issue loans, and each such operation generates a commission.

The reward can come from multiple sources at once. This includes a portion of the trading commissions of the pool and, in some cases, new governance tokens from the protocol itself. You can withdraw the accumulated reward by contacting the smart contract of the protocol, which also issues the payments.

EXAMPLES OF USE

To see yield farming in action, let's break down three typical scenarios, from the simplest to the more advanced.

Scenario What you deposit Where the income comes from
Liquidity for DEX A pair of tokens, such as DAI and USDC A portion of the trading commissions of the pool
Lending platform Stablecoins, such as USDT Interest from those who take loans
Yield aggregator Any assets under management The best available APY through rebalancing

In the first case, you put a pair of tokens into a pool on a DEX and receive a portion of the trading commissions each time someone exchanges these tokens between themselves. In the second, you deposit stablecoins into a lending protocol, your funds are borrowed by other users, and you receive interest on them. The third scenario automates the first two: the aggregator itself transfers your funds between protocols in search of the highest APY and moves assets between different lending and staking opportunities.

How not to fall into the trap of high APY: suspiciously high promised yields are almost always a sign of increased risk, not a gift. Behind three- and four-digit numbers often lies a new token whose price can plummet, or an untested smart contract. Before entering, check what the yield is composed of, how long the protocol has been working, and whether it has undergone an audit.

FREQUENTLY ASKED QUESTIONS

Yield farming strategies often intertwine multiple protocols. You deposit assets into one protocol, receive a reward in the form of tokens, and then use these tokens as collateral in another protocol for a new round of yield farming. Such layering amplifies potential profits but also increases complexity and risk.

It's essential to remember that the reward is not guaranteed and can fluctuate significantly. APY is influenced by market volatility, changes in protocol fees, and the emergence of new reward tokens, so it's essential to track the indicator regularly, not just once upon entry.

Despite the attractiveness of high yields, yield farming carries significant risks. The main headache for liquidity providers is impermanent loss. To this add smart contract vulnerabilities and the risk of scams (rug pulls), where creators drain liquidity and disappear. These threats should be kept in mind at every step of participation in DeFi.

FAQ

How does yield farming differ from traditional staking?

Staking usually means locking up one asset to support the network or protocol, and the reward comes from the support itself. Yield farming is broader: it often involves providing a pair of tokens to a liquidity pool and can include multiple sources of income (trading commissions plus new protocol tokens). In short, staking is one of the building blocks of yield farming strategies.

Is the promised APY guaranteed?

No. APY is a forecast based on current conditions, not a promise. Real yields float with the trading volume in the pool, protocol commission sizes, and reward token prices. A high number today can drop significantly tomorrow, so it's essential to check the indicator regularly, not just once upon entry.

What are impermanent losses, and why are they called that?

This is the difference between what your assets would be worth if you simply held them in your wallet and what they are worth inside the pool after price divergence. Losses are called impermanent because they exist only on paper until prices return to their original ratio. However, if you withdraw liquidity during a significant divergence, the loss becomes fixed and very real.

What are the main risks of yield farming?

There are three main risks. Impermanent losses when asset prices diverge. Smart contract vulnerabilities, which can result in funds being stolen through code errors. And scam projects (rug pulls), where creators drain liquidity and disappear. High promised yields almost always mean a higher risk in one of these areas.

Why are yield aggregators needed?

They automatically transfer your funds between protocols in search of the highest APY, relieving you of manual tracking of multiple platforms. This is convenient and saves time but adds another layer of smart contracts on top of the underlying protocols, which means another potential point of failure.

Put this to work in the terminal

Live charts, derivatives, on-chain and macro data, free.

Open terminal →