FacebookTwitterLinkedInTelegramCopy LinkEmail
LearnCrypto

Yield farming explained

yield farming

Decentralized Finance (DeFi) is one of the fastest-growing trends in blockchain and cryptocurrency. Tens of billions of dollars are being locked in DeFi with the Ethereum-based MakerDAO and Lido Finance in the lead.

The sector’s popularity can mostly be attributed to yield-farming and building your strategies, which are only available in DeFi, for passive income.

In 2020 the Ethereum-based credit market Compound started distributing COMP tokens to the users. COMP is a governance token that gives the networks’ users the right to vote on changes to the platform. This ignited a craze, which led to Compound becoming the leader in the DeFi space at the time.

After this, the term “yield farming” came to light. Yield farming generally describes strategies where you lock up your crypto tokens at the disposal of a project, which generates passive income in the form of cryptocurrency.

What is yield farming?

Most likely, if you have been in the crypto space long enough, you have heard the term “staking.”
Yield farming and staking are relatively similar. Farming holders deposit their crypto to provide liquidity in certain pools in yield. The holders then become liquidity providers (LPs)

To give a further explanation on the subject, liquidity pools are a pile of crypto assets locked in smart contracts. As a reward for locking their tokens in liquidity pools, holders get a fiscal stimulus.

Protocols that use the liquidity mining model include various applications, from decentralized exchanges to money markets, yield aggregators, and beyond. These projects have benefited from creating a network of early users who actively bootstrap the project’s liquidity and participate in the protocol’s governance. The initial implementations of yield farming, however, were employed to boost the liquidity of a specific asset directly.

There are to the main reason to implement Yield farming:

  • Bootstrapping liquidity —Incentivizing users to deposit and lock up their liquidity into a DeFi application, growing the TVL and bootstrapping the supply side of the ecosystem. For example, when more liquidity is available on a DEX, slippage is decreased for users, and the volatility of specific tokens, such as algorithmic stablecoins, can also be reduced.
  • Distributing token – Fairly distributing a DeFi application’s native token to protocol users who take on the opportunity cost of depositing their funds on the platform. The token rewards from yield farming are an addition to any built-in revenue streams inherently generated by the protocol, such as trading fees within a decentralized exchange or interest from lending in a decentralized money market. Some projects also offer yield farming rewards for other services, including supporting community, marketing, or developer initiatives.

Different DeFi protocols take different approaches to yield farming depending on the exact goals they aim to achieve, which may include one or both of the objectives above. Yield farming has enabled countless projects to bootstrap their growth quicker to secure hundreds of millions to billions in user funds.

Types of yield farming:

  • Liquidity provider: Users deposit coins to a DEX to provide trading liquidity. Exchanges charge a small fee to swap the two tokens, which are paid to liquidity providers. This fee can sometimes be paid in new liquidity pool (LP) tokens.
  • Lending: Crypto holders can lend tokens to borrowers through a smart contract and earn passive interest.
  • Borrowing: Farmers can use one token as collateral and receive a loan from another. Users can then farm yield with the borrowed coins. This way, the farmer keeps their initial holding, which may increase in value over time, while also earning yield on their borrowed coins.
  • Staking: There are two forms of staking in the world of DeFi. The most popular form of staking is probably proof-of-stake (PoS).

With PoS protocols, you can earn interest by locking up your tokens in the network to provide security. The second is to stake LP tokens earned from supplying a DEX with liquidity. This allows users to earn yield twice, as they are paid for providing liquidity in LP tokens which they can then stake to make more yield.

Liquidity pools and yield farming

As we mentioned, yield farming (or liquidity mining) rewards users for providing liquidity or other value to a dApp’s ecosystem. Yield farmers, otherwise known as depositors, receive rewards proportional to their deposit, granting a higher Annual Percentage Return (APR).

There may be a shift in the proportion of your rewards, considering that some cryptocurrencies are much more volatile than others, which can lead to impermanent loss.

Becoming a liquidity provider allows you to generate extra returns on your crypto assets. E.g., You go to Uniswap to exchange your ETH for DAI. Uniswap takes some DAI from the pool and adds the ETH the user exchanges. That allows DEXs to offer all sorts of trading pairs without holding crypto.

Exchanges pay a fee to Uniswap, which the platform distributes to liquidity providers.

E.g., If you provide $1,000 worth of ETH and DAI ($2,000 total) to the pool, which has a total value of $200,000, your share of that pool is 1%. If the fees collected on exchanges between ETH and DAI is $1,000 for the day, you will earn $10.
Lending and yield farming

Lending protocols allow the user to earn higher yields from their crypto assets. Some of the emerging projects from the crypto space give users access to the value of their cryptocurrency without having to liquidate their assets. The main principle of this structure is that the loans are over-collateralized. E.g., If you wish to receive a $100 loan, you may have to put down $200 for collateral.

By becoming a lender, you will be paid interest by the borrowers of your asset. The interest is determined by supply and demand.

Yield farming as a lender will require you to use a DeFi protocol such as Compound or Aave.
E.g., If you deposit 100 DAI worth $100 with Compound, you’ll receive $100 worth of code in return. Let’s say the exchange rate was 1:1 when you made your deposit. If the interest rate for DAI is 10% and remains for a year, the exchange rate of DAI to cDAI will be 1.1:1 after one year. When you go to remove your DAI from the protocol, you’ll receive 110 DAI back, worth $110.

Yield Farming vs. Staking

In a way, yield farming is similar to staking, and the two terms are often used interchangeably. Locking up tokens as collateral to help secure a blockchain network or smart contract protocol defines the term “staking.” The term staking also describes providing DeFi liquidity, accessing yield rewards, and obtaining governance rights. As such, yield farming and staking may refer to a similar user action—depositing tokens into a smart contract—but can also widely differ. With that said, protocols commonly refer to depositing tokens into a liquidity pool as “staking.”

