In this two-part blog, we’ll explore best execution in the lens of cryptocurrency and decentralized finance market structure, along with analyzing unique factors impacting on-chain trading, such as Maximal Extractable Value, sandwich attacks, and smart contract exploits. We’ll also delve into the recent product launch of UniswapX and the $60+ million exploit of Curve Finance.
Part 1: Best Execution and Market Structure
Best execution has long been a cornerstone of traditional financial markets, ensuring investors receive optimal trade terms. At its core, best execution promotes trust in markets by guaranteeing investors and traders receive optimal pricing and terms during trade execution. It reduces conflicts of interest and information asymmetries between brokers, exchanges, and traders. This obligation, deeply rooted in traditional finance, is now at the forefront of the rapidly evolving cryptocurrency sector, as new opportunities and challenges arise with the evolution of decentralized finance (DeFi).
In the United States, the concept of best execution traces back to the common law obligations of brokers to provide the most favorable terms reasonably available for their customers’ orders. This duty was later codified into federal legislation with the Securities Exchange Act of 1934, which formally established the requirement for brokers to seek best execution for customer trades.
The Securities and Exchange Commission (SEC) provided further regulatory guidance and rules to clarify brokers’ best execution responsibilities over the years. A major development was Regulation National Market System (Reg NMS) in 2005, a series of regulations aimed at modernizing and strengthening the equity markets. Reg NMS specifically promoted principles like fairness, transparency, and competition in market trades to ensure investors receive fair outcomes.
Centralized Exchanges (CEXs)
In the mainstream finance realm, centralized trading platforms like Robinhood, E*TRADE, and TD Ameritrade are synonymous with stock and commodity trading. These platforms operate within a regulated environment to ensure proper oversight. Similarly, there are centralized trading platforms for cryptocurrency trading, such as Coinbase, Binance, and Kraken.
These cryptocurrency centralized exchanges (CEXs) resemble traditional exchange models but have faced criticism for combining multiple roles that are distinct in conventional markets. Specifically, crypto exchanges have been accused of acting as the broker, exchange, and clearing agency all in one. Consolidating these functions into a single entity introduces potential conflicts of interest, as highlighted in recent lawsuits against Coinbase and Binance filed by the SEC. The SEC argued that these exchanges were operating outside of regulatory purview despite taking on brokerage roles.
That said, centralized exchanges have become the main gateway into cryptocurrency trading for most investors. They offer benefits like speed, user-friendly interfaces, and minimal slippage between bid and ask prices due to ample liquidity. However, they also come with risks and limitations such as custodial account hacks, limited asset offerings beyond mainstream coins, and heightened regulatory uncertainty to name a few.
Decentralized Exchanges (DEXs)
In contrast to centralized exchanges, decentralized exchanges (DEXs) operate without intermediaries. DEXs utilize smart contracts on blockchain networks to enable peer-to-peer crypto trading. Top DEX platforms include the likes of Uniswap, SushiSwap, and Curve. These exchanges allow users to trustlessly trade cryptocurrencies through automated liquidity pools, rather than centralized order books.
DEXs offer several advantages over CEXs. DEXs enhance security by eliminating a central point of failure and enable users to retain control of their private keys. They offer greater privacy, often bypassing rigorous Know-Your-Customer (KYC) checks, and provide unrestricted access, allowing anyone with an internet connection to trade. DEXs also boast a diverse asset selection due to permissionless listings, ensuring transparency with all transactions recorded on-chain. Their decentralized nature ensures resilience, reduced downtime, and freedom from withdrawal limits or account freezes. However, potential challenges like lower liquidity and a steeper learning curve for non-technical users should also be considered.
As decentralized finance (DeFi) continues rapid growth, the number and variety of DEX platforms and offerings also multiply. This presents the need for solutions to efficiently route trades across venues and find optimal pricing. DEX aggregators have emerged as a solution to optimize trade execution across decentralized exchanges. Aggregators like 1inch and ParaSwap utilize complex routing algorithms to analyze liquidity and pricing across multiple DEXs.
For example, say a trader wants to swap a specified amount of ETH for WBTC. An aggregator will assess swap rates and liquidity pools across platforms like Uniswap, SushiSwap, Balancer, etc. to find the optimal path to maximize the amount of WBTC returned. The aggregator may break up the trade into several chunks across multiple DEXs if needed to improve pricing as shown below.
This contrasts trading directly on a single DEX like Uniswap, where trades occur only within its isolated liquidity pools and at its current rates. DEX aggregators expand the possibilities for better execution quality by scanning the entire DeFi ecosystem.
Uniswap recently released an intriguing hybrid trading model called UniswapX that combines on-chain and off-chain liquidity through a Dutch auction system. UniswapX aims to improve upon the traditional on-chain automated market maker (AMM) model by introducing external liquidity providers. It works via an off-chain request-for-quote (RFQ) system. External liquidity providers, called “fillers,” can submit bids to fill trade orders off-chain. The idea is for fillers to compete to offer the best quotes, creating a decentralized network sourcing liquidity similar to traditional exchange market makers.
According to Uniswap Labs, this model provides two major advantages:
- Gas-Free Trading: By handling liquidity sourcing off-chain, UniswapX removes gas fees (transaction costs on the Ethereum network) for trade settlement on-chain. This makes trading more cost-efficient.
- Improved Execution: The competitive filler marketplace aims to reduce slippage and provide better overall pricing compared to on-chain AMMs. This appeals to larger trades or traders prioritizing execution quality.
However, the off-chain aspects of UniswapX introduce potential centralization risks. For instance, the opaqueness of off-chain activity could inhibit transparency into the filler ecosystem. Liquidity could concentrate into a few dominant players able to crowd out others.
In summary, while UniswapX offers potential fee and execution improvements, it diverges from the ideals of fully decentralized on-chain trading underpinning DEXs broadly. Whether its hybrid model strikes the right balance between benefits and risks remains to be seen.
Regulatory Perspectives
In December 2022, the SEC proposed new rules under the Securities Exchange Act of 1934 relating to a broker-dealer’s duty of best execution, including a focus on crypto security tokens. Furthermore, recent actions from the SEC signal greater regulatory scrutiny and enforcement for cryptocurrency trading platforms. While regulation aims to protect investors and promote fair outcomes, practical implementation faces challenges in such a diverse emerging sector. Striking the right balance between providing investor protections and fostering technological growth remains an ongoing trial.
In the second part of this blog, we’ll illuminate the dark forest of on-chain transactions and delve into the world of Maximal Extractable Value (MEV), sandwich attacks, and exploits that have impacted the ideals of best execution in decentralized finance.