Coins: 17,183
Exchanges: 1,282
Market Cap: $2.854T 1.6%
24h Vol: $52.755B
Gas: 0.454 GWEI
Go Ad-free
Guides
TABLE OF CONTENTS

What is Yield Farming and How to Yield Farm in 4 Steps

3.8
| by
Stacy Kew
|
Edited by
Vera Lim
-

What Is Yield Farming?

Yield farming is depositing crypto assets in a liquidity pool or other Decentralized Finance (DeFi) platforms to earn higher returns. It is a key growth driver of the DeFi sector, as it incentivizes users to deposit and lock up their assets in DeFi protocols. 


Key Takeaways

  • Yield Farming refers to the strategies employed by users to generate yields on their otherwise static crypto holdings.

  • Yield Farming was popularized in mid 2020, through DeFi Summer declining in 2022 after the Terra Luna collapse.

  • Yield Farmers take on considerable risk but are sometimes able to achieve high yields and receive crypto airdrops.


This article was updated in November 2024 by Loke Choon Khei.

Understanding Yield Farming

Yield farming is an investment strategy that involves depositing crypto assets into a liquidity pool or a decentralized finance (DeFi) protocol to earn higher returns. Investors receive yield, usually in the form of governance tokens or additional tokens, for providing liquidity to decentralized exchanges (DEXs), staking tokens in a proof-of-stake (PoS) network or protocol, and lending assets in a money market protocol.

The main goal of yield farming is to generate yields on otherwise static crypto holdings, and to take advantage of the high-yield opportunities available in the DeFi market. However, it comes with considerable risks, such as price volatility, smart contract vulnerabilities, and impermanent loss. In this article, we will be covering how yield farming works, some examples of yield farming and how you can mitigate some of the risks.

In general, yield farming rewards are given to users who engage in actions beneficial to the protocol/blockchain. This includes:

  1. Liquidity Providers: Providing liquidity to a decentralized exchange (DEX)

  2. Lenders: Lending assets in money market protocols

  3. Stakers: Locking up specific assets (also known as staking) to secure blockchain networks.

  4. Borrowers: Borrowers can take loans by putting up another token as collateral, where the borrowed funds can be used to farm even more yield. 

The yield generated can be in the form of a percentage of the transaction fees generated by the underlying DeFi platforms, interest from lenders, or governance tokens via token emissions.

History of Yield Farming

DeFi Summer 2020

Yield farming became popularized as a concept in mid 2020 with many in crypto naming that time period, “DeFi Summer”. During DeFi Summer, household dApps such as Uniswap, Compound and AAVE rose to prominence. Alongside their rise to fame was the first introduction to generating passive income with crypto, a novel concept at the time. Due to its’ novelty, many dApps heavily incentivized their project with governance tokens to attract users to try their platform.

DeFi Total Value Locked (TVL) exploding in mid 2020.

Defi tvl before 2021

Besides governance tokens, incentivization was also heavily supported by venture capital (VC) or foundation funds in programmes such as the $180 million Avalanche Rush by the Avalanche Foundation in 2021. The heavy incentivization as well as the continued support from VCs created the notion that the yields advertised were sustainable. It was even common in this time period for borrowers in DeFi to be incentivized creating the weird scenario of users being paid to borrow. Due to this, leverage in the ecosystem grew explosively. Yields such as Terra Luna’s 20% APY on stablecoins through Anchor Protocol were seen as safe havens as DeFi TVL reached their all time highs in late 2021.

2022 Terra Luna Collapse

DeFi Total Value Locked (TVL) growth from inception till today.

defi tvl from inception

The DeFi yield farming bubble popped in early 2022, starting with the collapse of Terra Luna, one of the largest DeFi blockchains at the time. The collapse revealed that the Luna Foundation Guard, even with its $2.4 billion of reserves in Bitcoin (the second largest holder of Bitcoin at the time) was unable to defend the peg of their stablecoin UST. This collapse which led to a market downturn exposed the fundamental flaw in DeFi and its prevailing market view on yield farming at the time, which was that incentivized yields, regardless of the backing, was unsustainable. As a result, TVL in DeFi declined as the yields toned down gradually to more sustainable levels.

2023 Airdrop Mania to Present

