The emergence of decentralized finance (DeFi), which has reached from a Total Value Locked (TVL) of $125B from $10B in October, has brought with it striking innovations not only for blockchains and the cryptocurrency ecosystem, but also for the entire finance world and understanding of economy. These innovations are sometimes applications in the traditional financial system, sometimes innovative tools and terminology specific to the world of DeFi.
Yield Farming and Liquidity Mining are among these concepts. These two concepts, which are often used in the same sense, relate to passive income generation by staking assets on certain platforms. However, these processes are more complex than they seem, and there are certain differences between these two concepts.
Yield Farming
This concept, whose name is a combination of the words "yield" and "farming", refers to a system in which income is earned within a certain period, just like in agriculture. Yield Farming means that users earn passive income by lending or staking their digital assets to specific DeFi protocols.
Unlike centralized exchanges and banks, lending protocols and decentralized exchanges (DEX), which are at the heart of the DeFi ecosystem, operate on the blockchain via smart contracts.
For example, an investor who wants to borrow ETH worth $100 by depositing WBTC worth $200 from the Aave platform, interacts with smart contracts and makes the deposit and withdrawal transactions with smart contracts, not with a user or institution. So, how does a smart contract provide the amount of ETH that the user wants to purchase? This is where Liquidity Providers come in.
Liquidity Providers
Liquidity is the extent to which an asset can be converted to another one without deviating from market prices. So, there is a market where a user can sell WBTC worth $100 at any time and receive ETH worth $100 in return. On centralized exchanges, buy and sell orders at certain prices depend on the users who place these orders. However, in decentralized platforms, liquidity is provided by the pools created by the smart contracts we have just mentioned. In exchange for providing liquidity to the pools, certain incentives are given to the users.
Various lending platforms such as Aave, Maker, YFI, and especially Compound, which started the Yield Farming concept, provide loans to users against collateral at interest rates determined according to market conditions. Borrowed cryptocurrencies are cryptocurrencies that other users have lent to the protocol, in other words, the cryptocurrencies staked into liquidity pools. The lender (the Liquidity Provider) earns a certain interest on the cryptocurrency he stakes, which is determined by calculating APR (Annual Percentage Rate) or APY (Annual Percentage Yield). The difference between these two: With the simple interest formula, the APR is calculated by multiplying the daily return by 365, and the APY is the calculation of the annual income by applying compound interest and adding the hourly/daily/weekly earnings to the principal according to the optimum strategy.
For example, if a user wants to lend 5 ETH worth $2000 to Aave’s liquidity pools, he receives a special token called aETH, which represents his $2000 investment. The value of this token constantly increases with the interest income, and the user can return this token to the protocol at any time and get back 5 ETH he has lent. In this case, he will have made a profit equal to the interest income. As the user gets back the asset as cryptocurrency, if the value of ETH has increased, the user receives his crypto asset at its current value. This method of earning passive income is called Yield Farming. The users moving their assets among the platforms with the best rates, the users who evaluate arbitrage opportunities with their debts, and the users who just want to earn additional income while holding their cryptocurrencies (HODL) often use this method.
Yield Farming is a method of earning income not only for lending platforms, but also for decentralized exchanges (DEX). Many decentralized exchanges, such as Uniswap, Curve and PancakeSwap, provide the opportunity to trade tokens efficiently and without intermediaries with the Automated Market Maker (AMM) algorithms. On these platforms, trading is carried out through liquidity pools, which are created with smart contracts and generally consist of two tokens in equal amounts.
If there is $100 worth of ETH in a pool of ETH and USDT, there must also be $100 worth of USDT. Liquidity providers lock equal amounts of tokens on both sides of these pools, allowing transactions to be made, and in return, they earn income proportional to their share in the pools from the transaction fees charged in these protocols.
A liquidity provider receives Liquidity Provider Tokens at the value of the asset he stakes on the protocol. LP Tokens represent a user’s share of the pool. Uniswap, the largest DEX on the Ethereum network, charges a transaction fee of 0,3% for each transaction.
In a pool of 10 LP Tokens consisting of 10 USDC and 10 USDT:
1 LP Token is equal to 1 USDC + 1 USDT, that is, 10% of the pool.
A user gets 10 USDT for 10 USDC, and another user gets 10 USDC for 10 USDT, with the transaction fees added to the pool, there will be 10.03 USDC and 10.03 USDT in the USDT/USDC pool.
And as a result, the value of 1 LP Token will be 1.0003 USDC + 1.0003 USDT.
The users who provide liquidity to a pool of stablecoins such as USDC and USDT do not take a big risk since the value of these tokens does not change much. Therefore, these pools are generally the pools with the highest volumes. Accordingly, the APY is lower than other pools. Since there is also a risk of a decline in prices of more volatile tokens, the volumes of these pools are generally lower and thus, the number of users sharing transaction fees is also smaller. The higher the risk, the higher the revenue a liquidity provider earns.
As token prices rise, so does the value of LP Tokens, however, this increase may be below the market increase because of the impact known as the Impermanent Loss.
Liquidity Mining
Compound was the first platform to distribute governance tokens, turning the Yield Farming concept into Liquidity Mining. The users who provide liquidity are encouraged by being rewarded with market value COMP Tokens that enable them to vote in protocol decisions similar to the logic of DAO (Decentralized Autonomous Organization). This method has also been adopted as a different token distribution mechanism than an ICO or an Airdrop. Later, many platforms followed this path.
Today, many platforms distribute governance tokens through liquidity mining. In particular, new DeFi projects have developed protocols based on liquidity mining as a method to generate liquidity and attract users. On the principle of block rewards, a certain number of tokens are continuously generated and distributed (usually in LP Token format) to users who stake liquidity on protocols. These governance tokens, depending on the success of the protocol, can gain large volumes and a place in the ecosystem. For example, Curve DAO Token (CRV), 1inch (1INCH), Compound (COMP) and PancakeSwap (CAKE). These are DeFi tokens that are also highly traded on centralized exchanges and have generated significant revenue for liquidity providers. They also allow users to have a say in the changes to be made to the protocols by voting.
In addition, the emergence of the Automated Market Makers (AMM) based on liquidity mining has brought with it the opportunity for liquidity providers to earn significant profits through farming systems in which the Annual Percentage Rates (APR) can be increased to millions, albeit for a short time, and thousands in a sustainable way. Professional liquidity providers can maximize their profits by quickly changing their positions among the most lucrative of these platforms. On the other hand, many investors may suffer serious losses.
Since many developer teams are anonymous, frauds, rug pulls (i.e. developers stealing liquidity), and flash loan attacks have increased and hackable contracts have emerged. Thus, investors should do their research before providing liquidity to these platforms and be aware of the risks.