What Is Yield Farming, and How Does It Work?

Want to learn about yield farming in DeFi? Discover how it works, its benefits and risks, and how you can get started.

Introduction

If you've spent any time exploring the world of decentralized finance (DeFi), you've likely come across the term "yield farming." For some, it's an exciting way to earn rewards through cryptocurrency holdings, while new users in the crypto space are still unsure of what the buzzword means in DeFi. But why has yield farming become increasingly interesting for traders and DeFi users? Below, we'll cover yield farming, simplify the concept for new users, and help you understand the benefits and drawbacks of the mechanics behind yield farming.

What Is Yield Farming in DeFi?

Yield farming is a strategy where users supply crypto assets to decentralised finance protocols (for example, lending markets or liquidity pools) to earn rewards.It typically involves supplying assets to support lending, borrowing, or trading activity within a protocol. Yield farming comes from claiming or harvesting rewards, similar to real-life farming. In crypto, however, the rewards come as assets that can be added to the existing liquidity or withdrawn from the farm. In practice, yield farming involves depositing tokens into smart contracts to earn interest, trading fees, and/or incentive tokens, depending on the protocol.
 

How Does Yield Farming Work?

Yield farming leverages smart contracts and DeFi protocols to secure asset deposits by users, who are considered liquidity providers. Yield farming works by having liquidity providers deposit funds onto a platform for liquidity, lending, or staking. Any crypto assets deposited are locked in smart contracts and used across trading, borrowing, or lending protocols.

By providing liquidity, users may earn rewards in the form of trading fees, interest, and/or incentive tokens. Returns are often quoted as annual percentage yield (APY), although actual outcomes depend on token prices, pool activity, and incentive schedules. It's worth mentioning that every liquidity pool has varying APY percentages and depends on the tokens used.

Yield farming is executed through smart contracts that automate rules for deposits, withdrawals, and reward distribution. One notable case of yield farming involves the Compound protocol. Compound—a decentralized borrowing and lending platform on Ethereum—gained popularity by distributing its COMP tokens as rewards to users. These tokens granted governance rights, allowing users to vote on platform decisions. 

Compound helped popularise liquidity mining after launching COMP in June 2020. During the 2020–2021 cycle, Compound’s total value locked reached an all-time high above $12 billion (May 2021), although exact rankings vary depending on the data source and methodology. As of February 2026, Uniswap accounts for around $3.09 billion in total value locked and Compound with about $1.38 billion, although TVL can change materially with market prices and deposits.

Key Components of DeFi Yield Farming

Several elements enable yield farming to function effectively within the DeFi ecosystem. Here's a closer look at the key components:

Staking
Crypto staking is one of the key components of yield farming, where crypto holders lock up their assets to provide liquidity or support a blockchain's operations—such as transaction validation or securing decentralized protocols. In yield farming, participants often stake their tokens in liquidity pools or lending platforms to earn rewards, typically in the form of additional cryptocurrency. Staking is primarily used in the proof-of-stake consensus mechanism for securing a blockchain, within yield farming, it can also involve staking liquidity provider (LP) tokens or other assets to participate in DeFi protocols.

Lending
DeFi lending platforms allow users to offer their crypto assets as loans to others. Borrowers often provide collateral, and lenders, which are liquidity providers, earn interest in return.

Liquidity
Liquidity is central to many decentralised exchanges, where deeper pools can reduce slippage and improve execution for trades. Yield farmers contribute their crypto to liquidity pools—collections of assets locked in smart contracts on platforms like Uniswap or SushiSwap. These pools enable trading and earn contributors a share of the transaction fees or other incentives.
 

Benefits & Risks of Yield Farming

Yield farming can be appealing, but like any investment strategy, it has its fair share of pros and cons. Here's what you need to know:

Yield Farming Benefits

  • Higher quoted yields: Some DeFi protocols may display higher APYs than traditional savings products, but returns can change quickly and include additional risks.
  • Passive Income: By lending, staking, or adding liquidity, crypto holders may earn passive income without having to sell their assets.
  • Access to New Tokens: Projects may reward users with governance tokens that provide decision-making power within the protocol.
    Protocol incentives: Yield programmes are often used to attract liquidity and encourage usage of a protocol.

Yield Farming Risks

  • “Impermanent” Loss: When you provide liquidity to a pool, the value of your assets can fluctuate based on price changes. If one token in the pool increases or decreases significantly in price, you may end up with less value when you withdraw your assets than if you had just held the tokens. This loss is "impermanent" as long as the prices return to their original ratio. However, if you withdraw your assets before the prices rebalance, the loss can become permanent.
  • Smart contract risk: DeFi protocols rely on smart contracts, and bugs or exploits can lead to partial or total loss of funds.
  • Market Volatility: The crypto market is notoriously volatile, and any token price changes could impact a user's expected returns.
  • Regulatory Uncertainty: As governments develop policies around crypto, new regulations could affect DeFi platforms and their offerings.
     

Frequently Asked Questions

Is Yield Farming Risky?
Yes, yield farming carries risks, such as price volatility, "impermanent loss" in liquidity pools, and potential security vulnerabilities in smart contracts. "Impermanent loss" occurs when the value of tokens in a liquidity pool changes, leading to a loss compared to simply holding the tokens. If you withdraw your assets before prices rebalance, this loss can become permanent. It's essential to conduct thorough research and only invest what you can afford to lose.

Is Yield Farming Still Profitable?
While the DeFi market has evolved, yield farming can be profitable when done strategically. Factors such as the choice of protocol, market conditions, and your investment strategy play important roles in potential profitability.

Is Yield Farming Better Than Staking?
Whether staking or yield farming is better for you depends on your goals. Staking is generally considered less risky because it involves earning rewards for helping secure the blockchain. Yield farming, on the other hand, can offer higher returns, but it comes with more risk since you're providing liquidity rather than just securing the network. A portfolio could include both, but it’s important to carefully analyze the potential risks and rewards of each.
 

Final Thoughts

Yield farming is a DeFi strategy that may generate rewards through lending and liquidity provision, but it involves material risks and variable returns. However, it's not without its complexities and risks. Users should understand the protocol, smart-contract risks, fees, liquidity conditions, impermanent loss, token volatility, and regulatory uncertainty before participating. This article is for general education only. It does not recommend yield farming, any DeFi protocol, any crypto asset, or any investment strategy. Ndax does not provide investment advice or recommendations.
 


Don't forget to follow us on social media for more updates and join the conversation on our forums.

Disclaimer: This article is not intended to provide investment, legal, accounting, tax or any other advice and should not be relied on in that or any other regard. The information contained herein is for information purposes only and is not to be construed as an offer or solicitation for the sale or purchase of cryptocurrencies or otherwise.