With DeFi yields now at sustainable levels and governance token incentivization now uncommon, a new token distribution method became necessary for the governance tokens of many crypto projects. Optimism and Arbitrum, two Ethereum Layer 2s kickstarted the airdrop mania when they decided to perform a crypto airdrop to distribute and decentralize ownership of their governance token. Airdrops are a token distribution method first used by projects like Uniswap as an alternative to Initial Coin Offerings (ICOs), it allows users to receive free tokens as a gesture of appreciation for their involvement in a project.

Arbitrum and Optimism’s crypto airdrop saw thousands worth of their respective governance tokens airdropped to all manners of users who used their blockchains. For many, it was a lucrative and surprising reward. For example, simply bridging onto Arbitrum and swapping $100 worth of ETH could make a user eligible to receive hundreds of dollars in ARB tokens.


This generated a whole new method of yield farming now known as airdrop farming, a new form of yield farming where users participate in crypto projects and perform specific tasks (like transactions) to position themselves for future airdrops. Airdrop farming became extremely prevalent and by late 2023, certain projects started to introduce points programmes to track user activity and rank participants for potential airdrops. These points are somewhat similar to governance token incentives but don't guarantee that users will receive tokens. Nevertheless, yield farmers can now consider their total return as the yields they receive while yield farming in addition to potentially receiving an airdrop from a crypto project.

How Does Yield Farming Work?

Here’s a diagram of how liquidity pools work.

As a liquidity provider, you first deposit your crypto assets into liquidity pools. Liquidity pools are pools of tokens locked into a smart contract that facilitates asset trading while allowing investors to earn a return on their holdings. These pools allow traders to execute their trades in a permissionless manner on Automated Market Maker (AMM) platforms. 

Traders need to pay trading fees for using the liquidity pool; the fees are then divided between all liquidity providers based on the respective liquidity amount in the pool. Participants can sometimes earn the platform’s governance token as an additional incentive in certain pools. This additional reward is known as governance token emissions, which is a common method used by projects to incentivise activity and to distribute their token.

What Is Impermanent Loss and How Does It Impact Users?

Impermanent loss occurs when the current value of assets in a liquidity pool is less than their value at the time of deposit. This means that you — as a liquidity provider — had incurred losses at the current price ratio of the pooled assets, compared to when you deposited tokens to the pool to provide liquidity. The term "impermanent" comes from the fact that these losses are unrealized and only become permanent when assets are withdrawn from the pool. Moreover, the loss will be reversed if the token prices return to their original deposit prices, and the price ratio returns to its initial value.

Impermanent loss can be tricky to calculate, especially for dual-asset and multi-asset pools. To simulate impermanent loss on dual-asset pools, you can calculate it on CoinGecko’s Impermanent Loss Calculator.

The Difference between APY and APR

Yields in crypto are often displayed in terms of APY and APR. Here we will cover what the difference is and what it means for yield farmers.

  

Annual Percentage Yield (APY) - interest rate earned with compounding interest within the year. 

Annual Percentage Rate (APR) - interest rate earned without compounding interest within the year. 

Here’s an APY calculator on CoinGecko for ease and comparison.

Since APY takes compounding effects into account, it can be slightly misleading to new users as the APY figures do not reflect your actual yield in most scenarios. You could in theory achieve the advertised yield if you were to compound it manually, but this might require you to compound your yields daily in some cases. Note that this would not be feasible for most users since transaction costs could eat into your returns.

In general, yield farmers should view APR as the yields they should expect, and APY as the maximum yield they could achieve if they were to employ compounding strategies. It is generally advised to avoid compounding too often as users will incur transaction fees each time they compound their yields.

Cautionary Note on High APYs

When there are high APYs or APRs offered, this usually means that the yield opportunity is high risk. It can signify two things – either people have no confidence in the token or that the distribution of the native token is very high (inflationary), which will dilute the token supply significantly. 

High APRs may also be reflective of the type of yields users receive. Certain projects may give out tokens as an incentive to draw users to their platform as this allows them to advertise high yields. However, such incentive tokens are usually inflationary rewards and these tokens tend to trend downwards in price. A common saying yield farmers use to describe their yield farming strategy when faced with such incentives is “farm and dump”. This saying comes from the understanding of yield farmers that these incentives are short term, and that the token price for such incentive tokens tend to perform poorly in the long run.

