The third installment in our new series, “DeFi in Perspective”, by Banditx0x
What is Yield Farming?
Yield farming involves locking up crypto assets into smart contracts to earn interest. The yield farming discussed in this article is about maximising interest on assets you already own. It is different from investing or trading in that we are not speculating on the future price of an asset.
Those who don’t want to hold any crypto assets should farm with stablecoins. This allows users to access the high yields available in DeFi without exposure to the wild price fluctuations of the holding cryptocurrencies.
Is yield farming a passive source of income?
Many investments marketed as passive income actually require significant time and active management. Buying and renting out houses is a good example. When you first buy a house, you need to attend auctions, develop a valuation model, sign forms, renovate, compare different opportunities, seek out tenants, and maintain the property. The more work you put in, the better you can optimise your housing investment.
Yield farming is similar, as there is necessarily a learning curve at the start to learn about the different DeFi protocols. Yield farming can be as active or passive as you want to make it. A very hands-off approach would be to use a yield aggregator which automates or suggests farming strategies. On the other end of the spectrum, you can actively research projects, compare their yields and discover new projects which may offer extremely high yields but require a lot of due diligence and taking on more counter-party risk. You get what you put in. DeFi quickly changes, so truly maximising yields requires constantly rotating capital.
What should we watch out for when Yield Farming?
The founders could run away with the capital we deployed by leaving an exploit in their code which allows them to withdraw user funds. Make sure the code has been audited by a reputable firm.
Smart Contract Risk
The code could be buggy or exploitable, which could lead to funds being hacked by third parties.
There are many different layer 1 blockchains now, and they are not completely risk free. Some of these chains are not decentralized, and could potentially be exploited, or shut down by government regulation.
Smart contract interactions require more gas than transferring tokens. The gas prices are so high on Ethereum that it prices out most retail traders. Even on layer 2s such as Arbitrum or cheaper chains such as Avalanche, yield farming strategies usually involve multiple transactions and the fees can add up. Many yield farming strategies require withdrawing tokens, converting them and redepositing in order to compound earnings, which can be infeasible with high gas fees.
Some protocols have extremely high yields due to temporary liquidity mining incentives or a sudden spike in traffic. These can be acceptable if we are very active about moving capital around. However, if we want to be more hands-off with our yield farming, it is best to stick with protocols that can offer sustainable yields.
Total Value Locked
With a large capital base, depositing capital can drastically lower the yields because the fees/rewards get diluted into a larger capital base. Thus, with large amounts of capital we need to look for opportunities that can absorb our liquidity.
Money Market Strategies
Money markets allow anybody to lend out assets to earn interest. These assets can be used as collateral to borrow other assets. Examples of money markets include Compound, Aave and Tranquil Finance. Here are 3 ways to use money markets to earn interest on your assets:
Newly launched money markets often offer lucrative liquidity mining rewards for borrowers and lenders. This opens up a strategy called rehypothecation, which means to recursively borrow and lend the same asset, increasing our effective yields while eliminating liquidation risk.
We can calculate the return on locked up capital with the formula:
L= Lending APR
B = Borrowing APR
C = Collateralization factor expressed in decimal form
Tranquil Finance pays you for both lending and borrowing assets
With the current yields at Tranquil Finance, you can earn over 100% APR on the USDT you have locked up by recursively borrowing and lending.
These yields are fundamentally unsustainable, as a situation where the borrowers are not paying money to lenders, means that the protocol is paying out people. That’s why Tranquil Finance, a newly launched money market, pays a positive rate to borrowers. Compound, in contrast, charges a fee for borrowing, making rehypothecation unprofitable.
Converting Longs and Shorts to Lends and Borrows
Lending is equivalent to taking a long position while borrowing implicitly short-sells an asset.
For example, if we lend out BTC, use it to borrow ETH and convert the borrowed ETH to USDC- if the price of BTC goes up, when we pay back our loan, the value of our stored BTC has gone up. However, if the price of our borrowed ETH goes up, that means that we have to pay back a larger amount of USDC to match our ETH loan.
Therefore, if we run a crypto portfolio where we are long certain assets and short others, we can convert those longs to deposits, and then convert the shorts to loans. Then, we can convert these loaned assets to stablecoins to farm elsewhere.
Using low yielding assets to borrow stablecoins to farm with
We mentioned in our first article that USD offers better yields than ETH/BTC. A good yield farming strategy for these assets is to use them as collateral in a money market to borrow stablecoins, and use those stables to farm high yields.
Lending on these platforms is undercollateralized. This means that we can only get what we put in. There is also a liquidation rate and a liquidation fee. The protocols have a large margin of safety so that the protocol doesn’t get rugged if the price changes drastically and then the person is undercollateralized.
Curve Finance offers an extremely wide variety of stablecoin farms. However, not all stablecoins are created equal. The most trusted stablecoins are USDT, DAI, and USDC. Often there are higher yields for providing liquidity in pools which contain stablecoins that are newer or have less trusted collateralization — some examples include MIM, FRAX and sUSD. The yields are higher because protocols incentivise people to hold and provide liquidity for their stablecoins and to compensate for the increased risk.
The main risk factor for these stablecoin is depegging, which is when a stablecoin breaks away from trading at $1. In these situations, liquidity providers end up with more of the less valuable stablecoin as traders will exchange their depegged stablecoin against your liquidity pool. Thus, as a liquidity provider, you take on the risk of depegging for all the stablecoins in your pool.
The main risk we should consider when providing liquidity for non-stable assets is impermanent loss. When you provide liquidity for two assets, you allow any trader to trade with you and the price you charge is determined by an algorithmic price curve. Liquidity providers gain revenue by taking a portion of trading fees. However, if the price of an asset changes drastically, traders can make arbitrage trades off our liquidity pool, leading to a loss for liquidity providers. This is called impermanent loss. Impermanent loss is difficult to understand, so our next article in the yield farming series will explain how to calculate and model it.
When Cyclos launches, we will have both stable and non-stable pools. We believe that our concentrated liquidity model will offer very good yields on stablecoin pools. On non-stable pools, concentrated liquidity will increase both the fees generated for LPs and the impermanent loss.
In traditional markets, someone who wants to invest without actively managing their capital might deposit their money into an index fund or hedge fund.
The yield farming equivalent of hedge funds are Yield Aggregators. They are perfect for those who want to farm long term but do not want to expend the effort in searching for or understanding decentralized applications.
Yield Aggregators leverage different DeFi protocols and strategies to maximize user profits. They generally look for trusted protocols so that you don’t have to independently evaluate smart contract risk and suggest those which have the highest yields. They also autocompound your capital. Yield farming without an aggregator often requires you to manually redeposit funds into a farm to compound, which is time consuming and gas inefficient.
Rari Capital, Yearn Finance and Beefy Finance are examples of yield aggregators.
These are Rari Capital pools. They simply yield farm by finding the best strategies for you.
The best way to learn by doing, and yield farming is a great way to start doing. You will learn how to use a wallet, bridge assets between protocols, and use decentralized applications. Putting skin in the game by managing your crypto and stablecoin portfolio will give you a deep practical understanding of DeFi. Now get out there and farm some yields.
Join us on: