Table of Contents:
What are Liquidity Pools?
What are Automatic Market Makers (AMMs)?
What is Impermanent Loss?
What is Yield Farming?
What are Liquidity Pools? A liquidity pool is a collection of funds that are locked in a smart contract for the purpose of facilitating trading on a decentralized exchange. These are the backbone of many decentralized exchanges such as Uniswap.
People who put funds into these pools are called liquidity providers (LPs). LPs (typically) provide equal value of two currencies (tokens) in a pool to help create a tradable market. Users can come trade one token, adding it to the pool, in exchange for another token, removing it from the pool. In exchange for providing liquidity, LP’s earn trading fees that occur within the pool. Anyone can participate, and it's a great way to earn some yield on your money if you are planning to hold for a long time. However, there are some risks to be aware of, such as smart contract hacks or impermanent loss, the latter of which we will discuss later on in this article.
Video:Article: https://academy.binance.com/en/articles/what-are-liquidity-pools-in-defi
-
-What are Automatic Market Makers (AMMs)? To understand AMM’s, we must first look at what a market maker is. On centralized exchanges, market makers come into markets to provide liquidity and reduce spreads (the difference between the best price you can currently buy at and the best price you can possibly sell at) by always offering both bids and asks. For example, when trader A wants to buy one BTC right now, the exchange helps ensure that trader A will find a competitive price to buy at. This could be from a long term holder wanting to sell, or it could be a market maker who is both buying and selling coins, in large quantities, in order to make money using the spreads between their buys and sells. In order to keep this process smooth and avoid large spreads, centralized exchanges rely on professional market makers to provide liquidity.
So, how is an automated market maker different than a typical market maker? Well, on most crypto exchanges, there is no orderbook (a way to place buy or sell orders at specific prices). Therefore, typical market makers cannot come in and place bids and asks at specific levels to provide liquidity. Instead, AMMs replace the orderbook with math. AMMs use liquidity pools (which, as we know, allow liquidity providers to deposit into them) that operate through smart contracts. Here, users are not trading directly against others; they are trading against all of the liquidity locked in these smart contracts.
To understand how this works, we will use the ETH/USDT liquidity pool as an example. USDT is a stablecoin; you can think of it as a dollar. When ETH is purchased by traders, they will add UDST to the pool and remove ETH. This causes the amount of ETH in the pool to fall, thus making the price of ETH rise in order to balance the pool out. In contrast, since more UDST has been added, the price of UDST versus ETH falls. The extent to which the price changes is defined by the math used for the liquidity pool and the size of the trade. Uniswap famously began by using an x*y=k curve.
Video:Article: https://www.gemini.com/cryptopedia/amm-what-are-automated-market-makers
-
-What is Impermanent Loss? Impermanent loss refers to a type of loss that can happen to liquidity providers. It happens when the price of your tokens, relative to each other, changes after you deposit them in a liquidity pool. The bigger/faster the change, the bigger the potential loss. It is impermanent because the losses are only realized when you withdraw your funds from the pool.
Providing liquidity to a pool can be a profitable venture, but you need to keep the concept of impermanent loss in mind. To get a better idea, let’s walk through an example of impermanent loss in a two-sided liquidity pool. We’ll ignore some fees and do some guess work on the numbers in order to simplify things.
Say you want to provide liquidity to the BTC/USDT pool, and BTC sits at $30,000 at the time of deposit. So, to provide liquidity, you decide to provide 1 BTC and 30,000 USDT. Quickly, the price of BTC rises to $60,000. You’ve made some money from trading fees, but, when you withdraw, you’re going to get roughly 42,000 USDT and .7 BTC, plus the fees you made from providing liquidity.
Why less BTC and more USDT? Because, as users traded against the liquidity pool and the BTC price went up, the pool had to rebalance its assets to maintain a roughly equal proportion of each. Since BTC went up relative to USDT, the pool needed to hold more USDT to maintain a 50/50 split. Basically, most traders were putting in USDT and removing BTC! Now, you may have made a few percentage points from providing liquidity, but you missed out on the 100% gain in your BTC. That’s your impermanent loss.
Video:Article: https://academy.binance.com/en/articles/impermanent-loss-explained
-
-What is Yield Farming? Yield farming is a strategy that allows you to earn more crypto using your existing crypto. It involves you lending your funds through the use of smart contracts. In return for lending your funds, you earn fees in crypto.
Expert yield farmers use very complicated strategies. They will move their funds around all the time to maximize their returns. Also, they usually keep these strategies quiet, since the more people who participate in a given strategy, the less lucrative it becomes. However, you do not have to be an expert to get returns. One simple way of becoming a yield farmer is providing liquidity to a liquidity pool, as mentioned above. Rewards may be given out in the token(s) you are lending or in another token.
So, how do you tell what a good place to farm is? It is important to look at Total Value Locked (TVL). This measures how much liquidity is locked in various projects. This is generally a useful statistic to show the health and safety of the overall project and its yield farming market. It is also helpful in showing the “market share” of different DeFi protocols. A good resource to help you track this is the DeFi Pulse website. The place you choose to farm also depends on the tokens you have, since different tokens may be on different blockchains. Feel free to email us if you are unsure where to start!
So, how does yield farming actually work? Yield farming is closely related to a model called automated market making (AMMs) involving LP’s and liquidity pools. As we learned above, LP’s deposit liquidity into a liquidity pool to power a marketplace where users can lend, borrow, or exchange tokens. The usage of these platforms involves fees, and these fees are then proportionally passed on to the LP’s, which is an example of yield farming.
There are also automated yield farming strategies, such as the ones deployed by Yearn Finance, that offer more passive ways to manage yield. Projects like Yearn will pool your tokens alongside the tokens of other users and automatically move them around various (safer) protocols to maximize the yield you earn. This can be helpful in reducing gas fees; instead of paying a fee every time you want to move your tokens around, Yearn can subsidize these fees by using some of their own profits (they take a % off of the total yield earned) to pay for gas costs so you don’t have to. Plus, since they are moving large amounts of tokens at once, gas costs for them are minuscule relative to the yield earned.
Video:Article:https://academy.binance.com/en/articles/what-is-yield-farming-in-decentralized-finance-defi
-
-