Yield farming has become one of the main drivers of the development of DeFi and the cryptocurrency market as a whole over the past two years. Largely thanks to farming, billions of dollars have flowed into the sector from traditional finance.
If in the early days yield farming developed only on the Ethereum network, over the past year such DeFi services have appeared in more than two dozen alternative ecosystems based on blockchain platforms such as Binance Smart Chain, Polygon, Solana, Fantom, Avalanche, xDai, HECO Chain, Kardiachain, Iotex, Tron, Terra and others.
To help newcomers avoid common errors, ForkLog has compiled a detailed guide to yield farming. We will discuss methods for selecting DeFi services and assets for this form of investment and show how to deposit and withdraw funds from liquidity pools. We will also discuss how best to manage the income obtained.
- The yields of farming pools are constantly changing and depend on the policy of DeFi services, liquidity volumes, and the exchange rates of assets in the pool.
- Impermanent loss and the active emission of tokens that pay the rewards are the main factors diminishing farming profitability.
- Among the hundreds of DeFi services rewarding liquidity provision, decentralized exchanges command the greatest trust.
- The best way to mitigate the risks of yield farming is diversification across different ecosystems, DeFi services, and liquidity pools.
Where does the farmer’s income come from and how is it calculated?
First, it should be noted that yield farming or farming refers to earning rewards for providing liquidity to DeFi services — decentralized exchanges that use the automated market maker (AMM-DEX) model.
A farmer’s income consists of two components:
- a share of the trading fees generated by buying and selling assets in the pool;
- rewards for providing liquidity paid in the exchange’s governance tokens.
Moreover, usually the second component yields many times more than the first.
For each pool, a certain number of tokens is allocated per day according to the exchange’s liquidity needs for particular asset pairs. Rewards are distributed among all pool participants in proportion to their stake.
For example, the pool receives 10 tokens per day. If you own 10% of the pool’s value, you will earn 1 token per day from farming. But if the pool attracts many investors and grows tenfold due to new deposits, your share falls to 1%, and you would receive 0.1 token per day. Accordingly, farming profitability falls tenfold.
At the start of new pools, while they are nearly empty, one can see incredible yields in the thousands and tens of thousands of percent per year.
But as the volume of liquidity locked in the pool — Total Value Locked (TVL) — grows, its actual yield declines sharply.
Another common reason for a drop in the metric is the decline in the exchange rate of the tokens that pay the reward. This can happen due to high emission rates and ongoing selling by farmers seeking to pull out income. As a result, the price charts of these tokens may look like a free fall.
As a result, the combination of these two factors can reduce attractive 1000-1500% annual yields in a matter of days to the more typical 20-50%.
Thus, the profitability of farming pools is constantly adjusted not only by the size of the rewards but also by liquidity inflows/outflows and market dynamics. In many ecosystems, transaction costs amount to mere cents. Therefore, investor capital is continually seeking optimal yields and flows into promising pools within minutes.
What to farm and where?
New DeFi services promising liquidity-provision rewards appear almost daily. But do not entrust your funds to the first pool you come across.
A sense of the diversity of DeFi services with farming pools can be formed in the crypto aggregators CoinMarketCap and CoinGecko. Here you can learn the TVL of hundreds of pools, current yields, and sort them by various parameters. Pay attention also to the presence of smart-contract audits, which substantially reduce the risk of hacks and theft.
One of the most comprehensive aggregators for farming pools across several ecosystems is the service VFAT.Tool. Despite its austere design, it provides the most up-to-date list of DeFi services for each network.
And when connected to a Web3 wallet the service lets you know the TVL of each pool, its current yield, and manage investments: add and withdraw liquidity, claim rewards.
If the web interface of your pool is unavailable for any reason, the service provides an Emergency Withdraw button to promptly pull funds from it.
Thus, for the aspiring farmer there are dozens of ecosystems, hundreds of DeFi services, and thousands of farming pools. How to make the optimal choice given such diversity?
Three main risk types must be considered that directly affect the final yield of farming:
- a decline in the value of assets in the pool;
- a decline in the value of tokens in which rewards are paid;
- the occurrence of impermanent losses.
Price decline risk is inherent to any crypto asset, even stablecoins. As for the devaluation of the token used to pay rewards, this risk is much lower for governance tokens of major AMM-DEXs with high trading volumes and hundreds of thousands of users. In practice, the quotes for these assets do not lag behind the broader crypto market. This is one of the key reasons why yield farming should favour the largest AMM-DEXs in the ecosystem.
You can identify leaders by their TVL, for example on the DeFi Llama service or by trading volumes on CoinGecko.
What are impermanent losses (Impermanent Loss or IL) we have already detailed in our educational cards. In short, it is the foregone profit from relative price changes in the asset pair. For example, if coin A in the pool falls in price relative to coin B by a factor of two, IL would be 5.7%, and with a fivefold price change IL would be 25% compared with holding the same asset pair in a wallet.
Because IL significantly reduces the final farming yields, investors must seek ways to minimise its impact. There are four paths, all related to choosing the right pool.
Stablecoin pools. Most DeFi services offer stablecoin pools, e.g., USD-USDC, DAI-USDT, BUSD-USDC and others. Since their prices move in a very narrow range, IL risks here are minimal. The downside is lower yields for the sector — around 5-20%.
Wrapped-asset pools. They contain two wrapped variants of a single asset, e.g., WBTC-ibBTC, which protects against IL. However they are rare and feature very low yields — usually no more than 1-2%.
Correlated-asset pools. If the assets in the pool rise and fall in sync, IL risks decrease. As practice shows, a strong positive correlation over long time horizons (weeks and months) is observed between the network’s native coin and the token of the largest AMM-DEX in this ecosystem. This same pair usually has the largest TVL and trading volumes:
- for the BSC network this pair is BNB-CAKE;
- for Polygon – MATIC-QUICK;
- for Fantom – FTM-BOO;
- for Avalanche – AVAX-JOE.
Also positive correlation is shown between native network coins and ETH: for example, pairs BNB-ETH, MATIC-ETH, FTM-ETH, AVAX-ETH. However, on the annual chart for each of these pairs it’s not hard to notice periods of multi-fold growth of coins in other ecosystems, which corresponds to IL rise periods.
Solo-farming pools. To reduce the incentives to cash out rewards, a number of AMM-DEXs offer pools where you can accumulate the governance token of the exchange and receive rewards for it.
For example, in Syrup Pools on PancakeSwap, the largest decentralized exchange on the BSC network, you can stake CAKE and receive tokens from other projects with yields of 40-60% per year. These pools are free of IL risks, but there remains the risk of a decline in the governance token’s value.
There is another important point when choosing a pool. Seeing attractive yields, you should inspect the terms more closely. Often you can notice a Deposit Fee — a fee charged when adding liquidity, which can range from 0.1% to 20%.
Placing assets into such pools you immediately incur a loss. It will be offset by farming income only after several days or weeks, depending on the balance of the fees and yields.
The key to reducing most yield-farming risks is broad diversification: not only across different pools but across different platforms and ecosystems.
The mechanics of farming
DeFi services on the Ethereum network still lead in TVL. But for the average investor they are increasingly less accessible due to high fees. Interacting with liquidity pools here costs not less than $70-90. Therefore, we reserve farming on the Ethereum network for large investors and turn to alternative ecosystems where transactions are cheaper.
The first thing a beginner farmer will need is a Web3-compatible wallet, for example MetaMask, Math Wallet or Trust Wallet in the form of a mobile app or a browser extension on a PC. Earlier we published a detailed guide to the use of Uniswap and other AMM-DEX. It is worth studying for beginners in crypto before attempting to master farming.
Connecting MetaMask to Binance Smart Chain, Polygon, Fantom and other EVM-compatible blockchains is easiest with the service ChainList.
Adding new blockchains to MetaMask involves four actions:
- Click Connect Wallet to connect your Web3 wallet to the site;
- Find the required blockchain in the list;
- Click Add To MetaMask;
- Confirm the network connection parameters in the wallet window.
In the wallet there should be funds to invest in the pool, as well as some amount of the network’s native coin to pay transaction fees.
Now step by step we show how to put assets into farming using PancakeSwap as an example. Of the dozens of available pools we choose the most popular — CAKE-BNB, promising around 45% per year and with a TVL over $529 million.
For a start you need to approve the pool’s smart contract by clicking Enable. This action requires paying gas.
After the transaction is confirmed, the Stake LP button will appear.
Move to the Trade-Liquidity tab and click Add Liquidity.
In the open form, choose the asset pair and the size of the position. The amount of tokens is automatically set so that they are in a 1:1 ratio by their current value.
In our case, 0.0282613 BNB and 1 CAKE will be exchanged for 0.163229 so-called “liquidity provider tokens” or LP tokens.
Note the asset ratio shown is 1 BNB = 35.38 CAKE. With any deviation from this level due to price movements of both assets, impermanent losses begin to accrue.
If you want this LP token to appear in MetaMask, you can click Add CAKE-LP to MetaMask.
Until you stake LP tokens in the pool, you can view them in the wallet via the block explorer for the network (in our case — BSCscan).
These LP tokens are exactly what you place in staking in the pool.
Operation requires wallet confirmation and payment of the fee.
The figure below shows the pool with your funds after transaction confirmation. It shows the number of LP tokens (which will remain unchanged) and its current value, which depends on the exchange rates of BNB and CAKE.
To top up this pool with LP tokens, press “+”, and to partially or fully withdraw LP tokens, select “-“. Each operation must be confirmed in the wallet, paying the corresponding transaction fee.
Beside the current yield there is an online calculator icon. With it you can easily calculate the total return for your investment over a given period, including the impact of regular reinvestment of rewards.
To collect rewards you need to click the Harvest button and confirm the operation in the wallet. After confirmation, the farmed CAKE tokens will be sent to your wallet. An automatic accrual of accumulated rewards also occurs with every top-up or withdrawal of LP tokens.
If the yield in this pool no longer satisfies you, you can withdraw liquidity at any time. In that case all actions are performed in reverse order.
First, using the “-” button, LP tokens are withdrawn from staking in the pool.
This operation requires wallet confirmation and payment of the fee.
Then in the Trade-Liquidity section you need to select that LP token which is to be burned.
For this you need to approve this LP token once by pressing Enable and confirming in the wallet.
Then click the Remove button and confirm the transaction in the wallet.
After that, the LP tokens are burned along with the release of CAKE and BNB.
Note that we deposited assets into the pool at the rate 1 BNB = 35.38 CAKE, and withdrew at the rate 1 BNB = 35.5063 CAKE. Because of IL, CAKE tokens ended up slightly higher, and BNB a little lower.
The mechanics of farming on other AMM-DEXs in the BSC network and in other EVM-compatible networks are similar. The only differences are the site design and button placement.
For example, on the well-known AMM-DEX SushiSwap, the liquidity-addition buttons are on the pool’s panel itself. Rewards here are paid in SUSHI tokens.
How to manage farming profits?
According to the rules of a particular DeFi service, farming rewards may accrue with every block or with another cadence. That is, you can claim them several times a day. In practice, the cost of transactions is a limiting factor: it is hardly sensible to spend $0.50-$0.60 (a typical BSC fee) to collect a $1-$2 reward.
There are several tactics for managing farming income:
- regular withdrawals;
- reinvesting in the same pool;
- reinvesting in other pools of the same DeFi service;
- reinvesting in solo-farming pools
- reinvesting in pools of other DeFi services.
There are autocompounding pools that, at certain intervals, for example daily, automatically add all accumulated rewards back into the pool without gas costs. Thus, rewards begin to compound, significantly increasing returns over a horizon of several months.
On yield farming, the world does not end
While yield farming remains one of the most profitable and popular strategies for passive income from crypto assets, it is important to remember other instruments as well:
- staking of PoS cryptocurrencies;
- cryptocurrency deposits on centralized crypto exchanges (Binance, KuCoin, Gate.io and others);
- providing liquidity to decentralized lending protocols (Aave, Compound and others);
- providing liquidity to centralized lending services (Nexo Finance, Celsius Network and others).
Each of these directions has its own ranges of returns, advantages and risk profiles. Therefore, the most prudent approach for a private investor is diversification of investments.
Subscribe to ForkLog news on Telegram: ForkLog Feed — the full news feed, ForkLog — the most important news, infographics and opinions.
