Yield Farming is a way to make more crypto with your crypto. It involves lending your funds to others through smart contracts and earning interest on it. Yield Farming involves very complicated strategies to generate the maximum return possible. Now before we dive into Yield Farming, we need to understand some terms related to it.
Decentralized Exchanges
Most of the centralized exchanges like Binance work on the order book mechanism. However decentralized exchanges work on the liquidity protocol because the Ethereum network is not fast enough for running order book mechanisms. Liquidity protocol includes depositing the assets in a pool so that users can buy and sell assets from the pool.
So, let’s consider the ETH/USDT liquidity pool. We’ll call the ETH portion of the pool x and the USDT portion y. Uniswap takes these two quantities and multiplies them to calculate the total liquidity in the pool. Let’s call this k. The core idea behind Uniswap is that k must remain constant, meaning the total liquidity in the pool is constant. So, the formula for total liquidity in the pool is:
x * y = k
So, what happens when someone wants to make a trade?
Let’s say Alice buys 1 ETH for 300 USDT using the ETH/USDT liquidity pool. By doing that, she increases the USDT portion of the pool and decreases the ETH portion of the pool. This effectively means that the price of ETH goes up. Why? There is less ETH in the pool after the transaction, and we know that the total liquidity (k) must remain constant. This mechanism is what determines the pricing of the assets.
Decentralized Borrowing and Lending Platforms
In these platforms, Lenders deposit their money into the Liquidity pool to earn interest on it. After they deposit their crypto they get a wrapped token called aToken.
For instance, if someone deposits ETH he will get aETH in return.
aToken holders receive interest payments in return. It’s just like the dividends of a stock. Note that aTokens can be traded just like normal tokens.
Borrowers have to deposit collateral in order to borrow from Aave. The loans are always overcollateralized i.e. we have to deposit collateral greater than the value of what we are borrowing. This is because of the volatility in Crypto.
For instance, if someone wants to borrow 100$ of ETH he has to deposit 120$ of collateral.
Now people will wonder why anyone would want to take such a loan. Here’s an example.
Let’s say BOB owns 120$ of ETH and he wants to sell it because of some emergency situation. But BOB also knows that the price of ETH may increase and he can miss the returns. SO he borrows DAI and deposits ETH on Aave. This way he can sell the DAI and whenever he wants his ETH back he can just buy DAI and return it.
The borrowing and lending rates are determined by the Aave algorithm using smart contracts.
It entirely depends on the utilization rate of the asset. Utilization rate is the % of assets that are being used in a pool. Here’s an example –
If nearly all assets in a pool are used, the interest rate is high to promote liquidity providers to deposit more capital. If nearly no assets in a pool are used, the interest rate charged is low to promote borrowing.
Note that the rates of Stablecoins are more because other assets in crypto are quite volatile.
Total Value Locked – It denotes how much the total value of crypto assets is locked in a protocol. It’s a great way to measure the health of a DeFi protocol. A good place to track TVL is Defi Pulse. You can check which platforms have the highest amount of ETH or other crypto assets locked in Defi. This can give you a general idea about the current state of yield farming.
What is Yield Farming
Yield farming also referred to as liquidity mining, is a way to generate rewards with cryptocurrency holdings. In simple terms, it means locking up cryptocurrencies and getting rewards. Yield Farming usually includes Providing liquidity in decentralized exchanges and decentralized lending and borrowing platforms. This practice includes using complex strategies to maximize our returns. Note that Yield Farming is a practice that can include any type of investment which can generate a return.
How to calculate the returns from Yield Farming?
Some commonly used metrics to calculate the returns are Annual Percentage Rate (APR) and Annual Percentage Yield (APY). The difference between them is that APR doesn’t take into account the effect of compounding, while APY does. Compounding, in this case, means directly reinvesting profits to generate more returns. Note that these metrics are just an estimation of the returns and they may not be exactly correct. It’s also worth keeping in mind that these are only estimations and projections. Even short-term rewards are quite difficult to estimate accurately. Why? Yield farming is a highly competitive and fast-paced market, and the rewards can fluctuate rapidly. If a yield farming strategy works for a while, many farmers will jump on the opportunity, and it may stop yielding high returns.
How to do Yield Farming?
If you have enough knowledge of the different protocols of Defi You can manually choose between different options. But if You are not familiar with the different Defi protocols then you can opt-in for Yield Optimizers like Yearn Finance( ETH ) and Beefy Finance( BSC ).
Yield Optimizers are like Mutual Funds. We have different options with different returns and we can choose between them. After we invest in any of their products, we get their native tokens in return. Whenever we want our assets back we can just return the tokens and receive them. Yield Optimizers use smart contracts and automatically find the best way to generate the maximum return. In fact, some of them may not even show their strategy so that other users don’t catch the opportunity and decrease the overall return.
Risks involved in Yield Farming
- Complexity
Yield farming isn’t simple. The most profitable yield farming strategies are highly complex and only recommended for advanced users.
- Liquidation
This can be understood with a simple example of borrowing DAI by depositing ETH in a lending pool. Let’s assume 1ETH = 3000 DAI and I deposited 1.1 ETH ( worth 3300 DAI ) and received 3000 DAI. Now when the price of ETH will reach 2727 DAI we will have an equal value of DAI received and ETH deposited.
If the price of ETH dropped by even 1$, the entire deposited ETH will be liquidated. Here 2727 is the Liquidation price. This is because when the price drops further the person who borrowed DAI will have more value than what he initially deposited and therefore he can default. So to make sure this doesn’t happen the ETH will be automatically liquidated. Therefore we have to regularly check the prices of our deposited assets.
- Bugs in the Smart Contract
Sometimes the smart contracts may contain bugs which can lead to loss of capital.
- Impermanent Loss
Let’s take an example of the ETH/DAI pool. Assume that the price of ETH is 100$. If I deposit 1ETH and 100DAI in a pool of 10ETH and 1000 DAI, I would be having a 10% share of the pool. If the price of ETH reaches 400 DAI so according to the equation there will be 5 ETH and 2000 DAI in the pool. If I withdraw my 10% I would get 0.5 ETH and 200 DAI which is 400$ in total. I initially deposited 200$ and now got 400$. But here’s a twist, if I had just held my 1 ETH and 100 DAI instead of depositing them into the pool, it would have been 500$ in total. Now this 100$ loss is known as an impermanent loss which becomes permanent when you withdraw your funds.
Conclusion
Yield Farming is a great way to earn interest in your crypto. However, you have to keep track of the market if you want to proceed with it. It is suggested that you should choose platforms or pairs which have a high TVL( Total Value Locked ). If you want to generate stable returns then you should opt for stablecoin pairs as the risk of liquidation is much less in stablecoin pairs. Remember risk is directly proportional to reward; the more the reward, the more is the risk attached to it.
Also Read: How to earn Yield using farming on Arbitrum