paint-brush
What is Yield Farming and Liquidity Mining? All You Need To Knowby@defihelper
357 reads
357 reads

What is Yield Farming and Liquidity Mining? All You Need To Know

by DeFiHelperMarch 3rd, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

In 2020-2021, the cryptocurrency market experienced its most powerful boom in its history. The number of new projects and overall market capitalization have grown significantly. Programmable blockchains like Etherum, Solana, Cardano, Polkadot, Avalanche, NEAR and the DeFi protocols running on them, have grown most noticeably. DeFi stands for Decentralized Finance. This is what they call financial services based on smart contracts. With skillful portfolio management and some luck, you can get returns in the tens of thousands of percent.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail

Coins Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - What is Yield Farming and Liquidity Mining? All You Need To Know
DeFiHelper HackerNoon profile picture

The complete guide to yield farming in DeFi: how it works, how much is it possible to earn on it, and the risks involved


In 2020-2021, the cryptocurrency market experienced large growth. The adoption of cryptocurrencies, the number of new projects and overall market capitalization have grown significantly. Public companies and states have started investing in cryptocurrencies. The employees of Google, Apple, Facebook have also started entering crypto projects or launching new ones of their own.


Programmable blockchains like Ethereum, Solana, Cardano, Polkadot, Avalanche, NEAR, and the DeFi protocols running on them, have grown most noticeably.


DeFi stands for Decentralized Finance. This is what they call financial services based on smart contracts that work on top of programmable blockchains. Examples of large DeFi protocols include the Uniswap and SushiSwap exchanges, Chainlink and Band Protocol oracles, Compound, Aave, Maker DeFi banks. At the end of last year, the total amount of funds locked in DeFi protocols reached $240 billion.


Yield farming is widely practised in DeFi. This is an investment strategy where users (liquidity providers) temporarily provide liquidity to the DeFi protocol in exchange for its tokens.


Yield farming is an extremely profitable, albeit risky, investment strategy. With skillful portfolio management and some luck, you can get returns in the tens of thousands of percent. Here is an example of such an investor who turned $130,000 into $89,000,000 within a year (as of this writing). That is 68,500% per annum.


In this article, we will answer the main questions regarding yield farming, including how it works, how much it is possible to earn on it, and the risks involved.


Our team has been engaged in profitable yield farming for more than two years. We have invested in many projects, and some members of our team later launched their own protocols. Among them are:


BondAppetit — a decentralized lending protocol for financing medium and large businesses. Its stablecoin (USDap) is fully backed by yield‑generating bonds.


DeFiHelper — an advanced investment tool that helps investors of any scale to easily manage and automate their investments across other DeFi protocols. Recently, DeFiHelper raised several hundreds of thousands of dollars from a number of US-based venture funds.


Both projects are directly related to yield farming. BondAppetit, like most projects on the market, uses farming to attract liquidity, and DeFiHelper helps increase the profitability from farming in other protocols.


How does yield farming work?

Why do DeFi protocols need liquidity at all? DeFi banks need it for issuing loans. Decentralized exchanges (DEX) need it for exchanging one cryptocurrency for another. In addition, all DeFi protocols are interested in easily exchanging their native tokens for other (more popular) cryptocurrencies. For this purpose, the token must be placed on a centralized exchange (a lengthy, expensive, and demanding process) and/or in liquidity pools on DEXs (permissionless) and attract liquidity in exchange for governance tokens.


It is necessary to make a digression at this point and talk about liquidity pools. On centralized crypto exchanges (CEXs), such as Binance, FTX, Currency.com or Kraken, trading takes place via order books. Some users place orders to buy or sell an asset, while other users accept them.


