9 minsPublished on 6/24/2022

What is yield farming?

Did you know you can earn interest on your crypto? This article explains all you need to know about the process known as yield farming.

By Mohammad Musharraf

Decentralized Finance (DeFi) has been leading technological innovations in the Web3 space. The DeFi market has grown over 47% in the last year, with total value locked (TVL) surpassing $230 billion. For DeFi users, yield farming constitutes a core investment strategy that is steadily propelling growth in this sector.

But what is yield farming and how does it work?

This article explains all you need to know about yield farming so you can start earning interest on your investments.

Disclaimer: The following is for informational purposes only and should not be construed as financial advice. 

What is yield farming?

Yield farming is the process by which crypto token holders earn rewards by providing liquidity to DeFi platforms. By locking their crypto tokens in yield farming protocols, yield farmers earn interest on their principal investment.

In many ways, yield farming is similar to depositing money in a savings account. DeFi platforms utilize investor funds for lending crypto assets to borrowers while generating returns for all stakeholders. The main difference is that interest paid from DeFi protocols is generally much higher than through a bank.

A picture illustrating yield farming.
Yield farming is the process by which crypto token holders earn rewards by providing liquidity to DeFi platforms (Image source)

To understand how yield farming works, it is necessary to grasp the different yield farming techniques users employ across DeFi protocols. 

How does yield farming work?

A yield farmer can earn rewards by providing liquidity to a decentralized app (DApp), such as a decentralized exchange (DEX), or a lending and borrowing protocol.

Yield farming works in three ways: supplying liquidity to a liquidity pool, lending and borrowing crypto in a lending protocol, and staking crypto assets. 

Supplying liquidity

When liquidity providers deposit their digital tokens to a DEX liquidity pool, they get a proportionate amount of liquidity provider (LP) tokens. Liquidity providers are entitled to a portion of transaction fees that decentralized exchanges charge for trading against a liquidity pool. Moreover, liquidity providers can stake their LP tokens to earn additional rewards as well as participate in certain initial DEX offerings (IDOs). 

Lending and borrowing crypto

Yield farmers can lend their digital tokens to borrowers and earn interest through smart contract-enabled lending-borrowing platforms. On the other hand, a borrower can also become a yield farmer by leveraging the liquidity of their loan. That is, when users borrow digital assets, they can utilize their loans to become liquidity providers or stake them to earn interest or yield. 

Staking crypto assets

In decentralized finance, staking can be one of two types: staking in Proof-of-Stake (PoS) blockchains for voting rights, and staking LP tokens. The first is when stakers earn rewards for locking their digital assets to secure the protocol and validate transactions. The second is when liquidity providers stake their LP tokens in new liquidity pools to maximize their returns.

How are yield farming returns calculated?

Yield farmers calculate their estimated returns from yield farming with two market metrics: Annual Percentage Yield (APY) and Annual Percentage Rate (APR).

APY factors in compounding interest, thereby calculating profit reinvestment that generates more returns. APR, however, does not.

That being said, APY and APR merely help in making projections that may not always correspond with actual returns. Moreover, they are remnants of legacy finance metrics that calculate annualized returns over the course of a year. 

A screenshot of the highest APY rates of token pairs on PancakeSwap.
The highest APY rates of token pairs on PancakeSwap (Image source)

Given the speed of innovations in decentralized finance, APY and APR have become outdated for calculating returns. Perhaps it is time for the DeFi sector to design a unique metric that can better predict daily or weekly returns.

Is yield farming profitable?

Crypto yield farming can be very rewarding for investors if they can intelligently invest their capital and other resources. Users need to track monthly and quarterly metrics of an underlying DeFi platform and follow proper investment advice to generate profitable returns.

It is best for novice yield farmers to invest in a trustworthy liquidity pool, even if the interest rates aren't very high. Given the market volatility, it’s also best to participate in liquidity mining platforms where risks won’t outweigh rewards.

While crypto yield farming remains highly profitable, it is still a capital-intensive and high-risk venture. Thus, it is necessary that you identify risks before investing.

What are the risks of yield farming?

Yield farmers face five kinds of risks when investing in crypto markets.

Price volatility

During turbulent market conditions, cryptocurrency prices swing significantly over short durations. Thus, token holders might suffer a loss if the price of their locked tokens depreciates during a bear market. Moreover, volatility remains a challenge since users cannot liquidate their locked assets before the completion of the vesting period.

A picture of a price chart.
Price volatility is one of the main risks for yield farmers (Image source)

Impermanent loss

When token prices keep changing during a volatile market, yield farming can lead to something called “impermanent loss”. As the prices of a token pair fluctuate in the liquidity pool, the ratio keeps readjusting to stabilize the total value. If a token's value falls due to readjustment, investors suffer an impermanent loss. However, this loss becomes a permanent one once users withdraw their funds from the liquidity pools at the depreciated value.

Smart contract hacks

The smart contracts of yield farming platforms may contain bugs or faulty coding, making them susceptible to hacks. Ill-intentioned hackers can exploit such security vulnerabilities in smart contracts to drain user funds. 

In December 2021, for example, smart contract bugs led to the theft of $31 million from a DeFi yield farming protocol. 

