What is Liquidity pools? How do they work and why do we even need them? It is centralized finance. Also, what are the differences between liquidity pools across different protocols such as Municipal balancer or Curve will be going through all of this in this video before we start if you’re new to Defi, you may want to watch my introduction to decentralize finance video first. Also, you may want to subscribe to this channel for more detail. Related content.
All right. So let’s talk about liquidity pools because it’s a pores in essence are pulls off tokens that are locked in a smart contract. There are used to facilitate trading by providing liquidity and are extensively used by some of the decentralized exchanges AKA, Texas. One of the first projects that introduced liquidity pools was Banker, but they became widely popularized by uniswap before we explain how liquidity pulls work under the hood. And what automated market-making is let’s try to understand where we even need them in the first place. If you’re familiar with any standard crypto exchanges, like coinbase or by nuns you may have seen that they’re trading is based on the order book.
This is also the way traditional stock exchanges such as New York Stock Exchange or NASDAQ work in this order book model buyers and sellers come together and place their orders buyers AKA bidders try to buy a certain asset for the lowest price possible. Whereas sellers try to sell the same assets for us high as possible for trays to happen both buyers and sellers. Have to converge on the prize this can happen by either a buyer bidding higher or a seller lowering their price. But what is there is no one willing to place their orders at a fair price level. What is there not enough coins that you want to buy. This is where market makers come to play.
In essence market makers are entities that facilitates trading by always willing to buy or sell a particular asset by doing that they provide liquidity. So the users can always trade and they don’t have to wait for another counterparty to show up. Okay, so why we can just reproduce something like this in this centralized Finance. The answer is we can it would be just really slow expensive. Pretty much always result in poor user experience. The main reason for this is the fact that the order book model relies heavily on having a market maker or multiple market makers willing to always make the market in a certain asset without market makers and exchange becomes instantly illiquid. It’s pretty much unusable for normal users on top of that market makers usually track the current price of an asset by constantly changing their prices, which
In a huge number of orders and Order cancellations that are being sent to an exchange. It cerium is a current throughput of around 12 to 15 transactions per second and the block time between 10 and 19 seconds is not really a viable option for an order Book Exchange on top of that every interaction with a smart contract cost. The gas fee. So market makers would go bankrupt by just updating their orders. How about the second layer scaling them some of the second layer scaling projects like Loop ring look promising, but even they are still dependent on market makers and they can face liquidity issues on top of that if a user wants to make only a single trait, they would have to move their fans in and out of the second layer which adds two extra steps to their process.
This is exactly why there was a needs to invent something new that can work. Well in the decentralized world and this is where liquidity pools come to play. Okay. So now that we understand why we need the liquidity pools in the centralized Finance. Let’s see how they actually work in Spacek form a single liquidity pool holds two tokens and each pool creates a new market for that particular pair of tokens.
Dy eat can be a good example Said popular liquidity pull on uni swap when the new poor is created. The first liquidity provider is the one that sets the initial price of the Assets in the pool. The liquidity provider is incentivised to supply an equal value of both tokens in the pool. If the initial price of the tokens in the pool diverges from the current global market price, it creates an instant Arbitrage. Petit that can result in Lost capital for the liquidity provider this concept of supplying tokens in a correct ratio Remains the Same for all the other recruit easy providers that are willing to add more funds to the pool later when liquidity is supplied to a pool the liquidity provider LP receive special tokens called LP tokens in proportion to how much liquidity they supplied to the pool.
On the trade is facilitated by the pool 0.3% C is proportionally distributed amongst all the lp token holders. If the liquidity provider wants to get their underlying liquidity back plus any activities, they must burn their LP tokens each token swap that illiquidity pull facilitates results in a price adjustment according to a deterministic pricing algorithm.
This mechanism is also called an automated Market maker amm and Equity pools across different protocols may use a slightly different algorithm. Basically quiddity pools such as those used by unique swap use a constant product Market maker algorithm that makes sure that the product of the quantities of the to supply tokens always Remains the Same on top of that because of the algorithm Cool can always provide liquidity no matter how large a trade is the main reason for this is that the algorithm asymptotically increases the price of the token as the desired quantity increases the math behind the constant product Market maker is pretty interesting. But to make sure this video is not too long. I’ll save it for another time. The main takeaway here is that the ratio of the tokens in the pool dictates the price? Sighs so if someone lets Say by seized from a diet pool, they reduce the supply of either and add the supply of dye which results in an increase in the price of eith and a decrease in the price of die how much the price moves depends on the size of the trade in proportion to the size of the pool. The bigger the pool is in comparison to a trade the lesser the price impact.
AKA sleep Edge occurs. So large pools can accommodate bigger trades without moving the price too much because larger liquidity pools create less slippage and result in a better trading experience some protocols like balancer started incentive izing liquidity providers with extra tokens for supplying liquidity to certain pools. This process is called liquidity mining. And we talked about it in our yield farming video the concepts behind liquidity pools and automated market-making are quite simple yet extremely powerful as we don’t have to have a centralized order book anymore and we don’t have to rely on external market makers to constantly keep providing liquidity to an exchange.
The liquidity pools that we just described are used by uni Swap and they are the most basic forms of liquidity pools other projects iterated on this concept and came up with a few interesting ideas care. For example realized that the automated market-making mechanism behind Union. Schwab doesn’t work very well for us assets. That should have a very similar price such a stable coins or different of the same coin like WETH or SETH. curveballs by implementing a slightly different algorithm are able to offer lower fees and lower slippage when exchanging these tokens.
The other idea for different liquidity pools came from balancer that realize that we don’t have to limit ourselves to having only two Assets in a pool and in fact balancer allows for as many as Eight tokens in a Eagle liquidity pool and of course like with everything in this side, we have to remember about potential risks besides our standard Desai risks, like smart contract bugs. Admin keys and systemic risks, we have to add two new ones in permanent loss and the liquidity pull hacks more on this in the next videos.