When cryptocurrencies boomed and dozens, if not hundreds, of new coins, became available on Ethereum in 2017, the need for decentralised exchanges became quickly apparent. CEXes like finance were slow to list new tokens, had KYC requirements and required users to relinquish control of their funds, which went against the core principles of crypto.
However, simply taking order books and bringing them on the chain proved to be a very hard task that is yet to be solved today. Besides the obvious problems with low liquidity on some of the less popular coins, they were expensive and slow to run. Placing and removing orders would require a transaction, and every time and minutes could pass before orders would get executed and confirmed on the blockchain. A completely different solution was clearly needed.
That solution came in the form of the now famous x*y=k “Constant Product” formula and Automated Market Makers. Instead of depending on constant interactions between two counterparties (makers and takers) to perform trades as order books do, AMMs rely on algorithms and computer programs (e.g., smart contracts) to always take the opposite side of a trade. There are many different ways to approach pricing assets in AMMs, as there is no usual price discovery mechanism.
The Constant Product Market Makers (CPMMs) were the first and remain the most dominant class of AMMs. They use liquidity pools and use asset composition in those pools to price the tokens. The idea was proposed by Vitalik Buterin on Reddit 6 years ago, was first implemented by Bancor and saw an explosion in adoption with the release of Uniswap V1. In the x*y=k formula used in CPMMs, x and y denote the quantity of each token, while k is a constant value that remains unchanged during trading.
It is easy to see why this seemingly simple idea is considered one of the biggest innovations in DeFi. If people are buying token x, less and less of it remains in a pool, making it more expensive compared to y and vice-versa. It is also easy to see the first big problem that comes with this approach.
The name of this problem is price impact. Because CPMMs use asset reserves to calculate prices, and reserves change during each trade, the final execution price can be noticeably different from the quoted one. In the “vanilla” x*y=k implementation, the price swings can be especially dramatic, leading to high volatility.
This happens because of another shortcoming of the first generation of AMMs. Contrary to orderbook exchanges, these AMMs buy and sell tokens at all prices as they approach both 0 and infinity. This means that the actual liquidity is spread across all possible prices even though they might never be reached. As a result, even in pools with large TVL, only a small part of liquidity actually supports trading. Less liquidity means larger price swings and a worse experience for traders.
Liquidity Book is an AMM that will improve the user experience for both Traders and Liquidity Providers, tackling issues they face with traditional AMMs and maximizing capital efficiency when Trading and providing Liquidity
Another issue with traditional CPMMs is the lack of flexibility. In order book exchanges, market makers can develop and execute a wide variety of strategies depending on their goals, market outlook and resources. On the x*y=k AMMs, liquidity providers are stuck with only one option: to deposit liquidity or to not deposit. On the one hand, this reduces complexity making liquidity provision accessible to everyone. On the other hand, it also reduces possibilities for innovations preventing others from building new products on top of exchanges.
Liquidity Book comes with flexible strategies that can be executed in a few clicks
Once Uniswap and x*y=k were born, two competing trends started. One of them focused on bringing it on every possible chain in every possible variation - the technology was relatively easy to fork, understand and implement. The second one centred around finding potential solutions and improvements. While the CFMM was DeFi’s “zero to one moment”, the search for a technology that could bring it from one to a hundred never stopped.
And as of late 2022, it is fair to say we can see more and more fruits of that search. The popularity of UniswapV2-style exchanges is dwindling.
Some exchanges got rid of the constant functions completely and use, for example, oracles to fetch prices from order book exchanges while still relying on automated trading and liquidity pools.
Others opted in for a concentrated liquidity approach, where liquidity isn’t evenly distributed across all possible prices but instead is focused around a specific price point either by liquidity providers themselves or automatically.
TraderJoe’s new liquidity book uses discretized approach to distribute liquidity across multiple price bins, with each bin behaving as a constant sum (x+y=k) pool.
Constant sum pools gives Traders the power to execute Swaps with efficiency
Collectively “non-x*y=k” exchanges already account for more than 60% of the DEX volumes, mostly due to the growing Uniswap V3 dominance. These exchanges not only provide a better experience, flexibility and earning potential to liquidity providers but also the best prices for traders, which is arguably the most important thing for an exchange.
As such, it seems the days of x*y=k exchanges are counted. Many of them are trying to revitalize the idea by offering clever tokenomics and other features, but the trend is clear. The dawn of an era that started a little over four years ago with the UniswapV1’s release is near, and the future is brighter than ever.
To read more about the key features of Liquidity Book - A next gen AMM the below article provides all necessary information:
Good project