Picture this: the whole DeFi infrastructure is a massive puzzle with numerous pieces scattered around. It’s overwhelming, and it’s no wonder that many people find it challenging to grasp.
This complexity arises because the current defi infrastructure is exceptionally inconvenient and cumbersome. It resembles a chaotic collection of disconnected fragments rather than a cohesive and symbiotic system.
But wait – there’s a solution!
The latest advancements in DeFi aim to unify and integrate these isolated and scattered fragments. It requires the simultaneous resolution of two problems: crypto liquidity aggregation and cross-chain interoperability.
When these problems are solved, we will have Web3 Liquidity Aggregation.
So, let’s dive in!
What is Liquidity Aggregation?
Table of Contents
Liquidity aggregation is about combining liquidity from multiple sources into one unified pool. This pool is then utilized to perform transactions more efficiently and cost-effectively than single sources of liquidity.
Think of it like a group of friends pooling their money to buy a gift for someone. Combining their resources allows them to afford a nicer gift than they could have purchased individually. In the same way, liquidity aggregation will enable traders to access a larger pool of liquidity, which can result in better pricing and faster transaction execution.
On a side note, liquidity aggregation is not unique to the crypto world. Traditional stock exchanges also utilize pooled liquidity to provide clients with better pricing and faster transactions.
However, liquidity aggregation is critical in crypto trading due to the industry’s fragmentation and the multitude of trading platforms and cryptocurrencies.
But how does it work?
Imagine you’re a trader trying to purchase 1 BTC on the market. The top bid price is $30,500, and the best ask price is currently $30,400. You want to get the best price possible for your BTC, so what do you do?
If you decide to execute a purchase order at the best bid price, it may take some time due to the limited liquidity available at that value.
However, if you were to aggregate the liquidity from all exchanges, the bid and ask prices would be almost equal.
So, using liquidity aggregation, you could purchase 1 BTC for $30,400, lower than the highest bid price on any individual exchange.
Besides, combining liquidity pools can significantly enhance our chances of completing transactions quickly and affordably. It contrasts with Automated Market Makers (AMMs), where traders can only use liquidity from a single platform. As a result, a high volume of orders on a single platform can cause the price to inflate artificially, leading to slippage.
To illustrate this, let’s take the example of multiple institutions wanting to buy $AAVE tokens on Uniswap. Each institution places a trade, causing the price to rise. It leads to an artificially high price on Uniswap compared to other platforms.
On a side note, arbitrage bots can somewhat regulate the cost, but still, slippage can be high at times.
Alternatively, each order can be split to achieve the best price using a liquidity aggregator like Magpie Protocol. For instance, if Order A is for $2 million, the first $1.5 million could be used on Uniswap, while the remaining $500K could be on SushiSwap. Order B would follow this process and could also be split to get the best price.
By consistently providing the cheapest available rates, we can minimize the impact of significant trades on the price and make liquidity from multiple platforms available to users from a single dashboard. With platforms like Magpie Protocol, investors can leverage this technology and enjoy a seamless, user-friendly experience.
Why Aggregate Order books?
Traditional market makers play a significant role in providing liquidity and ensuring trades execute quickly, making order books preferred over AMMs regarding optimal pricing and execution.
However, there is a catch: there must be sufficient liquidity and market makers regularly updating their quotes for order books to work effectively. It is particularly crucial when dealing with vast assets traded on-chain.
An aggregated order book gauges liquidity differences across exchanges and order sizes and displays the order book for a given platform, with multiple exchange books layered on each other.
Let’s take an example. In 2017, for the ETH/BTC cross, three of the most liquid exchanges were Poloniex, Bitfinex, and Bittrex.
Using this data, we can estimate the cost of liquidity. Specifically, we can calculate the weighted-average price of all the bids or asks necessary to fill an order and compare that price to the mid-market price.
The order books of different exchanges can be highly skewed but not always in the same direction. For instance, at one moment, Poloniex may offer the best buying price for ETH while providing the worst selling price. Conversely, Bittrex may show the worst buying price but the best selling price. This liquidity pole position tends to flip quite often, complicating finding the best trading venue.
The aggregated order book, however, provides an advantage in such cases. It offers the lowest liquidity costs, but how it achieves this cost-saving varies.
At times, it helps by simply capturing the order book that dominates all others, such as when buying ETH, where the aggregate order book captures the liquidity from Poloniex.
On other occasions, it helps by pooling liquidity from each order book, such as when selling ETH, where each order book contributes a material amount of liquidity. The benefit of using an aggregate book is that it can identify the most significant source of liquidity while adding up different sources, providing a comprehensive view of the market.
The liquidity costs associated with a trade tend to scale with the trade size, but not always linearly. As the trade size increases by an order of magnitude, the liquidity costs tend to rise from 1x to 10y, where y > x. It happens because the differences in liquidity between exchanges tend to exacerbate as the trade size increases. Therefore, efficiently executing trades becomes increasingly critical when trading larger volumes. This is especially true for perpetual contracts, which multiply the volume by a factor!
Who is the major player in town?
Uniswap is often the first that comes to mind when we think of exchanges with aggregated liquidity. However, it’s important to note that Uniswap doesn’t focus on perpetual trading. That’s where decentralized exchange GMX comes in as an industry leader.
In November 2022, GMX earned $1.15 million in trading fees, surpassing Uniswap’s $1.06 million for the first time on record. GMX went live on the Ethereum layer-2 system Arbitrum in September 2021 and debuted on Ethereum-competitor Avalanche early in 2022.
What sets GMX apart is its relatively low transaction fees and zero price impact. It means no single trade can influence the market price- a common issue on other platforms.
As a result, GMX has become the seventh-largest decentralized application, ahead of prominent players like dYdX and Pancakeswap, according to data source Token Terminal. Moreover, GMX has pocketed $17.9 million in trading fees since its inception. In the same period, it also generated close to $11.5 billion in volume.
Source: https://stats.gmx.io/
Perpetual Exchanges With Aggregated Order Books Are Popping Up!
The order book market has embraced a mixed-mode approach. IDEX introduced its V3 Hybrid Liquidity DEX on Polygon in late 2021 by combining traditional order books with the AMM Liquidity pool.
Moreover, as advancements in the exchange sector continue to emerge, users have the opportunity to explore new and attractive options.
One such option is DPEX, a perpetual DEX operating on the Polygon blockchain, which aims to provide a more current and safer level of secure digital asset trading.
DPEX chain contracts have no expiration date, allowing trading for as long as the user desires. This way, traders can capitalize on trading opportunities and profit without worrying about expiring contracts.
CapDotFinance and Perpetual Protocol are also examples of decentralized perpetual exchanges with innovative features. CapDotFinance offers trading on various assets, including crypto, forex, index, and metals, and allows for advanced order types with zero price impact and leverage of up to 100x.
On the other hand, Perpetual Protocol utilizes a virtual automated market maker (vAMM) pricing mechanism that enables perpetual contract trading without market makers needing to provide liquidity or serve as counterparties. In June 2021, the platform announced its V2 version built on the Ethereum Layer 2 network with Uniswap V3-style aggregated liquidity as the core.
Many exchanges with perpetual exchanges with aggregated order books are still in the making. And as the industry continues to evolve, we can expect more advancements and exciting developments in the realm of cryptocurrency exchanges and trading.
Analysis Of Perpetual Exchanges Volume
source: https://dune.com/queries/2031393/3362716
Note: A TVL/Marketcap analysis shows Centrifuge is 200% undervalued compared to GMX
Source: CoinGecko
CoinGecko data for Spot exchanges show a completely different picture. The 24H real volume of the centralized exchanges dwarfs that of the decentralized exchanges.
In the derivative market, the leading decentralized exchange is dYdX, with a daily volume exceeding $600 million. At the same time, Binance processes around $29.6 billion in volume. This huge difference does not come from UI or UX alone. It has a lot to do with off-chain and on-chain order books and efficiency in executing trades.
Way Forward For Perpetual Exchanges In Terms of Order Books
Even though many decentralized perpetual exchanges leverage an aggregated order book for efficient pricing, it doesn’t solve the problem of efficient trade execution.
This is because the aggregation is at the base level, as a layered copy from other exchanges. It means the Virtual AMMs shall supersede ordinary constant product (x*y=k) AMMs . The biggest disadvantage of the on-chain order book shall be countered with advantages from aggregated and virtual order books.
It carries out the main function of delivering liquidity without even having a valid liquidity pool. It brings a major change in the game, as the absence of liquidity providers leads to the non-existence of impermanent loss. In other words, using a virtual AMM removes impermanent loss from the equation!
It also gives rise to virtual liquidity and virtual tokens.
Is aggregation the right way to proceed? Certainly. But it can not come at the cost of trade execution. The use of virtual AMMs shall be universal in a decentralized context. Also, the aggregated order book can serve as a protocol-independent infrastructure. This is essential as virtual AMMs can create protocol dependency in trading decisions. The availability of literally infinite liquidity can lead to trading bots exploiting volatility leading to pumps and dumps. It can prove detrimental to normal users and trigger chain liquidation events. It can lead to protocol hopping in traders and trigger huge Open Interests and market instability.
In short, the aggregation of order books is essential for decentralized perpetual exchanges to flourish.
Found value in the insights shared here? Check out our YouTube and Twitter, loaded with content meant to educate and entertain.
Follow our Telegram for a sneak peek at alpha; for an even deeper dive, join our Patreon community, where we share exclusive alpha for you to be the ‘early bird.’
Follow us today, and let’s explore Web3 together!