Intro Guide

What Is Yield Farming in Decentralized Finance (DeFi)?

Everything you need to know about crypto yield farming, how it works and what the risks are.
Average read time:
4
minutes
Key Takeaways
  • Yield farming allows crypto token holders to earn passive income by tapping into the value held in their assets.
  • The process is complex and the risk of loss is high for those who don't fully understand what they are doing. 
  • Yield farming involves depositing assets into a protocol and liquidity pools in an effort to obtain high yields
  • There are various forms of yield farming including providing liquidity, lending, borrowing and staking. 
  • The risks involved in yield farming include smart contract bugs and exploits, market volatility, rug pulls and the possibility of a contagion effect that spreads across DeFi. 

Decentralized finance (DeFi) has emerged as one of the most revolutionary sectors of the cryptocurrency industry as its permissionless nature allows anyone with an internet connection to access financial markets. 

On top of bringing these services across the world to the previously “unbanked,” DeFi has also helped secure a more level playing field by removing the need for intermediaries and custodians who profit by skimming fees off the top. 

Stemming from DeFi, Yield Farming has arisen to offer crypto holders a new way to earn rewards by putting their assets to work in permissionless liquidity protocols. This offers users who have traditionally just HODLed their crypto a way to continue to do so while also earning a passive income on their assets. 

Here’s a deeper dive into what Yield Farming is, how it works, and what kinds of yields a user can expect in exchange for the risk of losing control of their crypto assets. 

What is Yield Farming?

Simply put, yield farming is locking up a crypto asset in order to earn rewards. This process is also referred to as liquidity mining and is similar to the process of staking minus the “securing the network” aspect that staking is generally used for. 

While the process is akin to staking in that tokens become locked on a smart contract and are unavailable for trading, there is a lot more complexity involved in the background as the farms move the funds around to various liquidity pools in search of the highest yields. 

Liquidity pools are smart contracts that contain funds used to facilitate token swaps, with fees earned from the swaps going back to liquidity providers. 

Yield farms often work together with liquidity providers in an effort to simplify the liquidity mining process and create a reliable rate of return in exchange for helping to ensure ample liquidity. 

The majority of current yield farming activity occurs on the Ethereum network with ERC-20 tokens, but that is slowly beginning to change as other smart contract platforms like Solana and Avalanche grow in stature and offer cross-chain functionality with Ethereum. 

The process of yield farming can get quite intensive as farmers move their funds around frequently between different protocols in search of higher yields. Because of this, many DeFi platforms offer additional incentives to attract more liquidity to their protocols, which can turn into a snowball effect as the higher the total value locked (TVL) gets, the more (perceived) legitimacy a protocol has in the eyes of the public. 

What is TVL (Total Value Locked)?

One of the methods used to measure the overall health of a DeFi protocol is by looking at its Total Value Locked (TVL). Simply put, this is the total value of all the crypto locked on a specific DeFi protocol, such as a lending platform or money marketplace.

Put another way, a platform’s TVL is the aggregate liquidity in all of the available liquidity pools. It can also be used as a measure to evaluate the health of the DeFi ecosystem as a whole by tracking the value of all the liquidity deposited on DeFi smart contracts. Along the same lines, TVL can also be used to compare the “market share” held by each DeFi protocol. 

How does yield farming work?

Yield farming is similar to automated market makers (AMM) as they both utilize liquidity providers and liquidity pools to help the plumbing of DeFi to operate smoothly. 

The process typically starts with liquidity providers depositing funds into a liquidity pool which powers a marketplace where users can lend, borrow or exchange tokens. Conducting transactions on these protocols involves a small fee which is then paid out to liquidity providers based on their share of the liquidity pool. These are the basics of how AMMs function. 

Along with fees, protocols often offer additional incentives to attract liquidity such as an extra percent yield that is paid out in their native token or another token that is new to the market and has yet to develop deep liquidity for trading. 

The amount liquidity providers earn varies from protocol to protocol, but the main thing to understand is that they earn a return based on the proportion of liquidity they provided to the liquidity pool. 