Developers can create sophisticated strategies that generate returns through an interconnected loop of deposits into multiple protocols. A class of protocols called yield aggregators specialize in providing these strategies as a service to users in smart contracts known as vaults that automatically execute a yield-generating strategy based on what is optimal at the current time. In exchange for a performance fee (a portion of the profits generated), users can get access to higher yields without knowing all the underlying strategies’ complexities.

The evolution of yield farming has led to the creation of new terminology within the DeFi community regarding the different types of pools supported by yield farming projects, namely the terms “pool 1” and “pool 2”, spearheaded mainly by the original YFI yield farm. “Pool 1” allows users to stake various pre-existing tokens that already have a liquid secondary market (e.g., ETH, stablecoins, etc.). “Pool 2” refers to yield farming pools that require exposure to the token being farmed, which directly bootstraps liquidity for the said token, so users in pool 1 have the option to take profits on their yield.

Yield Farming Strategies

Let’s talk briefly about Synthetix – a synthetic asset protocol powered by Chainlink Price Feeds. Synthetic launched a liquidity mining mechanism in 2019 to reward sETH/ETH LPs on Uniswap. The depositors who stake their sETH/ETH tokens from Uniswap earn a proportional amount of Synthetix’s native token – SNX.

LPs not only earn an extra yield on top of Uniswap trading fees, but they help by lowering the barrier for new traders entering the Synthetix ecosystem, as there was no way to convert ETH into sETH with much lower slippage.

Users who acquired sETH could then enter the Synthetix ecosystem and acquire other synths that provided exposure to other assets. Over time, Synthetix’s yield farming program shifted to begin providing SNX rewards to users who deposit sUSD (Synthetix’s stablecoin) on Curve Finance alongside other popular stablecoins.
While Synthetix was indeed a pioneer in this regard, the next iteration of yield farming—still often used in the market—was primarily popularized by Compound, a decentralized money market now powered by Chainlink Price Feeds, and the launch of its COMP governance token in June 2020.

Compound rewards users with COMP for supplying and borrowing capital on the platform. The launch of this yield farming mechanism in 2020 kickstarted an explosion of new DeFi projects and yield farms, known as “DeFi Summer” by blockchain enthusiasts, that utilized yield farming strategies similarly.

Risks involving yield farming

  • Smart contract risk: Unlike blockchains, considered secure for executing financial transactions, smart contracts are a whole other thing. Smart contracts depend on the quality of the code – bugs, hacks, and protocol exploits aren’t uncommon. That means the security of the smart contract depends mainly on the developer’s skill. DEVs mitigate the risks of using smart contracts by making their code open-source and doing security audits and testing practices.
  • Liquidation risk: Leverage is a big part of increasing your exposure to liquidity mining opportunities. There is always the possibility of a project selling capital to repay its debts. Liquidation risk is increased during increased market volatility and network congestion, when it may become overwhelmingly expensive to top up collateral to prevent liquidation. When trading with leverage, you should always consider the risks that come with it.
  • Systemic risk: DeFi applications tend to have dependencies on other DeFi protocols. This can multiply the risk associated with the smart contract. Even if a specific smart contract is secure on its own, it may not be if layered incorrectly with other contracts. Understanding the protocol exposure of a position is crucial to mitigate excess risk.
  • Impermanent loss: This type of loss occurs when the price of the tokens in the liquidity pool diverges in any direction. In other words, it is the difference in value over time between depositing your tokens for yield farming and holding them in a wallet. The term “impermanent” is used because as long as the price ratio between the token pair in the pool returns to its value at the time of deposit, the ‘loss’ disappears. Unfortunately, such a situation can be rare, making the losses in other cases permanent. Different protocols offer mitigation techniques for impermanent loss, while other protocols are not subject to this risk category.
  • “Rugpull” risk: The term describes a situation where projects launch a token only to extract as much value from it as possible before abandoning it. Rugpulls can happen in various ways—by removing a considerable portion of the liquidity from an AMM, preventing selling in the token’s contract, minting a significant amount of new tokens, and more. Due diligence is key when you are considering joining an early-stage project.

Here are a few yield farming protocols you can explore:

  • Uniswap (~20% to 50% APR) is a decentralized exchange where liquidity providers must stake both sides of the pool in a 50/50 ratio. In exchange, you earn a portion of the transaction fees plus UNI governance tokens.
  • PancakeSwap (~8% to 250% APR) is a decentralized exchange (DEX) based on Binance Smart Chain (BSC), unlike
  • Uniswap, which is based on Ethereum. PancakeSwap also offers a few extra functions related to gamification. The protocol has the highest locked total value of all the BSC DeFi projects. PancakeSwap offers BSC token swaps, staking pools, a gambling game where users predict the future price of BNB, and NFT art.
  • Aave (~0.01% to 15% APR) is an open-source liquidity protocol that lets users lend and borrow crypto. Depositors earn interest on deposits in the form of AAVE tokens. Interest is earned based on the market borrowing demand. You can also act as a depositor and borrower by using your deposited coins as collateral.
  • Curve Finance (~2.5% to 25% APR) is a liquidity pool on Ethereum that uses a market-making algorithm to let users exchange stablecoins. Pools using stablecoins can be safer since their value is pegged to another medium of exchange.
  • Yearn Finance (~0.3% to 35% APY) ​ is a group of protocols running on the Ethereum blockchain that allows users to optimize their earnings on crypto assets through lending and trading services. The project provides its services using only code, removing the need for a financial intermediary like a bank or custodian. To do this, it has built a system of automated incentives around its YFI cryptocurrency.