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.
Two factors determine the efficiency (interplay among speed, cost & scalability) of onchain liquidity:
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:
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?
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:
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.