Yield farming simplifies the process for users by doing the leg work of moving tokens around and finding the best yields in exchange for a cut of the proceeds. On top of that basic function, the pooling of funds on the farm allows the farm to contribute a larger amount of liquidity to pools, thus earning a larger percentage of the trading fees generated by that pool. 

Types of yield farming

  • Lending - Depositing crypto assets on a smart contract that can then be borrowed by other users for a set yield. 
  • Borrowing - Using one crypto asset as collateral to borrow another, and then using those borrowed assets for yield farming. 
  • Staking - Depositing assets on a proof-of-stake network to earn rewards or staking liquidity provider tokens earned from depositing assets into a liquidity pool, thereby doubling the yield opportunity for the originally deposited assets. 
  • Providing liquidity to liquidity pools

How are yield farming returns calculated?

Yield farming returns are generally calculated on an annual basis as an Annual Percentage Rate (APR) and Annual Percentage Yield (APY). 

While APR and APY are often used interchangeably, the APR metric doesn't account for the effect of compounding while the APY metric does. Compounding is the process of directly reinvesting the profits/ yields of an investment in order to generate more returns. 

It's important for anyone interested in yield farming to understand that the APY/APRs quoted by protocols are estimations that are variable and likely to change over time depending on what happens in the volatile crypto market. Successful yield farming strategies tend to attract more farmers, which can then alter the yields offered and eventually lead to significantly lower yields as well-funded liquidity pools no longer need to offer higher rewards to attract liquidity.  

What are the risks associated with yield farming?

The process of yield farming is complicated, and the level of complexity only increases as yield farming strategies become more profitable. Additionally, heavy involvement in yield farming is usually only recommended for those who have large amounts of capital to deploy. 

The main warning offered to those wishing to get involved with farming is that it's easy to lose money if you don’t understand the processes. Always read all documentation and completely understand any risks laid out before depositing funds into any yield farm or liquidity pool. 

Another risk to watch out for is issues related to smart contracts. There is a well-documented history of poorly written smart contracts resulting in permanently locked funds and contract exploits that allowed hackers to drain all assets deposited to the contract. While there is little a user can do to ensure that a smart contract's code is free from any bugs, it's something that needs to be taken into consideration. 

Rug pulls are another concern to be mindful of. It's important to do a good deal of research into a project and the team behind it before depositing any funds to determine if the protocol is legitimate and trustworthy.  

A final risk to take note of is the composable nature of the DeFi ecosystem, meaning the way in which the various protocols are connected and work together. If just one of the key pieces of infrastructure for DeFi fails, there is a potential that the whole ecosystem could implode as a result. A good example of this was the collapse of Terra ($LUNA) and its TerraUSD ($UST) stable-coin, which triggered a contagion effect that spread across DeFi and crypto CeFi, eventually plunging the market into a crypto winter in 2022.

IMPORTANT INFORMATION

This material is intended to be of general interest only and should not be construed as individual investment advice or a recommendation or solicitation to buy, sell or hold any security or to adopt any investment strategy. It does not constitute legal or tax advice. The views expressed are those of the author and the comments, opinions and analyses are rendered as of the publication date and may change without notice. There is no guarantee that any forecasts or predictions made will come to pass. The information provided in this material is not intended as a complete analysis of all material facts or circumstances regarding any country, region or market. All investments involve risks, including possible loss of principal.

Risk management does not imply elimination of risks, and not all investments are suitable for all investors. The information and opinions contained in this material are derived from proprietary and non-proprietary sources deemed by MANTRA to be reliable, are not necessarily all inclusive and are not guaranteed as to accuracy. Data from third party sources has not independently verified, validated or audited. MANTRA accepts no liability whatsoever for any loss arising from use of this information; reliance upon the comments, opinions and analyses in the material is at the sole discretion of the user.

Any products, services and information in this material may not be available in all jurisdictions and are offered local laws and regulation permit. Please consult your own financial professional or legal advisor for further information on availability of products and services in your jurisdiction. Please also see the disclaimer which is found at the bottom of this website under the heading “Important Disclosures”.​

Related articles

Explainer

What Is Crypto Staking and How Can You Earn Passive Income From It?

Intro Guide

Blockchain Technology: What Is It and How Does It Work?

Explainer

What Are Smart Contracts and Why Are They Crucial?