What Is Yield Farming in Defi and How Does It Work?

4 MINS READ

Typically in our understanding, a yield farm is the place where farmers grow crops, harvest them and eventually sell in the market. Now what may come as a surprise is that it is possible to do the same with decentralized finance Defi. In simple words, Defi Yield Farming can be described as the action of lending and borrowing cryptocurrency. Yet, if it all were so simple, the total value locked from the liquidity pools would not have crossed the bar of six billion and continue growing exponentially. Also, when speaking about yield farming, there are certain crucial topics that need to be covered. So, without further ado, let’s together explore and understand how the secrets of yield farming work.


How Does DeFi Yield Farming Work

Yield Farming largely operates as having a saving account in a bank and hoping to earn interest rates and afterwards sell or exchange initial cryptocurrency. Defi yield farmers aim to invest in a liquidity protocol with the highest and thus by far the most profitable APY, which stands for the annual percentage yield.

The APY is estimated by the returns from trading fees, also adding up the compounding interest rate of certain crypto assets over the course of a year.

When speaking of Defi yield farming, liquidity mining is a concept that comes closely interfering with it. Yet, liquidity mining is slightly different from yield farming Defi investors have the opportunity of gaining token rewards since certain Defi platforms such as Uniswap and Compound offer rewards in the ways of governance tokens and comp tokens to their main liquidity providers.

Governance token is an actual game-changer since it serves as a legislative paper that can make a difference in the system of decentralized protocols. It gives the holder an opportunity to vote for or against any shift within the system. Surely, after reading the benefits of both liquidity mining and yield farming, yet you do not have a clue how to jump-start your career as a successful yield farmer, the following passage is for you.


How do I start DeFi Yield Farming?

First and foremost, one will need access to the liquidity pools, which can be granted through Defi applications. The liquidity pool is in itself a combination of digital assets and funds locked in a smart contract. Thus the core purpose of liquidity pools is to solve the issue of illiquidity in the Defi protocols. By leveraging the lending protocol in the decentralized exchanges based on the Automated Market Maker system prevents the gap between the bid and ask price from becoming drastic. Liquidity, in general, is crucial in a decentralized system since it presents the ease with which one could turn crypto into actual money.

Now when users start the process of farming yield or, say, staking their cryptocurrency in smart contracts, they should choose in which of the famous tokens they are going to invest. The process can be based described in the example of one of the well-known decentralized exchanges, Uniswap.

Uniswap is a decentralized Defi exchange running on an Ethereum blockchain and currently generating over 1852 types of coins. Unfortunately, it circulates only Ethereum based coins can be traded on the platform, which means that users are not allowed to trade Bitcoin unless there is an equivalent token wrapped on ERC-20. The buying process in Uniswap is exactly the same as in any other exchange choose the desired cryptocurrency trading pair, click buy and proceed to make payment, yet when you are operating as a liquidity provider, there is a slight difference. Hence the price of the given token is determined via the Automated Market Maker, which differs from the order book as it does not base the price on the supply and demand of the token but regulates it using a constant equation that can shift the price upward or downward depending on how much liquidity is in the respective pool.

Uniswap runs on an automated liquidity protocol which, is also unlike simple order books where users have to wait for a party suggesting their ask price. So, automated liquidity allows users to deposit a pair of tokens in a separate liquidity pool; let’s say the user is willing to invest in ETH/USDT users has to provide the same amount of each to the pool. Thus if the user has provided 10 dollars worth of ETH, the same amount of USDT should be put in the protocol. Consequently, depending on the value of the investment that has been made, the user will hold a respective percentage in the pool, so the 10 dollars worth ETH/USDT investment may be equal to 1 percent of the overall funds in the protocol.

By providing liquidity to the protocol and locking their funds’ users are charged a fee of 0.30 percent, which is the gas fee for Ethereum. The fee is then automatically sent to the liquidity reserve. In this case, if the user who is also a liquidity provider wants to exit the trade and withdraw their assets, they will receive fees from the reserve same as in the amount of the assets they have locked in the pool.