Read our articles How to spot and avoid crypto scams and Crypto security basics: Staying safe in Web3 to learn all about the most common scams and how to spot them.

Fraud

Rug pulls (a scam in which project developers disappear with investors’ money) are one of the most common ways of duping yield farming investors. In 2021 alone, losses from DeFi rug pulls totalled $2.8 billion

A picture representing a DeFi rug pull.
In 2021, DeFi rug pull scams resulted in $2.8 billion of losses (Image source)

In a rug pull, malicious developers hype up a DeFi project on social media and rake in liquidity by selling tokens to potential investors. They then deliberately tweak the smart contract code to remove the token vesting period, enabling scammers to “pull away” investor funds and disappear with their money.

Regulatory uncertainties

Crypto yield farming platforms often get embroiled in the regulatory quagmire, putting DeFi investments in limbo. The Securities and Exchange Commission (SEC) has listed certain assets as securities, thereby bringing them under their jurisdiction. The New York Attorney General banned some yield farming platforms in October 2021, with several other states issuing cease and desist orders.

Is yield farming safe?

With so many risks involved in yield farming, crypto investors may be concerned about the safety and security of their investments. In practice, though, yield farming is a safe mode of investment if users do proper research and follow due diligence procedures.

Some yield farming platforms offer bug bounty programs, invite white hat hackers, and hire third-party audit companies to identify and repair security vulnerabilities in their smart contracts. In general, investing in audited yield farming platforms is safer, both in terms of technical security and regulatory compliance.

You should avoid DeFi projects with anonymous teams and dubious claims on social media. You can also use an impermanent loss calculator and weekly or quarterly price charts to make informed investment decisions.

Despite a bearish market, DeFi’s TVL has surpassed $112 billion in 2022, with investors pouring liquidity into yield farming platforms. 

Here’s a list of some of the most popular platforms:

MakerDAO

MakerDAO is a smart contract-enabled decentralized lending-borrowing platform where users can deposit collateral to mint an algorithmic stablecoin, DAI. This stablecoin is usable across more than 400 dApps and DeFi platforms.

MakerDAO has its own native token called Maker (MKR) which also functions as a governance token. Running on Ethereum, MakerDAO has the highest TVL of $14.5 billion, with a 26% market dominance.

Aave

Aave is a multi-chain yield farming platform for lending and borrowing assets with dynamic and algorithmically controlled interest rates. Users can supply liquidity to Aave’s liquidity pools to earn interest. They can also stake digital assets to participate in the protocol's governance. Owners of AAVE, the platform's governance token, can vote for protocol upgrades and other improvement proposals.

Aave is currently the second-largest yield farming platform with almost $9 billion TVL.

Curve

Curve is a yield farming platform where users can perform trustless token swaps across stablecoin liquidity pools. Curve uses its own automated market-making algorithm that allows trading with low slippage across low-risk stablecoin pools. The protocol has its own token, CRV, with which users can vote and make decisions about protocol governance.

Uniswap

Uniswap is a leading DeFi trading protocol where users can exchange tokens and participate in liquidity mining. Users supply liquidity to pools in a 50:50 ratio against which traders execute their trades. In return, investors earn a few percentage points of the trading fees, as well as UNI governance tokens.

Compound

Compound is a yield farming protocol where users can lend and borrow assets for the money market. They also get rewards in the form of Compound (COMP) tokens, which allow them to participate in protocol governance. The Compound ecosystem runs on Ethereum with algorithmically-controlled interest based on the supply-demand ratio.

PancakeSwap

PancakeSwap is a yield farming protocol running on the Binance Smart Chain. Although it was inspired by Uniswap, PancakeSwap has more features, including NFT collectibles and in-platform games like lotteries. Leveraging an automated market maker (AMM), the PankcakeSwap runs on the CAKE token that provides users with governance rights.

InstaDapp

InstaDapp is a yield farming protocol that allows developers to build custom DeFi infrastructure and monetize them for higher returns. It comes with a simple Javascript code that frees developers from worrying about auditing their contract code. Non-developers can also manage their portfolios by opting for lucrative strategies through the Instadapp Lite feature.

Balancer

Balancer provides flexibility to liquidity providers since they can create customized liquidity pools with unequal token allocations. Through customizable and flexible staking, Balancer opens up a new way for liquidity providers to contribute to DeFi. Users who add liquidity get a portion of the trading fees from the protocol.

Yearn

Yearn is a DeFi aggregation protocol that automates access to liquidity pools across platforms like Aave and Compound. Yearn uses an algorithm to locate a yield farming protocol offering maximum returns and suggests it to users. Upon depositing funds, it issues yTokens that keep rebalancing the principal amount to maximize profits.

Convex

Convex is a yield farming platform where liquidity providers from Curve can deposit their LP tokens to earn rewards. These rewards include boosted CRV tokens as well as CVX tokens. Users can stake these tokens to earn additional interest from the protocol. 

Start investing with MoonPay

By investing in different yield farming platforms, you can earn interest and grow your crypto portfolio. To get started on your yield farming journey, simply buy crypto via MoonPay using a card, mobile payment method like Google Pay, or bank transfer.

Mohammad Musharraf
Written byMohammad Musharraf