Yeild Farming 101
YIELD FARMING 101
Wall of Text Warning
EDIT: I cannot edit the title. It shall remain misspelt.
As we enter a potential Bear Market or Crab Market, it's becoming increasingly lucrative to Yield Farm. Unfortunately, I don't think many people truly understand it. How it works, what there is to gain and also, most importantly the risks.
Over the last half a year I have personally delved deep into DeFi and want to explain in my own words a little explanation of how the Crypto wild west really works.
WHAT IS LIQUIDITY PROVISION?
A decentralised exchanged works by creating a pool containing two assets. Let's say on the Binance Smart Chain, PancakeSwap want to offer swaps between BNB and BUSD. A pool will contain a ratio of these two assets and in order to take out one, you must deposit the other. Many mechanisms essentially try to keep the value in the pool the same through all these swaps, but the ratio of the different assets might change.
This is decentralised because it removes the need for order books. Price is indicated by the current ratio of Crypto Assets in the pool, and since no-one needs to match a buyer with a seller and oversee the transaction like traditional order books do. The only interaction the user has is with a pool, which is implemented with a smart contract thus immutable and verifiable on the blockchain.
Unfortunately for this to work we need liquidity. This is where liquidity providers come in, they deposit their assets into the pool making sure both assets are of equal value. This increases the Total Value Locked into the pool and allows swaps to happen.
LPs earn a portion of all trading fees on the pool, in this instance PancakeSwap charges 0.25% as a trading fee on every swap. 0.17% goes to the LPs split between them with regards to how much liquidity they've provided.
On our BUSD-BNB pair it took 144,000 USD of fees in one day!
WHAT'S THE RISK?
This sounds too good to be true. And many think it is. In reality it's a little muddier than that.
Impermanent loss is something that's thrown around a lot as a boogeyman. A reason to avoid Yield Farming, and understandably so, it's a difficult concept to understand. However, hopefully we can go back to our example to explain how it works.
Esentially, when you provide liquidity you are allowing others to use your liquidity to swap between the two tokens you provide. You can't swap more tokens than exist in a pool, because they don't exist for you to swap between. When a token is in demand to be bought or dumped people are likely to want to swap away from one token and into another.
Say the price of BNB sharply decreases. Most weak hands are going to sell. Swapping in our pool to BUSD. However, as a liquidity provider we know we hold both assets, and giving up our BUSD to swappers means we're left with their BNB. If we withdraw our tokens now, we're going to end up with an imbalanced ratio to what we put in. Less BUSD and more BNB.
However BNB isn't worth as much as when we bought it! If we now go to swap ours, we have more of it sure but it's worth less so we might actually be worse off than if we just held our BNB.
This works the other way too. If BNB sharply rises then BUSD sellers are going to buy BNB leaving us with less of the now more valuable token and more BUSD in return.
This is complicated to get your head around so give it another read if you need to.
The good news is twofold though.
-
A. Impermanent loss is easy to mitigate if you're aware of what's happening in the crypto world.
-
B. It only become permenent loss if you withdraw. The price of BNB might return to where you bought it, meaning you'll be able to withdraw roughly the amount you put in.
It's also important to note Stable Pairs don't suffer from IL at all, and two volatile pairs will be far more risky as you must keep in mind two tokens could move in different directions.
WHY WOULD I RISK IT?
Well, luckily there's a third piece of good news. It's where Yield Farming comes in.
DeXs want to incetivise LP. So, they allow you to deposit LP Receipts in the form of other tokens into a farm. These farms offer some insane APYs. How?
Most of them provide their results in the DeX's native token. For example PCS offers CAKE rewards for farming and back when Uniswap did their farms they offered UNI. LPs are betting that a native token is going to hold and increase in value, and of course high APYs can be offered since the protocol is minting or distributing pre-minted tokens at a set emission rate.
There is a potential worry for these native token to not be worth anything, or inflate massively in value, but with more and more usecases such as PancakeSwap profiles and Uni Governance the prices are most likely here to stay.
Most farming reward will offset any IL, and chances are if you mitigate IL (Something I hope to explain more in a future post depending on demand) then you'll come out making some serious money.
The great thing is, with Crab Markets, moving to the side is exactly what LPs want.
HOW DO I DO ALL THIS?
I'm quickly going to show you how easy this is:
Here I am on ViperSwap. A UniSwap clone on the Harmony ONE network. I'm on testnet so I can work with a lot of ONE.
First I need two tokens of equal value which I want to target.
The interface might be a little different on different networks but by going to the pool tab I can provide liquidity.
As you can see by adding 2 BUSD which = 0.9 VIPER, i'll now have contributed 5% of the pool. I have to approve both tokens, but on Harmony this is a very very small gas fee.
My liquidity has been added, and now I have some LP tokens to prove my liquidity exists. Now to go stake them.
I'm now earning passive income
This testnet pool is ticking up about 0.5 VIPER per block mined
There's a few caveats here. For example while ViperSwap is very cheap, it locks earnt VIPER in order to prevent dumping of the coins. PCS and all the rest DO NOT DO THIS.
Of course you'll have to do your own research into pairs, and platforms at the moment. There's also Yield Aggregating with a platform like Beefy. Let me know if I can do any more of these guides. And of course, any questions please ask!
submitted by /u/Yalnix
[link] [comments]