If being a liquidity provider is not the best opportunity, another method of yield farming is simple lending and borrowing. Users can either lend or borrow cryptocurrency and earn incomes both ways. Lending allows users to get additional rewards from the lending protocol. Here you have to pay attention to the APR, which stands for the annual percentage rate; in Defi protocols like Compound or AAVE, the APR rate can go over 30 percent; additionally, it is always easily possible to turn the funds into actual money in lending system.

Opposed to lending stands borrowing in decentralized finance DeFi it is possible to generate income on it as well. Thus if the user has an Ethereum yet does not want to turn it to money, they can change the Ethereum for any other asset using Ethereum as collateral. Something to keep in mind is that in Defi, loans are overcollateralized, which means that users will also be required to pay for the interest rate of the borrowed cryptocurrency. The income by borrowing is generated when the Etherum that has been exchanged for the collateral asset grows in price, and the users repay the borrowed amount getting back the Ethereum with an increased value.


Can you lose money yield farming?

Yield farming is a quite complex initiative, and alongside its collective benefits, in case of not being careful enough with your funds, you can come across major risks. Risks of yield farming are various and may stretch from Ethereum gas and code bags in smart contracts to insufficiency of funds and impermanent loss. Here we are going to break them down separately and take a close look at each of them.

Strategy Risk

A well-structured yield farming strategy guarantees the success of the investor as a liquidity provider. As the prices of cryptocurrencies may continuously vary, keeping hold of only one strategy may not be a good idea. Preferably liquidity providers should use different strategies and have more than one approach to the matter since what worked one day might not be as usual the other day.

Volatility

Volatility is the measured value of exactly how much the price of a given asset changes over the course of time. The risk of volatility is conveyed via the price of the asset shifting down in a significantly short span of time. Since cryptocurrencies are comparable new investment strategies, they are considered to be relatively volatile as they can both potentially have tremendous upward or downward in price.

Liquidation Risk

In traditional finance, banks provide the funds; thus, users may be relatively sure of the sufficiency of the locked money. Yet, in decentralized exchanges, the liquidity in pools is generated by the users, and one day it may drop to zero even if the protocols have been generating high yields. Liquidity providers may liquid out during the time of low liquidity; thus, they are risking losing the money they have been continually staking in the liquidity pools.

Impermanent Loss

Impermanent loss is the action of losing one’s funds locked in a liquidity pool for a duration of time when volatility occurs in the trading pair. Liquidity providers typically deposit two kinds of tokens whilst one of them can be a stable coin, the other respectful token may be more exposed to volatility; thus, the ratio between the two tokens may vary thus when the ratio of the two tokens is drastically different from the primary equal ratio the impermanent loss occurs. The impermanent loss is calculated by comparing the value of the deposited token pair in the liquidity pool to the amount of value he would have had if he had not invested in the pool. Impermanent loss can also become permanent in case the user pools out the assets when the ratio is low and lose the invested money. Yet, the pools that mainly lock stable coins are exposed to a lesser amount of impairment loss; it is a saver to invest your coins in them as stable coins have relatively stable prices.

Ethereum Gas Fees

Ethereum gas fees are quite costly and are a huge risk for those investors who have small funds. In 2020 when investors started taking unforeseen advantage of yield farming, the Ethereum gas fees increased by 100 percent. The investors who do not have a considerable portion of funds locked in the pool or do not generate assets with high yield may be exposed to losses as a result.

Code Bugs in Smart Contracts

Smart contracts held the crypto assets in liquidity protocols. An occurrence of a bug in a smart contract code can close for the funds in Defi projects to drop to zero. Hackers can exploit the bugs within the system of the smart contracts to steal the funds stored in the smart contracts. The risk of code bugs in smart contracts can be eliminated by holding third-party smart contract audits.

Rug Pulls

Defi yield farming projects are subjected to a large portion of scams. Rug Pulls are a specific type of scam when developers may pull out the funds deposited by the investors and despair with them without ever returning them. One can avoid possible rug pull scams by depositing their funds in trusted projects and platforms.


Conclusion

The practice of having a savings account and maintaining a passive income by allowing your assets to grow in price has been constantly exploited. As the popularity of decentralized finance, Defi, is increasing from day to day, the practice of locking up one’s funds in yield farming protocols will also increase and develop alongside it. By wisely calculating all the risks, it is possible to still earn high returns and benefit from Defi Yield farming platforms and applications.