How to avoid losing money when yield farming (part 1)

Brandon C.
7 min readJun 17, 2021

--

(source: depositphotos.com)

Bountiful yields. That’s all we want when yield farming.

Is that really too much to ask for? Well apparently not, if you’ve seen what’s happening in the world of DeFi lately, yields have reached as high as 80k% APY, or loosely translated to 2% per day (since APY is based on a daily compounding assumption, which kinda skews the figure).

Insane yields are possible in DeFi

You mean to say that these farms give me in a day, what my bank gives me in a year!?! That’s right. But if these are not scams, how in the world are they able to provide such feerrkin’ high returns, and is this even sustainable? Short answer — it’s not. This is meant to shore up initial liquidity for their Automated Market Makers (AMM).

When a new AMM is trying to establish itself as the go-to of choice, it needs to shore up liquidity by providing the right incentive/reward structure (you could think of this as a form of fund raising).

As more and more yield farmers commit liquidity, the incentives will have to decrease to a point where it reaches terminal velocity so that it can be self sustaining. And this can be done through burning or meaningful tokenomics. Simply put, it means the number of tokens created has to be roughly in line with the number of tokens used, or else it will lead to significant inflation and loss of value.

So if you’re one of the lucky few who managed to get in early (read: DYOR), you’ll be able to enjoy some of these mouth watering returns. What’s the catch then? Ah hah! Now you’re thinking like a crypto veteran.

Well, mi amigo, the answer is Impermanent Loss, or IL for short.

One of the biggest issues with DeFi and yield farming at the moment is IL and you can think of it as the opportunity cost you give up for committing your crypto funds.

Pledging liquidity requires you to give up trading your assets freely, since you are committing them to the platform (eg. a decentralized exchange such as Uniswap) and providing liquidity to others. In return you get (i) a cut of the exchange/swap fees that Uniswap charges and (ii) DEX incentives. Sweet!

Now, the downside is that you won’t be able to participate as actively as you could in event that the token price spikes. After all, taking on more risk by getting in on ground zero means that you’re gunning for that 10, or even 20x returns.

Here’s how this actually works.

How Impermanent Loss works

The reason why there is a “loss” is because you are providing liquidity for this asset pairing. When the value of UNI goes up, liquidity end users will want more UNI, thereby removing UNI count from the pool, and exchanging ETH for it. As a result, your UNI count decreases and ETH count increases (being part of this pool).

If UNI has appreciated significantly compared to ETH, you might have been better off if you had just held on to the UNI tokens instead of participating in the pool. But since your funds were pledged as liquidity, the assets would now be returned in an adjusted ratio.

How would this adjusted ratio look like?

Well, here’s a chart that actually shows the approximate loss in your stack value due to change in price of one token (assuming the other stays the same):

Percentage of funds at risk as the asset changes value

If you want to take a closer look and see for yourself how the values differ, here’s an IL calculator that you can play around with.

When the asset goes up 5x, your stack value loses ~25% compared to if you had HODLed it outright. But remember there’s also the yields from the yield farm (ie. swap fees) for committing the liquidity, so that will partially offset the IL. Sometimes the yield is attractive enough for you to want to take this risk, and sometimes it’s just not. So if you’re getting some INSANE APYs in the meantime, why the heck not?

Reducing Impermanent Loss

In order to optimize yields/fees from farming and capital appreciation of your assets, we need to definitely consider IL. Jumping straight into the highest yield APR pool may not be wise when you realize you only have a fraction of the other (more valuable) asset when you finally withdraw your liquidity from the pool.

1. Choose Correlated Pairs

Ideally you’d want the ratio of the assets to stay relatively constant. You can do this by either pairing (i) stablecoins or (ii) correlated assets.

In the first way you can select an outright stablecoin pairing such USDT-USDC, which are the 2 stablecoins represented from Tether and Coinbase respectively. Now the yields obviously won’t be as generous as some of the other pairs out there, but it’s a good way to get your feet wet to see how the different protocols work.

Another method to reduce IL is to select pairs which tend to move in tandem (ie. correlated assets). Now these could be based off similar ecosystems (eg. BNB-CAKE using BSC protocol, or UNI-ETH in the ETH world). A deeper understanding of the industry is necessary to know which pairs work and which don’t. With a correlated pair, the ratio tends to have a higher probability of staying consistent, but could still face the same issue if one asset goes on a tear.

Pancake ($CAKE in orange) vs Binance ($BNB in candlestick)

2. Choose a Platform with Sufficient Incentives

Some of the platforms/protocols, especially in the beginning, give really good incentives. As mentioned earlier, this is mainly to shore up the initial liquidity and won’t last forever (read: not sustainable). However, they can be enough to overcome the rising price of the more valuable asset, and worth your while participating in the pool.

Caveat emptor though! You need to make a judgement call to see if the platform is worthy of your funds, as rug pulls are still aplenty. It’s pretty much like lending money to an unestablished bank.

Be careful where you commit your funds

3. Stake Your Funds In A Ratio You Can Live With

There are some platforms out there (eg. Balancer, Curve Finance) which allow you to stake your funds in a ratio other than 50:50. The trick here is to maintain a higher ratio of the asset that you would like the exposure to, so that there’s less possibility for value loss through IL.

4. Avoiding it Altogether

To take things a step further, you can also stake your assets in a 100% ratio, ie. single asset liquidity pool. This is personally my favorite if you’re a set-it-and-forget-it kinda person like me.

This is the by far the easiest way at the moment to avoid IL altogether, and the APRs here can still be pretty generous. The only thing up for consideration are first world problems such as which incentives to farm in.

Making It Work For You

Which farms you choose is going to be dependent on which assets you are holding in the first place. After all it’s a place for you to get additional juice while sitting on your funds.

Stick with the bigger more reputable names, and I only put in what I can afford to lose.

Wise words from Uncle Ben

It can definitely be pretty overwhelming when venturing into the DeFi space — I remember the first time when I was in the process of pledging my funds — boy was I sweating buckets!

Once you get the hang of tinkering around, you’ll realize that it’s not that bad after all — it’s like that delighted feeling you get after putting money into your very first investment. Except of course, the returns are much more satisfying than that meagre rate on your savings deposit.

P.S. If you liked this piece and are feeling generous, I’d be forever in your service if you could leave me some claps below!

--

--

Brandon C.

Web3 advocate. Thoughts on crypto, wealth and perspective.