March 13, 2024

Infrastructure vs. Market Structure: Redefining Path to Global Adoption of Onchain Liquidity

Market structure innovations in onchain liquidity are only temporary fixes, and builders should drive more focus towards building new paradigms of financial infrastructure. In this article, we explain the thinking behind this view & propose our vision for the future of DeFi & onchain liquidity.

Introduction

All future trading will be onchain, simply because extracting away counterparty risk via trustlessly automating intermediaries in decentralized finance (DeFi) is cheaper & safer than what traditional finance (TradFi) can offer. To provide some perspective on the scale, DeFi is able to save $30bn/year on remittances alone. However, there are certain limitations to onchain liquidity, like low speeds, high fees & liquidity fragmentation. We’ve seen ingenious mechanism design attempts to mitigate these limitations, like AMMs, JIT liquidity, batch auctions, etc. But it’s becoming clear that these market structure innovations are only temporary fixes, and builders should focus more on building and launching a new paradigm of financial infrastructure. In this article, we explain the thinking behind this view & propose our vision for the future of DeFi & onchain liquidity.

Infrastructure & Market Structure

Two factors determine the efficiency (interplay among speed, cost & scalability) of onchain liquidity:

  1. Infrastructure: The foundational technology & systems, enabling execution, settlement of trades. It encompasses the hardware, software, and networks through which assets and information are exchanged, and it sets the stage for the possibilities within the market. Traditional finance relies on high-speed and specialized hardware like FPGAs, while DeFi operates on blockchain technology, with Ethereum being the predominant platform. In terms of speed, cost & scalability, TradFi infrastructure is still miles ahead of the blockchain infrastructure. Because infrastructure is suboptimal, DeFi builders have been trying to improve user experience via innovation in market structure.
  1. Market Structure: A set of rules, protocols and systems that determine how trading activities are conducted. The goal of a proper market structure is to achieve market thickness, safety, and the ability to overcome congestion. While TradFi uses market structure choices like centralized limit order books (CLOBs - e.g. NASDAQ) and payment for order flow (PFOF - e.g. Robinhood), DeFi innovations such as automated market makers (AMMs - e.g. Uniswap) and order flow auctions (OFAs - e.g. CoW Swap) are a paradigm shift in how trades are executed and liquidity is managed. DeFi has been a sandbox for market structure innovation.

Market structure innovation has done a good job of shifting the blockchain from almost unusable (EtherDelta) to onboarding 7m users into DeFi. However, there are still significant infrastructure limitations. Most on-chain trading (ca. 70%) today takes place on Ethereum and EVM-compatible chains, which, despite their potential, are held back by high fees ($4.3 average fee) and low transaction speeds (12 second blocktimes). These infrastructure limitations in turn necessitate innovative solutions in market structure. L2s are a quick fix, but introduce further problems with liquidity fragmentation. Let’s look more closely at the interplay of infrastructure & market structure, i.e. how the key infrastructure limitations drive market structure innovation from the perspective of two key user personas: Swappers & LPs.

High fees cause Swappers to overpay for transactions. There is no clear market structure innovation to mitigate this and will only ever be mitigated by better infrastructure. EtherDelta was the first CLOB on Ethereum, and despite initial traction, it failed to compete with other market structure setups due to high Ethereum mainnet fees and got sunset in 2018. Layer2s (Optimism, Arbitrum), sidechains (Polygon), appchains (DyDx) are the quickest route to solving the problem of high fees for Swappers, but at the cost of liquidity fragmentation. The focus should be on building more performant layer1s (Solana), which offer much higher performance (Solana with ca. 65k tps as opposed to e.g. Optimism with 2k tps) and does not suffer from liquidity fragmentation.

High fees also cause LPs to not be able to use CLOBs on the blockchain, as CLOBs are centered around submitting and canceling a high number of orders in a small amount of time. A typical market maker makes thousands of transactions per hour. High frequency traders make as much as tens of thousands per hour. This would translate to millions of dollars in daily fees for market makers. This has to some extent been addressed by innovative market structure in the form of AMMs (pioneered by Bancor & Uniswap). In AMMs LPs don’t need to actively quote, so pay only once when they deposit and once when they withdraw, but their liquidity is more passive compared to liquid centralized venues where price discovery happens, which means they’re susceptible to LvR (Loss vs. Rebalancing - more on this in later sections). Although AMMs came the closest to solving the issue of high fees for LPs using innovation in market structure, they haven’t managed to move the efficiency of onchain liquidity to even close to TradFi.

Low speeds cause Swappers to suffer from MEV, i.e. get sandwiched and frontrun. MEV is the profit captured by reordering of transactions in the block production process. As a result, Swappers are not getting the best price settlement and suffer from slippage, and their losses are an additional form of profit for validators. One of the main causes of MEV on the existing infrastructure is that mempools are public and blocktimes are long. Market structure design has attempted to mitigate this by order flow auctions (OFAs) and MEV redistribution mechanisms. OFAs are mechanisms designed to redistribute profit from MEV back to end users by auctioning off the right to execute the order. They are essentially an onchain implementation of Payment for Order Flow (PFOF) in TradFi. Currently, there are 3 wider approaches to OFAs:

  1. Batch auctions (CoW Swap): Batch auctions aggregate multiple buy and sell orders within a specified time frame before executing them all at once, determining the price based on the aggregate demand and supply.
  2. RFQs (0x): RFQs are a process where a buyer or seller solicits quotes from multiple participants for a specific quantity of an asset before executing a trade, allowing them to select the best offer.
  3. Dutch auctions (1inch, UniswapX): Dutch auctions start with a high asking price which is gradually lowered until a bidder accepts the price, determining the sale price of the asset.

