Introduction to Yield Farming
Introduction to Yield Farming
Yield farming is a relatively new phenomenon within DeFi. Defi has come a long way since the launch of the first decentralized lending protocol, MakerDao, in 2015. Yield farmers are DeFi users who put DeFi protocols to use in somewhat unconventional ways in order to maximize a rate of return on capital. At the basic level, yield farming involves the supply of capital for use as liquidity, and the swapping of tokens. Yield farmers often report incredibly high profits that would be impossible to attain in a traditional finance setting, sometimes reaching up to 100% APY. This is made possible by the two core concepts of yield farming: liquidity mining, and leverage.
Liquidity Mining
Liquidity mining is a form of yield farming where users provide liquidity to a DeFi protocol and receive a new token in return. This is in addition to any expected returns from lending/borrowing or fees. A couple of ways in which farmers may make profits through liquidity mining is by speculating on token prices, and then by using the newly earned tokens to continue to leverage their positions. Synthetix was one of the first projects to introduce liquidity mining in its protocol. Since then, many new projects have used liquidity mining as an incentive for users to use their protocol.
Liquidity mining can be so profitable that farmers are sometimes willing to lose money initially in order to mine new tokens. A well known example of this can be seen in the initial launch of lending platform Compound, which, in order to incentivize borrowing, offered higher rewards of COMP tokens for borrowers who borrowed with higher APYs. This kept lenders happy and increased the overall health of the protocol while counterintuitively being profitable for borrowers as well.
Leverage
Leveraging within DeFi refers to the process of using borrowed funds as collateral in order increase an initial deposit or investment. Farmers will often deposit their coins as collateral and use that collateral to borrow a different coin. The farmer can then swap or simply deposit the borrowed asset again as collateral in order to borrow more and repeat the process. This allows farmers to leverage their capital several times over. A major risk behind this sort of yield farming strategy is that a farmer’s loans may easily become overcollateralized if they are not careful, resulting in liquidation of their original investment. Farmers who use leverage should be aware that they must still be able to return any loans they made in order to come out the other end with a profit.
Risk
Before one sets out to become a yield farmer, given the current state of DeFi, there are a number of innate risks aside from risks related to specific strategies that one should be aware of. Because DeFi is still in its early stages, there may be bugs related to smart contracts that may lead to devastating consequences. Some questions a user may ask themselves before proceeding to use a certain application or protocol may include: How decentralized is the application? Is there a shutdown procedure if something goes wrong? Can an administrator’s key or some on-chain body of governance make the decision to shut down a protocol? In any case, yield farming can be extremely high-reward, but it can also be extremely high-risk. Some tips for future yield farmers include being informed about any applications before you decide to use them, and perhaps even more importantly, STAYING informed on a day-by-day basis. APY rates can change over night. Crypto currencies themselves are also highly volatile assets which may suddenly increase or decrease in price by large margins.
Examples
Yield farming takes place upon DeFi protocols which use smart contracts to execute transactions. Yield farmers often use one or more DeFi protocols in conjunction with one another in order to increase the value of their APY. However, most yield farming usually involve at least one of the following elements.
Lending/borrowing
Farmers lend coins on a lending protocol to earn apy, and/or extra tokens. Supplied coins can be used as collateral for borrowing. Examples of such protocols include MakerDao, Compound, and Aave.
Liquidity Pools/DEX
Farmers supply coins to a liquidity pool used by a DEX or decentralized exchange. In turn, they are rewarded with fees that are charged for swapping tokens on the exchange. Examples of such protocols include Uniswap and Balancer.
Staking LP tokens
Farmers can stake LP (liquidity provider) tokens in other liquidity pools. LP tokens represent participation within a liquidity pool.
Both liquidity mining and leveraging can be applied to these base level strategies by farmers in order to increase APY. Furthermore the elements above may be combined and worked into a variety of different increasingly complex strategies. Because DeFi is very much a new and live market, there is not yet one single “best” strategy for yield farmers to take. Yield farming strategies may come in and out of fashion on a daily basis. What is more, some strategies that were at once extremely profitable may the next day become obsolete. An expert yield farmer has a lot of variables to keep in mind in order to make sure they are maximizing their returns.
In practice
Despite the potential for infinite complexity, yield farming has a surprisingly low barrier to entry. This following section will walk through a hypothetical example of a basic yield farming strategy that leverages capital by using a simple lending protocol such as Compound, and a DEX for swapping coins such as Uniswap.
Because most DeFi protocols are built using Ethereum, all one needs is a compatible Ethereum wallet and an internet connection to begin yield farming. Many DeFi protocols support different types of wallets, including hardware wallets such as ledger, software wallets such as MEW, or even browser wallets such as MetaMask. Browser wallets can be especially convenient for those who are just starting out. However, it is important to note that any online wallet, or “hot” wallet, can be susceptible to attacks. If you are using your wallet to hold large amounts of funds, holding them on a hot wallet introduces a potential risk factor. Though perhaps slightly less convenient, hardware wallets provide much more security.
Most DeFi protocols offer user friendly application interfaces that users can begin using right away. For example, the Compound dashboard simply shows “Supply Markets” on one side, and “Borrow Markets” on another, with a borrow limit and net APY calculator at the top.
After connecting your wallet to the Compound application, you can then immediately deposit coins. Let’s say coin x has the highest APY at 10% so you deposit $100 worth of coin x. You will now be accruing interest on your deposit. It is important to note that the listed APY is only a projected estimate and may change the next day. If you return the next day to find coin y now has a higher APY than coin x, you may want to take out your deposit of coin x and deposit coin y instead. In yield farming, this practice is known as crop rotation.
At this point, you are earning interest on your deposit of coin x but you are not yet yield farming. Now that you have made a deposit, you can use your deposit as collateral to borrow other coins. Let’s say that Compound allows you to use 60% of your deposit as collateral. You identify that coin z has the lowest interest rate, and so you use your collateral to borrow $60 worth of coin z. At this point, you can now use a decentralized exchange such as Uniswap to swap your $60 worth of coin z back to coin x. You may now return to Compound to deposit your new $60 worth of coin x. The total amount of coin x you now have deposited is $160. What you have done is used leveraging in order to increase the amount you have deposited into a lending protocol and thereby increase your return in capital without spending any extra money. Congratulations, you are now a yield farmer. You can now repeat this process any number of times, as long as you are aware that your initial deposit may be liquidated if you are unable to pay back the coins you borrowed or if you overcollateralize your deposit.
Last updated