Skip to main content

Last week I wrote an article about staking — in summary you risk money to support a network or a project and can claim your assets with a 5–20% return when the lock-up period expires.

This is a two-part series, and this is Part 2 about Farming, or more specifically yield farming, which can be a higher-risk approach to earning passive income than staking is.

Farm It Out

To “farm something out” is defined in the dictionary as “to give work to other people to do”. The capitalist version of this is to put your money to work — if you don’t need it right now, lend it to others who do and make a profit.

There are several ways to do this and they may differ for different assets. The phrase ‘Yield Farming’ is a collective term for a strategy that maximises the return on all of your assets through liquidity provision and recycling of capital via lending and borrowing platforms. It is analogous to an expensive piece of equipment in a factory — to get the most value out of it you want to utilise it (put it to work) as much as possible, with as little ‘downtime’ as possible.

What is Liquidity Provision?

If you’ve ever worked in a shop (or even just been to a shop) you’ll have seen a cash register. Imagine the first customer arrives and wants to pay for a $10 t-shirt using a $20 bill. If the cash register is empty, there’s a problem, and the t-shirt is either not sold, given away for free or sold at twice the price. That’s why the cash register is filled at the start of the day to provide liquidity to all the dollars that will need to be exchanged.

Centralised exchanges are similar to shops in that they provide all of the token liquidity themselves, and people who trade pay transaction fees to that company. But decentralised exchanges and other protocols have changed that — because order books have been replaced with Automated Market Makers, now anybody can provide liquidity and take a portion of the fees.

If you provide liquidity to a DEX you typically deposit equal value of two tokens in a pair into a smart contract. You receive LP tokens in return, which will then earn you a portion of the transaction fees and/or native tokens.

This can be very simple to do as this SushiSwap screenshot shows:

The return you get on the deposits depends on the daily transaction fees (e.g. on SushiSwap it’s 0.25% x the daily swap volume) and your share of the pool. The returns on liquidity provision can be solid double digits up to risky triple digits, but the value of your LP tokens could also fall of a cliff to zero — this is related to impermanent loss.

Impermanent What?!

This is essentially the difference between just hodling an asset and providing liquidity. The price of an asset in a pool depends on the ratio of token quantities. For example, if one of the tokens in the pair increases significantly in value on centralised exchanges, arbitrageurs will rush in to buy the token cheaper from the pool and sell it on the other exchange. This video does a good visual job of showing how the ratio of tokens in the pool has changed and that it leads to a net loss compared to just hodling.

The risk of impermanent loss is quite high if one of the coins is highly volatile as the graph below shows. This is especially applicable to new coins that haven’t established themselves and could plummet in price, taking all of your liquidity with it. Typically liquidity provision is a better idea when a coin is ranging in price, and therefore is especially popular with stablecoins.

Without going too deep into how liquidity pools work, it’s worth mentioning that UniSwap V3 now let’s you choose a price range to concentrate your liquidity in. In V2 and SushiSwap the liquidity you provide is spread out over the whole swap curve. By concentrating your liquidity in a tighter range where you think the price will operate, you deepen your available liquidity in this particular space, which should significantly increase your fee revenue. The caveat here is that you are more susceptible to impermanent loss, as leaving the range will result in all of your liquidity being in the lower-value token.

Rake It In

So if there’s all this risk of impermanent loss why should I bother to provide liquidity at all? Well the key, as always, is to make sure the risk to reward ratio is favourable. Protocols like Compound, Balancer and Sushi all incentivise liquidity providers by awarding them with their own governance tokens. The first simple strategy starts to take shape: can I find a set-up where the transaction fee yield plus the rewards yield outweighs the risk of impermanent loss?

If you check out the current farms on SushiSwap you’ll see a whole range of high APY pools consisting of a transaction fee yield and a reward yield. It’s tempting to just jump in the highest APY pool, right? Yes, but look at the Total Volume Locked (TVL) in the pool and whether either of the coins are volatile as you run the risk of losing significant value.

Compose Yourself

It’s not just providing liquidity to DEXs where you can generate a return. If you remember the article on lending and borrowing, those protocols also need liquidity. In fact, DeFi applications are being designed to work with and on top of each other in a modular “money Lego” approach. So what can we do to make the most of what’s possible and truly develop a yield framing strategy? You can take a manual or a semi-automated approach.

DeFi pulse is a good starting point to get an idea about where all the money is sitting in the space. But then you would need to regularly check for the best returns on the different protocols to ensure you were maximising your earnings. It starts to sound less like passive income though if you’re constantly moving assets around different platforms, incurring high cumulative gas fees along the way.

There are now also protocols that automatically move your funds around looking for the best returns, where Yearn Finance vaults is the best known example. The Yearn community votes on strategies that are then associated with a specific asset in a vault. For example, if you deposit your tokens there, it could follow some of these steps:

  • Some of your token is sent to a lending protocol and used as collateral to borrow another token
  • The new token is sent to a pool and used in liquidity provision with your original token
  • The LP tokens are staked in order to earn a governance token
  • The governance token is then used to purchase more of your original token

Such complex strategies can really boost your returns! But remember they are not for the faint hearted. To summarise some of the risks of yield farming:

  • Liquidity pools are located on smart contracts and so run the risk of being hacked
  • Impermanent loss can obliterate your liquidity if one of the tokens is very volatile
  • Yield farming on newer projects might result in a complete loss if the developer rugpulls
  • If you have loans on borrowing platforms the maximum loan to value ratio needs to be respected or you run the risk of having your collateral liquidated

There are plenty of YouTube videos out there explaining how to use each of the popular platforms, so take the time to educate yourself and see what makes sense for you.

Leave a Reply