Batch auctions focus on aggregating and executing orders simultaneously to find an equilibrium price, RFQs seek the best price by soliciting multiple offers for a trade, and Dutch auctions dynamically adjust prices downwards until demand meets the supply. The problem with OFAs is that they are slower than other market structures, often taking 30 seconds to execute, which means that they may be good for retail needs, but definitely not for institutional high frequency traders. OFAs also hurt passive liquidity locked in AMMs, because participants in OFAs, active LPs (also called market makers), conduct arbitrage against AMMs.

MEV Blockspace aggregators (MEV Blocker, MEV Share) work by bundling multiple transactions together, optimizing the order of execution to minimize the potential for front-running and other forms of MEV exploitation, while aiming to secure more favorable transaction inclusion and execution for users. Users plug in private RPC endpoints from their wallets. However, a report by Blocknative suggests that blockspace aggregators can actually create worse settlements. Also, adoption of alternative mempools poses centralization risks.

Low speeds prevent LPs from submitting and canceling many orders fast, which causes them to suffer from Loss vs. Rebalancing (LvR), because they always react slower than more performant centralized exchanges where price discovery happens. This leads to LPs trading at stale prices. This can be mitigated: on an infrastructure level by an offchain matching engine (dYdX), offchain RFQs, L2s and more performant blockchains; on a market structure level, it can be mitigated by oracle-based pricing and dynamic fees. However, market makers hate dynamic fees, and would be inclined not to trade in those conditions.

While we appreciate the levels of market structure sophistication and innovation reached when attempting to resolve the problems of high fees and low fees for swappers and LPs, we believe that the more efficient approach to bringing all trading onchain lies in the focus on development of more advanced infrastructure first, and the thoughtful integration of innovation in DeFi market structure later. Projects like Solforge on Solana exemplify this direction, offering developers the tools to create appchains with shared sequencers and off-chain order matching, thereby improving performance and scalability. This is the infrastructure approach that will eventually get us close to the 1ms transaction speed that we see in TradFi. There is one remaining big question to address: What should the optimal state of market structure look like once infrastructure limitations are resolved?

A Vision for the Future of On-Chain Liquidity: Highly performant infrastructure, highly optimized market structure

As we continue overcoming infrastructure challenges, the future of on-chain trading will likely mirror that of traditional finance in many respects, incorporating aspects from TradFi, like centralized order books alongside DeFi innovations, like AMMs & mechanisms to return MEV to users. It’s impossible to predict the future, but these are the 6 key takeaways from our rough notes:

  1. Hybrid Market Structure: We’ll continue leveraging Automated Market Makers (AMMs) to ensure liquidity for long tail assets. To address the ensuing challenges of Loss vs. Rebalancing (LvR) for LPs, oracle-based pricing will be introduced, so that the prices at which AMMs are trading mirror the real world. Also, MEV mechanisms will stay, ensuring that value captured through transaction ordering benefits the community (yes, there will be some MEV even on Solana). One notable innovation is the adoption of singleton AMMs, platforms like Ambient exemplify this approach by enabling more cost-effective swaps. By favoring single-hop transactions over multi-hop, these platforms significantly reduce gas fees, making on-chain trading more accessible. Notable examples of early hybrid market structures include Raydium and Attrix. Although they are AMMs,they  also plug into Serum to provide liquidity for maker fees. Attrix has no client fees, but receives funds from liquidity provision on Serum.
  2. Retail and Institutional Order Flow: A significant shift will occur in how retail and institutional orders are processed, with account abstraction allowing third parties to cover gas fees. This system enables retail users to pay in their preferred currency while external parties compete for their business through tips, streamlining the trading process and enhancing accessibility. Institutions will be able to easily plug into the trading infrastructure via well designed tooling, e.g. easy to use APIs and keeper bots.
  3. ETFcation of LPing: Providing liquidity will soon resemble investing in an Exchange-Traded Fund (ETF), where specialized market makers harness passive liquidity. This approach transforms retail capital into a more sophisticated, impactful force within the market, elevating the strategic deployment of assets. Deriverse is a project pioneering this approach
  4. Superior UX/UI: The boundary between market makers and traders is set to blur, thanks to advancements in UX/UI design. This evolution will foster a more integrated trading community, where roles converge in the pursuit of yield, simplifying the trading process and enhancing user engagement across the platform.
  5. Innovative Products: The future will also see the introduction of innovative financial products, such as Squeeth by Opyn, and perpetual contracts (perps) on previously illiquid assets, exemplified by platforms like Parcl. Pre-launch perps by Aevo. These developments promise to open new avenues for investment and speculation, further diversifying the on-chain trading ecosystem.
  6. Unified Market State: In the traditional world, users don’t have to specify which data centre you want to stream your Netflix movie from. They don’t have to choose between a JP Morgan dollar or a Morgan Stanley dollar. We expect the same experience in onchain liquidity soon.

Conclusion

While the advances made in market structure innovation are commendable and have significantly propelled the DeFi space from its early stages to a user base of millions, the path to fully realizing our vision of on-chain liquidity necessitates a foundational shift towards prioritizing infrastructure development. This approach will not only alleviate the pressing issues of fees and speeds but also pave the way for a future where the market structure can evolve on a platform designed for the next century of finance.

To builders in DeFi communities: Let’s create a financial infrastructure that is performant and scalable. If you have any comments or feedback, please reach out to info@deriverse.io.