On decentralized exchanges, the mechanism is a little different. It uses automatic market makers (AMM) — algorithms that provide instant transactions and automatic regulation of the prices of assets in the liquidity pool. In its simplest form, the process works in the following manner:


  • Liquidity providers contribute several (usually two) cryptocurrencies to the liquidity pool for the same amount in dollar terms. From the moment of being deposited, the money is managed by the AMM.


  • Users who want to exchange one currency for another send an application to the pool. If there is liquidity in the pool, the user receives the necessary tokens in return at the AMM rate at a small commission (usually less than 1%). Part of the commission goes to the liquidity providers.


  • When the volume of one currency decreases in the pool, the AMM automatically raises its price and lowers the price of another currency.


  • The liquidity provider can withdraw their funds from the pool. Withdrawal conditions may differ. In some cases, users can withdraw funds at any time, in others, they can do so after a certain period of time. The liquidity provider may receive their tokens at a different ratio when withdrawing their money. This is due to the change in the exchange rate of the tokens relative to each other. But the total amount will remain the same.


Where does the yield in the hundreds and thousands of percent come from?

Yield farming is characterized by high profitability. The norm is tens of percent per annum, often hundreds, and even thousands of percent. Where does this income come from?


High yield helps protocols solve their own problems:


Fast liquidity attraction. Users bring liquidity and protocols to use it to make money.


Advertising. Centralized banks and insurance companies spend money on advertising to attract users. DeFi protocols directly distribute their money to users as advertising.


Community building. Communities play an exceptionally high role in the crypto market. For large projects, the community is more important than the team and often merges into a single whole. Community members can be users, holders of governance tokens, developers, or even angel investors at the same time. The distribution of governance tokens is a guarantee of stability and decentralization of the project. For example, BondAppetit has so far distributed ~12% of all governance tokens out of the 65% reserved for the community. Examples of how decentralized governance looks like in mature projects can be seen in Curve, Compound or Maker.



Profitability in the hundreds and thousands of percent, as a rule, does not last long. The cream of the crop comes from early investors who enter the protocol in the first days or weeks of operation. Then the yield drops and it becomes unprofitable for protocols to keep a high APY forever, as high emission volumes create an excess supply of tokens, which puts pressure on the price.


Therefore, hardcore farmers are constantly looking for new projects. There is a small (several tens of thousands of people), but very active and super mobile international community of DeFi farmers in the world. These people enter new protocols first. Many of them operate with millions of dollars and are constantly shifting funds from one project to another in search of the highest returns.


What are the risks of yield farming?

Yield farming comes with risks:


Impermanent loss. An investor deposits several (usually two) cryptocurrencies into the pool for the same amount in dollar terms. By the time the funds are withdrawn, the exchange rate of tokens relative to each other can change significantly. When withdrawing money, the investor will receive the same amount, but in a different ratio of tokens. If the amount is large, and the market depth is insufficient, then selling off said tokens can be a problem.


Example. An investor contributed 10,000 Super Elon Floki tokens (a fictitious currency) and 10,000 USDC to a pool. At the time of deposit, 1 Super Elon Floki was worth 1 USDC. After a while, the rate of Super Elon Floki dipped significantly, and the investor received 1,000,000 Super Elon Floki and 100 USDC at exit. At the same time, the investor cannot sell 1,000,000 Super Elon Floki because of the low market depth, since there is little money in Super Elon Floki pools, and any sale, even in a small amount, drops the price even further.


High fees. During periods of high gas prices on the Ethereum network, the cost of a transaction can reach several hundred dollars. If you invest a small amount, then the commission can gobble up all the profits. The entry threshold for yield farming starts at several thousand dollars.


Also pay attention to the presence and size of the deposit fee. If there is such a commission, then you immediately find yourself at a loss when liquidity is injected into the pool.


Hacks. DeFi protocols get hacked from time to time. The only advice here is to invest in projects of technically strong teams with security audits conducted by reputable companies. Some projects are closed after hacks, but some survive even after several hacks. The THORChain project experienced two hacks in one week in the middle of last year. The number of funds locked in the protocol has only increased since then.


Interestingly enough, some known vulnerabilities remain unpatched for months. Last year, in ourjoint article with the security experts from HashEx, we drew attention to a vulnerability in SafeMoon that has spread across hundreds of projects and is capable of resulting in billions of dollars in losses.


Errors in smart contracts. In addition to hacks, money can be lost due to banal mistakes made by the project developers in the smart contracts.


Rug pull. This is what they call the theft of investors' money by the project team. Rug pull is usually practiced by anonymous teams.