Leverage Yield Farming

Leverage yield farming is a higher risk strategy employed by some to achieve extreme levels of yields by employing leverage, which is the borrowing of assets. This strategy is sometimes called “Looping” on some platforms.

A simple example is as follows: 

  1. Michael puts 100 USDC on Compound as collateral (earning interest + COMP tokens)

  2. Michael borrows 70 DAI against his 100 USDC collateral (paying interest on the DAI borrowed but subsidized by COMP token rewards)

  3. Michael trades 70 DAI for 70 USDC on a decentralized exchange and repeats Step 1. Alternatively, Michael can put the 70 DAI from Compound into another DeFi protocol, for example, Balancer, for additional yield farming rewards.

The yield in yield farming is generated through various means:

  1. A team incentivizing actions by distributing their native tokens (Buyers speculate on the value of the native token, thus providing value to the token)

  2. A protocol that pays out the fees collects by providing a service (for example, swaps on decentralized exchanges)

  3. A protocol that distributes fees obtained from other protocols (for example, Yearn Finance provides users with highest APY on the deposited cryptocurrencies by using their proprietary strategy)

Note that this strategy is highly risky as it involves the risk of liquidity. It is only sometimes viable due to the short term incentives a project may provide, which are the COMP tokens in this case.

How To Yield Farm

You can farm liquidity as a liquidity provider, lender, or staker. 

Liquidity Providing

One of the primary ways to yield farm is to provide liquidity. In this example, we will explore how to do it on Raydium, a DEX on the Solana network.

Step 1: Go to https://raydium.io/

Connect your wallet (Phantom in this example).

Raydium 1

Step 2: Go to ‘Liquidity’ on the top header, select ‘Standard’, find the pool you wish to provide liquidity to and click ‘Deposit’.

raydium 2

In this example, we will explore the much simpler ‘Standard’ liquidity pools, users who wish to learn about ‘Concentrated’ liquidity pools can read our guide on this here.

Step 3: Fill in the desired amount of tokens and select ‘Add Liquidity’.

raydium 3

In the above example we are adding 0.25 SOL, note that an equivalent amount of the paired asset, USDC in this case will be matched with 0.25 SOL. Once you’ve added your liquidity, you will begin to accrue trading fees in the form of SOL and USDC so long as users trade between SOL and USDC through Raydium. The estimated APR in the last 7 days is 5%, this means if trading activity persists at the same rate in a year, you will earn about $5 in fees!

Lending Your Crypto Assets

Here we will explore how to lend your crypto assets on money market protocols (dApps to lend/borrow crypto). In this example, we will look at AAVE, one of the most popular money market dApps.

Step 1: Go to https://app.aave.com/ and connect your wallet.

aave 1

Note that AAVE is a large multi-chain dApp, this means that AAVE exists and works on multiple different blockchains. In this example we will explore how to do it on Base, an Ethereum Layer 2 by Coinbase due to its low transaction costs. The process is similar on other networks as well.

Step 2: Select the asset you wish to lend out and click ‘Supply’.

aave 2

Step 3: Enjoy the interest earned and borrow assets if you wish! (Liquidations risk apply).

aave 3

In this scenario you will accrue 1.88% interest on ETH, accrued automatically, you can also borrow assets worth up to 80% of the assets you lent out, $23 in this case. Note that it is risky to borrow the maximum amount as you risk being liquidated (margin called) should the price of ETH drop.

Staking Crypto

Here we will explore staking, a common consensus mechanism used in blockchains (Proof of Stake). Staking your crypto involves locking up your crypto assets in order to secure a blockchain or protocol. Read our in depth explanation of this here!

In exchange for locking up their assets, crypto stakers earn yields often in the form of the token they stake. Here’s a simple guide on how to stake TIA on the Celestia network.

Step 1: Go to https://wallet.keplr.app/, connect your Keplr wallet, select ‘Chains’ on the left, search for ‘Celestia’ and select the ‘Celestia’ blockchain.

keplr staking 1

Step 2: Scroll down to the validators list and select a validator you wish to stake with.

keplr staking 2

