1. Home
  2. Learn
  3. Defi
  4. Yield Farming in DeFi

Yield Farming in DeFi

What is Yield Farming?

With DeFi (decentralized finance) being all the rage this 2020, a new subsection within DeFi has emerged called “Yield Farming”. With yield farming, users are able to earn passive income without buying or selling their assets. This is similar to how banks offer you an interest rate for keeping your money in your savings account (albeit a meager 0.5%). They are able to generate this yield because they, in turn, lend it to someone else at a higher rate. The return is small in comparison to their lending rates of 8%-10%. The spread is a big source of their revenues and profits.

How to Earn from Yield Farming

Most people are familiar with how interest rates work. You put money into your savings account and you get paid an interest rate after holding it for some time. While there are schemes such as time deposit which can help increase your annual percentage return (APR), it all basically revolves around the same concept. As for the rates, you’d be lucky to get 1%. On the other hand, in DeFi, there are multiple ways to earn a yield and thus the term Yield Farming. This also means that users can quickly switch from one service to another to maximize their yield.

Interest rates – Similar to traditional finance, you get a yield from lending out your coins. Different coins will have different yields. Different platforms will also have different yields. This brings an opportunity to arbitrage by borrowing from one platform and lending it on another. For example, interest rates for stablecoins like USDT can range from 8% to 11%.

Liquidity Provider Fees – Providing your tokens to decentralized exchanges such as Uniswap or Balancer lets you earn liquidity provider fees. When an exchange happens between a buyer and a seller, a percentage of the transaction goes to you as a liquidity provider as a form of incentive to keep providing liquidity.

Protocol Incentives and Rewards. – Since many of these DeFi applications are still new, creating the initial liquidity can be a problem. DeFi protocols have set aside a budget, usually in the form of their own tokens, that are used to incentivize and reward people for using their platform whether its borrowing (yes, you get rewarded as well for borrowing) or lending. These tokens also act as governance tokens so it rewards early users and gives them a chance to govern the protocol. This is earned as an extra incentive on top of the interest rates. This is similar to how Paypal raised tons of money from VCs when it first started to subsidize their referral programs or how Bitcoin and Ethereum miners not only get the transaction fee but they also get block rewards. And in the same case, this incentive and reward reserve will eventually be depleted. The hope is that once that happens, the project has achieved escape velocity and is already self sustaining. Liquidity providers will be profitable from the fees alone.

Common Examples of Yield Farming

To better understand yield farming, let’s look at some example of yield farming.

Example #1: Curve Finance Y Stablecoin Pool

Curve Finance (www.curve.fi) is a DEX that is optimized for trading and exchanging stablecoins. While stablecoins are meant to be pegged 1:1 to the dollar, there are still very minor differences when exchanging between them. That is where Curve comes in. Common examples of stablecoins include USDC, USDT and DAI. From the three earning methods mentioned above, the first (Interest rates) and second (LP fees) apply in this example.

When users come to Curve to exchange their stablecoin for another, the hope is to get a near 1:1 ratio with the least amount of slippage. This is possible because of the liquidity pool of different stablecoins within Curve. Yield farmers come to Curve to deposit their stablecoins and earn a yield and LP fees (currently at 0.04%).

Advanced note: The interest rate comes from iearn.finance which is an interest bearing protocol  which automatically moves it to the highest earning lending protocol. They wrap your stablecoins into these y tokens. These all happen behind the scenes so it is not something you have to worry about.

While this is a good opportunity with much higher interest rates compared to what banks offer, there are also risks involved. Since these protocols are all run on smart contracts, the biggest risk would be a bug in the smart contract. These protocols have gone to lengths to have their protocols audited but at the end of the day, the risk still exists.

Example #2: Compound Governance Token

Unlike in the first example, which is an exchange example, we will be using a money market example. Compound (www.compound.finance) is one of the top 2 largest Defi applications when it comes to total assets under management. It currently holds over $600 million in crypto assets such as USDT, ETH, and even smaller market cap alt coins like BAT and ZRX. The rates are all published in their website : https://app.compound.finance/

When it comes to yield farming, there are two ways to earn from the Compound platform. First is through the interest rates published. If you lend out USDT, you get a yield of around 2% currently.

On top of this, you will also be receiving an incentive in the form of COMP tokens. Everyday, Compound releases hundreds of thousands of dollars worth of COMP tokens distributed to their platform users. Both lenders and borrowers get a portion of this incentive. However, this won’t last forever as this is just an initial incentive to create liquidity at the start. There was a point where the rewards were worth more than the interest fee of borrowing. This led to a massive rush to borrow and supply tokens.

As for the risks, there are three main ones. As with all smart contracts, a bug on the code is a big risk as explained above. Second, for yield farmers that calculate the price of COMP as a part of their revenue or profit, the price fluctuation of COMP can be an issue. COMP tokens have been volatile since they were introduced to the market. It peaked at around $372 and is currently hovering around $159. Lastly, for those who are taking leveraged positions (e.g. borrowing and lending out 2x or 3x of capital), risk of liquidation is always on the table.

Example 3 : Balancer Pool Token for SNX (Synthetix)

This is a unique yield farming scheme that works only for those tokens that adds an extra incentive to promote liquidity for pools in exchanges. In this example, we are looking at SNX pairs in Balancer pools. Yield farming SNX pools on Balancer will earn you yield in three different ways.

First is through liquidity provider fees. Unlike Uniswap pools which require a 50:50 ratio of token and ETH or DAI, Balancer pools do not require that. Instead, the liquidity provision varies depending on the pool. An example would be the $BAL (Balancer) and $WETH (Wrapped Ethereum) pool which requires an 80:20 ratio of BAL to WETH when adding to the liquidity pool. By adding to the liquidity pool, you will be earning a liquidity provider fee. In the example above, the pool swap fee is at 0.15%. So you will be getting a portion of the 0.15% fees collected by the pool in proportion of your size to the pool. Second, similar to COMP token rewards, users that provide liquidity to Balancer pools will be receiving BAL governance tokens as rewards. Lastly, SNX (synthetix) is giving away an additional reward for those that provide liquidity to the SNX pools in Balancer. After depositing SNX and USDC into the SNX balancer pool, you will be receiving a BPT token. This token can then be staked on the SNX Mintr website which rewards you with SNX. Think of this as SNX’s reward for those that provide liquidity to their token.

As for the risks, it is similar to those mentioned above. Smart contract bugs and exploits remain the biggest risk. The second is the loss of value of the reward tokens you receive if the value of BAL or SNX falls.

The hype around yield farming is real. Interest rates for certain tokens have caused significant appreciation in value as people rush to buy the token in exchanges. One thing to note is that yields are very high right now because it is majorly subsidized through the incentive programs by the protocols. However, it remains to be seen in the future if it will be profitable as platforms mature, users increase and individual rewards decrease. Yield farming still remains to be a more profitable option even from the lending rates alone when compared ones offered in traditional finance.