Improper project assessment. It is easy to make a mistake in assessing the prospects of a project. There are dozens of pitfalls — the idea may not work, the team may fail, the competition may be too tough, etc.


Bad tokenomics. Even if the project is promising and the team is sensible, the token may fall in price due to the peculiarities of its own tokenomic model that might include high emission, the unlocking of a large number of tokens of the team and early investors under the terms of vesting, etc. The tokenomic model needs to be carefully studied.


How to avoid impermanent loss

The risk of impermanent loss can be reduced in several ways:


Invest in stablecoin pools. For example, USDap/USDN, DAI/USDC/USDT or DAI/BUSD. The prices of popular stablecoins fluctuate in a narrow range, so the risk of impermanent losses in such pools is small. But lower risk comes at the cost of lower returns. Yields above 15% on stablecoins are considered high.


Invest in pools of correlated assets. Correlated assets rise in price and fall in price synchronously. A strong correlation is typical for the native coins of the network and the largest DEX tokens on this network. For example, BNB-CAKE or AVAX-JOE.


What are APY and APR in yield farming?

These are terms inherited from traditional financial markets. APY is the annual percentage yield. APR is the annual percentage rate. When calculating the APY, the effect of addition is not taken into account, but it is in the case of APR. Addition means direct reinvestment of profits for higher profits.


Where to find promising DeFi projects

New DeFi projects are popping up almost every day. How is it possible to find out about them?


‘Recently Added’ sections on Coinmarketcap and Coingecko. Coinmarketcap has stricter rules, adding a protocol can take weeks. Coingecko is more liberal, new projects appear there earlier.


Personal accounts of hardcore farmers in Telegram and Twitter. Many farmers maintain personal accounts and share promising finds. Examples: Small Cap Scientist, DeFi Brian.


Telegram and Discord chats, subreddits. Example: CryptoMoonShots subreddit.


Aggregators**. Examples: VFAT.Tools, Defillama, DeFiPulse, DeFiPrime.

How to farm with Bitcoin

There is no full-fledged DeFi in the Bitcoin network, unlike Ethereum. The Stacks project is solving this problem. Stacks is a layer-1 blockchain that connects to Bitcoin and brings smart contracts and decentralized apps to it. Smart contracts and apps developed on the Stacks platform are natively integrated with the security, stability, and economic power of Bitcoin.



If you have BTC and want to use it to make money on DeFi, then you can issue WBTC (“wrapped” Bitcoin on the Ethereum network) against the security of Bitcoins and invest these coins in DeFi protocols.


How to move funds between different blockchains

Professional DeFi farmers are always on the lookout for new, more profitable projects. In the modern crypto market, there are more than a dozen ecosystems (programmable blockchains) with farming opportunities. Generally, the younger the ecosystem/DeFi protocol, the higher the returns.


Centralized (CEX) and decentralized exchanges (DEX) are used for exchanging one token for another. On a centralized exchange, users can exchange any somewhat popular tokens on any blockchains. But they have to trust the market. From the moment they send their cryptocurrency to the exchange account, they lose real control over it.



On a DEX, users only lose control of the cryptocurrency at the time of the exchange. But only tokens that exist within the same blockchain can be exchanged. What if one needs to exchange, for example, USDC stablecoins on the Ethereum network for USDC on the Solana network? Or Bitcoin to USDC? Blockchain bridges will come to the rescue:


Rango

Thorswap

Brokkr

Skip

Solana Wormhole

Avalanche Bridge

Binance Smart Chain Bridge

RenBridge

Terra Bridge

Rainbow Bridge

Anyswap

Arbitrum Bridge

Multichain

Synapse Bridge

SpookySwap


How to increase the profitability of farming

The accumulated interest income is automatically added to the body of the deposit in the case of deposits offered by banks and centralized services (CEX, staking services). This is usually not the case with DeFi protocols because each transaction costs money. How do they solve this problem?


Auto-compounding services are the solution that help by automatically re-staking the deposit taking into account the earned profit. What level of yield will it give? For example, on a deposit of $10,000 with a 50% APY, the yield increase will be 13%. That is, the final yield will not be 50%, but 63%.