Note that most validators charge a commission off your staking yields (not on your principal amount). This means that if you earned 1 TIA in staking rewards, the validator will take 0.05 TIA as a commission (if 5% commission is charged). This is automatically deducted and you will not see this through the UI on Keplr. Avoid validators that charge too high of a commission and also avoid validators that charge no commission fees.

Validators are essential in keeping blockchain networks secure and decentralized. Validators who charge no fees are generally seen as unsustainable and predatory. These validators may be trying to gain control over a blockchain network by driving out other validators under the pretense of being commission free and thus should be avoided.

Step 3: Stake your desired amount of TIA

keplr staking 3
keplr staking 4

Once you’ve staked, you will begin to accrue an APR of 10.47% in this case (before commissions). Note that unstaking typically takes a few weeks, 21 days in TIA’s case, so if you wish to withdraw your assets you may only do so 21 days after initiating the withdrawal.

Risks of Yield Farming

Despite the apparent potential upside, yield farming has its risks that users need to be aware of.

Smart Contract Risk

 Smart contracts can be vulnerable due to coding bugs. Hacks are a constant threat in DeFi.

Rug Pull Risk

 Developers of DeFi protocols may still control admin keys. If the admin keys are compromised or if the developers are malicious,there may be a risk of the developers running away with the funds in the liquidity pools (known as Rug Pulls).

Impermanent Loss

As mentioned above, this is the main risk of liquidity providing and it is the reason why liquidity providers are compensated with high yields. Liquidity providers take on the risk of impermanent loss, bearing full consequences in times of market volatility.

Liquidations Risks

If you are borrowing on a lending protocol, you risk having your position liquidated when the cryptocurrency you use as collateral loses its value. You will need to monitor your collateral position closely so that your borrowing positions are not undercollateralized.

Yield Farming Considerations

According to Defillama, there are more than 1,000 DeFi protocols that have a Total Value Locked (TVL) of over $1,000,000. Faced with a growing list of protocols, it can be difficult for users to figure out which protocols are safe/viable to do yield farming in. Here are some guidelines you can use to aid you in your selection process.

Total Value Locked (TVL)

Total value locked (TVL) is a cryptocurrency metric used to measure the total value of digital assets locked or staked on a particular decentralized finance (DeFi) platform or decentralized application (dApp). It is usually the first metric yield farmers look at to determine the reputation and size of a DeFi dApp. High TVL usually signifies a higher reputation as there are more funds at stake although that may not necessarily be true, it is a common heuristic (mental shortcut) used by yield farmers.

Security Audits

Another important factor to consider is whether the dApp has undergone security audits. During these audits, any potential security vulnerabilities found in the smart contracts of the dApp will be flagged out. Crypto audit firms improve the security of these dApps, but it does not make dApps invulnerable to exploits and attacks. Attacks and exploits in dApps usually happen when the project introduces new features/upgrades. These new features may not have been audited by security firms yet, allowing the attack to be possible.

Source of the Yield

In the aftermath of the Terra Luna collapse (in 2021), yield sources became heavily scrutinized and projects that conduct inflationary rewards (incentive tokens) were mostly shunned afterwards. While dApps may sometimes advertise APRs that seem too good to be true, it's important to understand the source of the yield. As the yield farming saying goes, 'If you don’t know where the yield comes from, you are the yield.'

Lock-up Period

Certain yield farming strategies include staking your assets which will render your assets illiquid for a period of time. During this lock-up period, you are unable to respond to market changes which can be detrimental should there be a market downturn. Make sure you're prepared to weather the storm, so to speak, before locking up your assets in DeFi protocols.

Conclusion

There are countless methods to deploy capital in DeFi yield farming strategies. A useful heuristic to keep in mind is that the yields you get represent the amount of risk you take. High yields can be attractive and tempting but it comes with high risks.

Before investing in any cryptocurrency or project, always do your own research and never invest more than you can afford to lose.

