DeFi Innovation Dive. Part One: Liquidity Pools And Automated Market Makers

Super Protocol
4 min readAug 8, 2022

This week’s theme might need some explanation on why understanding how decentralized exchanges provide liquidity for the assets they trade is essential. But, of course, lacking that kind of knowledge won’t hinder your Web3 experience in any way, and you’ll be perfectly fine just by using the tools provided by several awesome Web3 projects.

Yet, here is the main reason why you’d want to have a deeper understanding of the topic:

  1. As DeFi is one of the core use cases for the Web3 tech stack — it is important to know its inner workings and key concept to distinguish between the real things and buzzwords
  2. Liquidity is an excellent topic to develop your understanding of DeFi in general. It’s a perfect illustration of how Web3 is different and innovative.
  3. Explaining it later to your friends and family would make you look much cooler and tech-savvy than a typical NFT-bro.

As to why this topic needed a bit of motivation early on, understanding DeFi deeper indeed requires some thinking, research, and hands-on experience (also, this article series might take longer than usual). For the last part, you might already have it if you’ve used any swap protocol (Uniswap, for example), but how exactly are they working their Web3 magic?

First, let’s get back a bit to the traditional exchanges. A stock exchange uses an order book to match bidders and sellers, but as it’s a closed system, it requires someone to constantly make the trades to:

  1. Create a spread inside which both parties could agree on the reasonable price of an asset
  2. Decrease the time span required for the trade to happen
  3. Provide the amount of the asset that meets the demand of both (buyers and sellers) (which technically contributes to (b) but would come up as necessary later)

Those who are called market makers. They are incentivized to make trades and create action in the market in order for “real” trades to happen.

What happens when it comes to DeXes with an open ecosystem, a vast combination of asset pairs, and a much lower entry barrier? A trivial intuition would be to say, “Yay, we don’t need market makers, since the ecosystem is open and the probability of finding the right trade (meaning it would satisfy conditions on the amount and price for both buyer and seller) should be high enough!”.

It turns out it’s not that simple. Providing a fair price for each asset pair is still a challenging task. For example, what if someone has the amount of the asset I need but asks for a much higher price? I can find a seller who’s OK with lowering the price, yet they might not want to sell the amount I want at that cost.

So how does Web3 solve this? By doing what it does best, subjugating complexities of human-to-human interactions with technology!

Meet the liquidity pools! First introduced by Bancor, the concept is now ubiquitous and fundamental to the DeFi ecosystem. The idea is simple, let’s create a container (pool) for each token pair and let anyone contribute their tokens to it but in a way that would keep the distribution of the tokens inside the pool equal– now we’ll always have the right amount of tokens needed for the trade.

But what about the price? Any new trade creates an inequality in the token distribution inside the pool, which instantly moves the price (up or down does not matter, what’s important is there’s a gap open for speculation, which is called arbitrage opportunity). So here comes the second innovation: automated market makers (AMM for short). An AMM algorithm uses a mathematical equation to balance the price. To do so, these algorithms constantly search for arbitrage opportunities, buying assets “at a discount,” balancing the prices, and sustaining a stable state of the whole ecosystem.

A great way to wrap your mind around it is the Uber analogy. Think of a centralized exchange as a traditional taxi service: it has its park of cars and drivers, which defines its capacity to satisfy a certain level of demand for transportation services. Then comes Uber with the idea “hey, today there are enough cars and drivers; also, everybody has smartphones — let’s create a platform that will match supply with demand in a deterministic manner.” Now the Web3 version of this would be “we don’t need a proprietary platform. Let’s crowdfund a public transportation system that relies on an automated algorithm to determine the demand for transportation across the city and compile its route based on that information”. AMM algorithms combined with liquidity pools do precisely that: provide an optimal route to balance the price and match supply with demand based on what’s available.

This leaves a lot of new questions: what about the people who have contributed to the pool, are they rewarded? Can’t’ someone create an AMM or another algorithm that exploits the system?

There’s a lot to explore; stay tuned for the next part!

Written by Artemy Domozhakov-Liarskii especially for Super Protocol

--

--

Super Protocol

Super Protocol, the confidential cloud and marketplace for Web3 and AI. Powered by confidential computing.