In this blog post, we will cover liquidity pools using stories, examples, and analogies so that the concept is broken down so much that you understand it. At least, that’s what we keep saying.
What is a Liquidity Pool?
If you don’t know what liquidity pools are, you should be excited to learn about them. Basically, liquidity pools are not imaginary pools filled with water. They are pools filled with money.
In fact, they are actually smart contracts that allow traders to trade tokens and coins even if there are no buyers and sellers out there.
First, let me explain how the traditional stock market work. It uses what is called an order book model. This means all the buyers and sellers write down, and then they submit their orders for how much of a stock they want to buy and at what price they want to buy it.
A trade is transacted whenever two buyers and sellers meet at the same price. The buyer gets the stock, and the seller receives the cash.
For example, an order book might look like this.
See, if you look above where someone is asking to buy 16 stocks at $13 and 45 cents and over there where someone is asking to sell twenty stock for $13 and 80 cents.
Essentially, when you want to buy a stock on Robinhood, for example, and at what we call market price, you are essentially just submitting an order to buy all of the stocks that you want to at the current price at which sellers are willing to sell it for.
If you look at this graph, the left one, you can see how many buyers and sellers there are at different prices. Now, you need to know; this is very inefficient if you want to buy or sell because you have to set a price that someone else is willing to buy or sell at.
At least if you want to buy or sell your stock immediately.
Otherwise, you have to wait around and hope that the price matches what you’re looking for eventually. Well, so what’s the solution?
It’s a liquidity pool that uses an algorithm.
With this algorithm, we will always be able to buy or sell an asset no matter how high or low the price is, what time of the day it is and whether there’s a buyer or seller to meet our current needs.
A liquidity pool is a pool of money that contains both assets of what you want to trade for. For this example, we will be using Ethereum and the Basic Attention Token. Now, before we continue, we highly recommend reading our articles on smart contracts because they are the technology that allows a liquidity pool to exist.
A liquidity pool is nothing more than just code. It is a smart contract written to hold certain funds, do math with those funds, and then allow you to trade based on the math that it did.
So, let’s get a bit technical. The pool starts with an exact ratio of 50/ 50. This means, if you wanted to give the pool $500 so that it could trade, you must make it $250 of Ethereum and $250 of basic attention token. Why?
Well, you’ll see in a minute.
Most liquidity pools use an algorithm called a constant product automated market maker. That is a bunch of big words, and if you have no idea what they mean, we highly recommend you to read our post on it.
We recently posted a blog post that breaks down the math using examples and the algorithm using an analogy. We think it’d be super helpful for you to understand this topic.
Anyways, as you buy more and more basic attention tokens by giving it Ethereum, it will slowly raise the price that you are paying for each token.
For example, the first one might be $1.20. The next one you buy after that might be $1.20 and a tenth of a penny. The next one that you buy might be 1.20 and three-tenths of a penny, and maybe after you’ve bought 100 basic attention tokens, the price might be $1.50.
So that might have been confusing but think about it like this. As you buy more and more basic attention tokens, the liquidity pool will charge you more and more for each one. This is because it wants to keep the perfect 50 to 50 ratio of an Ethereum and Basic Attention Token.
Well, you’re buying more basic attention tokens. You’re giving it Ethereum so that it thinks the price of Ethereum is dropping because there’s a lot more of it in the pool. So for it to keep the 50/ 50 value ratio, it will essentially raise the price of basic attention token at least using the algorithm that it uses.
If you’ve made it this far without reading our automated market maker post, congratulations, but if you’re still confused, or you didn’t get any of that, read the AMM (Automated Market Maker)post, and most of this will make perfect sense.
Now, something to keep in mind with liquidity pools is that every transaction has a tax. It will cost a tiny percentage of each trade for you to make a trade, and we’ll go over where that money goes in a minute.
A great example of a liquidity pool is Uniswap. They allow you to trade almost any Ethereum token for any other Ethereum token, and the cost is a minimal fee.
Moving on, one important and influential thing of liquidity pools that I want to mention is that what if we have a bunch of basic attention tokens and instead of trading it for Ethereum, we want to trade it for some of the graph tokens.
Well, most decentralized exchanges will hook up two liquidity pools together to allow you to perform that trade directly.
For example, you tell it that you have Basic attention token and want to buy the graph token. Well, that decentralized exchange will actually do two swaps. The first one, it will do Basic attention token to Ethereum, and then it will do Ethereum to the graph token.
Essentially, swapping out basic attention token for the graph token for you. Now, the technical term for this is routing, and it’s very powerful.
The decentralized exchange will route some trades for you to essentially trade any token on their platform for any other token, even if there aren’t a bunch of liquidity pools for that token.
So, now that we know roughly how a liquidity pool works let’s go over why you would want to put money into one because you can be an investor in a liquidity pool.
Whenever you put money into a liquidity pool, you are what is called a liquidity provider.
So, do you remember how I said every trade takes a minimal fee? Well, as more and more people trade, those fees start to add up.
Where do those fees go? They go to the liquidity providers.
So, let’s say you put in $500 of Ethereum and $500 of basic attention token into a liquidity pool. Your friend decides to join you, and he does the same thing. So, now there is $2,000 total in the liquidity pool.
Now, as people are trading in and out all day long, let’s maybe say you rack up $150 in fees. At the end of the day, since you owned 50% of that pool because your friend owned the other half, you earn $75 for providing that liquidity, and yes, these fees can add up to be substantial amounts in the current crypto atmosphere.
Some de, centralized exchanges are offering up to 500% APR, and this is because they are making a boatload of money from the fees. Since the technology is new, there aren’t very many investors but as more and more people join the pool, your cut gets less and less, making the price more stable.
One of the fundamental things of how a liquidity pool works is that as the pool grows in liquidity, as more money is put into it, it takes much more money to move the price of both assets.
For example, suppose someone came to your $2,000 liquidity pool and dropped in $500 because they wanted to trade their Ethereum for a basic attention token. In that case, they could raise the price of basic attention tokens a lot because, essentially, they bought a ton of it up.
And so, due to the algorithm now, there’s not much in the pool, but there’s a ton of Ethereum, and because of how the AMM algorithm works, BAT will cost more, and Ethereum will be cheaper.
Well, if there were 5 million dollars of liquidity in that pool and someone came along and put in the same $500, the price would not move much because they would barely take any of the BAT out, and they would barely give any Ethereum at least in proportion to how big the pool is.
So, one term you need to know is price impact, and this means how much you can affect the price by buying from this liquidity pool.
There will be a very high price impact if the pool is small. In short, you will affect the price a lot, and in some cases, you can even double or triple the cost of an asset very easily.
However, as the pool grows and it gets larger and larger, the price impact gets smaller, and large buy-ins affect the priceless.
Another thing worth mentioning is something called arbitrage traders. Remember how I said if someone buys a bunch of basic attention tokens that the price of Ethereum would drop?
Well, at least in that pool. Ethereum might be $450 for each Ethereum in that pool after someone gave it a ton of Ethereum. Well, what if you could sell your Ethereum to Coinbase for $500.
You could buy a bunch of Ethereum from that pool and then immediately go and sell it to Coinbase, and for every transaction, you would make $50 off of every Ethereum that you sold.
This is called arbitrage trading, and you might wonder, why are they going to do a bunch of trades of all they’re going to do is scoop up a bunch of profits?
Well, that is exactly what they’re doing, but they’re also paying that minimal fee, and they’re also helping to keep the pool prices the same as other exchange prices.
They’re essentially helping to keep a stable price of that token by ensuring that it’s the same price everywhere.
If it’s not, they can buy it at a place that sells it cheap, and they can sell it at a place that accepts it at a higher price.
In short, they will make a profit, but we need people like that. In fact, you could be one of those people.
One more thing about the power of liquidity pools. They can get complicated very quickly. For example, Balancer is a platform that currently allows up to eight assets in a single liquidity pool.
The math and the algorithm on that are crazy, but it does show the limitless possibilities of decentralized finance.
Ending this post, you should know there are also risks involved with investing in liquidity pools. For example, two big ones are impermanent loss and rug pools.
Now, you should keep them in mind when you’re investing in these highly profitable liquidity pools.
Please reward our hard work by clicking the share button if you’ve enjoyed this article.
Thank you guys so much for reading. I hope that you learn something, and we hope to see you in the next blog post.