CoinGecko's Content Editorial Guidelines
CoinGecko’s content aims to demystify the crypto industry. While certain posts you see may be sponsored, we strive to uphold the highest standards of editorial quality and integrity, and do not publish any content that has not been vetted by our editors.
Learn more
Want to be the first to know about upcoming airdrops?
Subscribe to the CoinGecko Daily Newsletter!
Join 600,000+ crypto enthusiasts, traders, and degens in getting the latest crypto news, articles, videos, and reports by subscribing to our FREE newsletter.
Tell us how much you like this article!
Vote count: 4
Stacy Kew
Stacy Kew
Stacy is a market research intern at CoinGecko. She's very much into cryptocurrency. Big on BTC, ETH, SOL, NFTs, and Japanese food. Follow the author on Twitter @trufflefriesx

Related Articles

Select Currency
Suggested Currencies
USD
US Dollar
IDR
Indonesian Rupiah
TWD
New Taiwan Dollar
EUR
Euro
KRW
South Korean Won
JPY
Japanese Yen
RUB
Russian Ruble
CNY
Chinese Yuan
Fiat Currencies
AED
United Arab Emirates Dirham
ARS
Argentine Peso
AUD
Australian Dollar
BDT
Bangladeshi Taka
BHD
Bahraini Dinar
BMD
Bermudian Dollar
BRL
Brazil Real
CAD
Canadian Dollar
CHF
Swiss Franc
CLP
Chilean Peso
CZK
Czech Koruna
DKK
Danish Krone
GBP
British Pound Sterling
GEL
Georgian Lari
HKD
Hong Kong Dollar
HUF
Hungarian Forint
ILS
Israeli New Shekel
INR
Indian Rupee
KWD
Kuwaiti Dinar
LKR
Sri Lankan Rupee
MMK
Burmese Kyat
MXN
Mexican Peso
MYR
Malaysian Ringgit
NGN
Nigerian Naira
NOK
Norwegian Krone
NZD
New Zealand Dollar
PHP
Philippine Peso
PKR
Pakistani Rupee
PLN
Polish Zloty
SAR
Saudi Riyal
SEK
Swedish Krona
SGD
Singapore Dollar
THB
Thai Baht
TRY
Turkish Lira
UAH
Ukrainian hryvnia
VEF
Venezuelan bolívar fuerte
VND
Vietnamese đồng
ZAR
South African Rand
XDR
IMF Special Drawing Rights
Cryptocurrencies
BTC
Bitcoin
ETH
Ether
LTC
Litecoin
BCH
Bitcoin Cash
BNB
Binance Coin
EOS
EOS
XRP
XRP
XLM
Lumens
LINK
Chainlink
DOT
Polkadot
YFI
Yearn.finance
Bitcoin Units
BITS
Bits
SATS
Satoshi
Commodities
XAG
Silver - Troy Ounce
XAU
Gold - Troy Ounce
Select Language
Popular Languages
EN
English
RU
Русский
DE
Deutsch
PL
język polski
ES
Español
VI
Tiếng việt
FR
Français
PT
Português
All Languages
AR
العربية
BG
български
CS
čeština
DA
dansk
EL
Ελληνικά
FI
suomen kieli
HE
עִבְרִית
HI
हिंदी
HR
hrvatski
HU
Magyar nyelv
ID
Bahasa Indonesia
IT
Italiano
JA
日本語
KO
한국어
LT
lietuvių kalba
NL
Nederlands
NO
norsk
RO
Limba română
SK
slovenský jazyk
SL
slovenski jezik
SV
Svenska
TH
ภาษาไทย
TR
Türkçe
UK
украї́нська мо́ва
ZH
简体中文
ZH-TW
繁體中文
Log in
By continuing, you agree to CoinGecko Terms of Service and acknowledge you’ve read our Privacy Policy
or
Forgot your password?
Didn't receive confirmation instructions?
Resend confirmation instructions
Sign up
By continuing, you agree to CoinGecko Terms of Service and acknowledge you’ve read our Privacy Policy
or
Password must contain at least 8 characters including 1 uppercase letter, 1 lowercase letter, 1 number, and 1 special character
Didn't receive confirmation instructions?
Resend confirmation instructions
Forgot your password?
You will receive an email with instructions on how to reset your password in a few minutes.
Resend confirmation instructions
You will receive an email with instructions for how to confirm your email address in a few minutes.
Get the CoinGecko app.
Scan this QR code to download the app now App QR Code Or check it out in the app stores
coingecko
Continue in app
Track prices in real-time
Open App