img

A Quick Introduction to Yield Farming

Posted on 2/22/2021 by Andras

Yield farming is putting your assets to work. Because what’s better than buying something that’s going up? It going up while also earning a yield. 

In a way, yield farming is kind of like an addiction. If you get into it, you’ll soon be disgusted by even the idea of holding something that only goes up but doesn’t even earn a yield on top.

But what’s happening in the background, and where is the yield coming from? Let’s go through a brief overview of yield farming.

It can be much, but at least it isn’t honest work

So, how does a dead simple yield farming strategy look like? Let’s say you have some BTC and want to earn some yield on it. Let’s also assume that the current APY for supplying USDT to Compound is 25%, while borrowing it costs 20% on Aave

First, you convert your BTC to Wrapped BTC (WBTC), a tokenized version of Bitcoin on Ethereum. Then, you take your WBTC, and deposit it into Aave as collateral. Now, you can borrow USDT against it on Aave, supply that USDT to Compound, and boom, you’re earning 5% per year on your Bitcoin (minus the fees and other expenses).

We could call this an arbitrage strategy, sure. But yield farming is a very generic term, and this is probably one of the most straightforward examples. In reality, these chains can become incredibly complicated and involve many different types of liquidity pools (and yields much higher than 5%). Imagine if you could deposit your cUSDT from Compound to a third protocol and earn a yield on top. Then, you can take the token you got from depositing into the third protocol, deposit that into yet another protocol, and so on. This is essentially how yield farming works.

If we have enough DeFi protocols, maybe someday we can create a perpetual motion machine where everything is earning a yield on top of everything else (2008 financial crisis has entered the chat to say nope).

Yield aggregators

Now, this sounds like an awful lot of clicking ― and that’s hard work! You see, checking interest rates across many protocols, withdrawing, depositing takes a lot of time and effort and may not be worth it, especially if you’re shuffling a smaller account. 

Something easier you can do is deposit your funds in a yield aggregator like yearn, Alpha Homora, Harvest, or many others. (CoinGecko has a dedicated filter for this type of product.) 

The good thing about these aggregators is that they do all this work for you. You could think of it as a bunch of smart and nimble apes handling your funds and putting them wherever they can earn the highest yield. This will vary with each protocol, but usually, you’ll have to pay some kind of performance fee for the convenience. At the same time, this is probably as close to “set and forget” as it gets in DeFi right now. 

Even so, smart contract bugs are still relatively frequent. As we’ve said, these strategies can get very complex. If that’s something that keeps you up at night, you could consider buying decentralized insurance through protocols like Nexus Mutual and Cover.  

But where does the yield come from?

So you’re telling me I can just press a few buttons and get free money? Well, yes and no.

Yields exist as a function of token price.

Basically, if number go up, yield go up. If number go down? Yields probably shrink. We say “probably”, because we haven’t really seen a crypto bear market since the existence of yield farming. In fact, most of the biggest DeFi protocols were built quietly during the last bear market. So, any conclusions about what will happen to yields in a bear market are speculation at this point. 

Even so, it’s quite likely that yields will shrink. Why? There are multiple aspects to this assumption.

One is the cost of borrowing money. If the cost to borrow is high, lenders get paid more, and yields are higher. If money is cheap to borrow, lenders get paid less, and part of the foundation for those money lego pieces we talked about earlier also yields less. Naturally, there may be less interest to borrow money during a bear market, which means it would be cheaper to borrow, which means yields would be lower.

Another thing to consider is just the general risk-taking appetite in the market. You see, getting a new token into as many hands as possible is a really difficult task. At the same time, it’s quite important for a decentralized network to achieve longevity.

This is why many protocols adopt yield farming, or liquidity mining, schemes to distribute new tokens. Basically, the more liquidity you supply to a protocol, the more newly minted tokens you get. At the same time, if people think the protocol is going to be valuable, they just buy the token on the secondary market, and its price goes up. This, in turn, encourages more people to provide liquidity and farm, which encourages more people to buy the token, and so on. Schemes like this are usually accompanied by a really aggressive inflation schedule for the token, where the earlier you get involved as a farmer, the more you earn.

However, what if no one wants to buy the token in the midst of a brutal bear market? Farmers are farming and dumping, meanwhile, no one is buying. The token price drifts down and down into the abyss, dragging down the yield for farming the token with it. So the same mechanism that leads to increasing yields in an uptrend results in decreasing yields in a downtrend.

Another simple argument is that yield is coming from fees. Are you providing liquidity to an automated market maker (AMM) like Uniswap or SushiSwap? Here, take a portion of the fees paid to the protocol by traders. But what if there’s little interest to trade? Less volume = less fees = less yield.

Permanent loss

Something you’ll need to consider when providing liquidity in DeFi is impermanent loss. 

We won’t get into it in much detail here, but the bottom line is that if you’re providing liquidity to a pool that has multiple assets in it, and the prices of those assets change a lot in relation to each other, you’re probably exposed to impermanent loss.

This means that you could end up worse in terms of USD value compared to just holding the assets. If you’d like a more technical overview of this phenomenon, check out pintail’s article about it. Also, here’s a neat impermanent loss calculator.

Yield farming may sound like the empty buzzword of the day, but there’s actually real substance behind it. Earning yield is a significant part of traditional finance, and a complex ecosystem around generating yield in this permissionless environment can bring a lot of benefits.

Besides that, yield farming made crypto infinitely more fun. Now, magic internet money isn’t just a jumble of alphanumeric characters in your wallet (although some can appreciate the a e s t h e t i c s of that as well), but it’s collecting vegetables, increasing your army of digital pets, and getting your hands on precious NFTs. 

It’s quite likely that these types of money games will be wildly popular in the future ― especially once the user experience gets to a level where it’s easy to onboard masses of people who don’t even know they’re interacting with crypto.