Reflections | The Battle Between CEX and DEX
August 15th, 2024

Table of Contents

I. Importance of Exchanges

  1. The Significance of Exchanges

    • (a) Why We Need Exchanges: Irrational Markets

    • (b) Characteristics of Good Exchanges

      1. Security of Asset Ownership

      2. Transparent Price Information

      3. Adequate Liquidity

    • (c) Exchanges as Good Business

      1. Symbiosis

      2. Flywheel Effect

      3. Licensing

II. Centralized Exchanges (CEX)

  1. Early Strategy of CEX

    • (a) Endogenous Factors

    • (b) Path Dependency

    • (c) Advantages of Centralization

  2. Challenges Facing CEX: The Traffic Problem

III. Iterations of DEX (AMM)

  1. Vitalik and AMM

    • (a) Identifying Early ETH Project Pain Points: High Spread Fee

    • (b) Reiterating: Patching the Holes

  2. Rapid Iterations

  3. Pain Points

    • (a) Gas Fees and Slippage

    • (b) Cross-Chain Challenges

IV. Comparison

  1. Value Chain Analysis

    • (a) Trader Preference — CEX Dominance

    • (b) Market Maker Competition — Equivalence

  2. Variables — The Upward Dimensional Warfare

Appendix: Growth Journey of Uniswap

  1. V1 Version (Launched November 2018) — Setting Sail

  2. V2 Version (Launched May 2020) — Iteration

  3. V3 Version (Launched May 2021) — Leap

  4. Conclusion


1. The Importance of Exchanges

(1) Why Do We Need Exchanges: The Irrational Market

The Efficient Market Hypothesis (EMH) posits that asset prices closely align with their intrinsic values, while the Market Speculation Theory leans more toward the belief in animal spirits. Behavioral economics, building on the speculative market theory, challenges the classical assumption of the "rational man" in Smith's framework.

In reality, all major figures in the investment world scoff at the assumption of the "rational man." Even Eugene Fama, the founder of the Efficient Market Hypothesis, is a shareholder of Berkshire Hathaway.

Moreover, the EMH itself categorizes market efficiency into three levels. The herd mentality, randomness in trading, and the formation of bubbles all call for an increasingly efficient market.

Figure 1: From left: Eugene F. Fama, Lars Peter Hansen, and Robert J. Shiller, all three Nobel Prize winners in Economics.

Source: The New York Times‌

(2) Characteristics of a Good Exchange

  1. Security of Asset OwnershipSince the advent of the slave society, property ownership has become increasingly important. In fact, after Smith, the success of the incentive mechanisms and the efficiency of resource allocation and usage brought about by private ownership began to be widely accepted. Therefore, asset verification is of utmost importance. Compared to other off-chain environments, the on-chain permissionless environment offers greater security for assets.

  2. Transparent Pricing InformationThe traceability of on-chain transactions and the characteristics of multi-node verification make the flow of information more transparent.

  3. Ample LiquidityWith the improvement in security and transparency, the liquidity depth of specific exchanges continues to strengthen.

(3) Exchanges Are Good Business

  1. SymbiosisLooking back at history, during the prosperity of the Netherlands, the Amsterdam Stock Exchange was the leading global exchange; during the British Empire's heyday, the London Stock Exchange was the world's benchmark; today, the New York Stock Exchange and the Chicago Mercantile Exchange occupy the center stage of the world.

    This reflects the direct relationship between the rise and fall of an economic entity and its exchanges. The strength of any exchange mirrors the prosperity of the economy behind it.

    Figure 2: A strong ecosystem inevitably breeds strong species.

  1. Source: The Internet

  2. Flywheel EffectA positive user experience, ample liquidity, asset security, and the number of users are all interdependent. Once the flywheel starts spinning, the siphon effect is inevitable. The increase in traffic inevitably drives product growth and better services.

    Figure 3: Amazon's Flywheel Effect

Source: The Internet

LicensingDue to the inherent reflexivity of financial markets, extreme volatility is unavoidable. To maintain market stability, regulation and licensing become the dominant forces. The scarcity of licenses further strengthens monopolies.

2. Centralized Exchanges (CEX)

(1) Early Expansion of CEX

  1. Internal CausesBefore Ethereum (ETH) became popular, the mainstream cryptocurrencies were mostly Bitcoin (BTC) or similar assets. Without smart contracts, centralized exchanges were the only option for trading.

  2. Path DependenceThe concept of truly decentralized exchanges (DEX) was not proposed until 2016 and did not materialize until 2017. For most market participants, the idea of an exchange is synonymous with centralized exchanges, making it difficult to shift away from this notion.

  3. Advantages of CentralizationEarly centralized exchanges offered higher efficiency, more convenient cross-chain transactions, and practices more aligned with traditional off-chain securities trading. Although there were certain spreads, in the highly volatile crypto market, they still presented an advantage over impermanent loss.

    Additionally, the order book system allowed users to define their own prices and even place stop-loss and limit orders.

(2) Challenges Facing CEX: The Traffic Dilemma

CEX currently faces the challenge of lacking on-chain application scenarios. From the Web2 payment tools, we can see that compared to pure trading tools, the traffic disadvantage faced by CEX is difficult to overcome. Traffic wars are common in Web2:

  • Google's Heavy Investment in Android: When Google's search engine had already achieved a revolutionary market share, the company decisively invested heavily in the Android operating system, thereby inaugurating the era of Android smartphones.

  • Microsoft’s Defeat of Netscape: Ten years before the birth of Android, the internet industry witnessed an event where the operating system overtook search. At that time, Microsoft, risking the wrath of internet users, forcibly promoted Internet Explorer, ultimately defeating Netscape and securing its dominance.

In Web3, the traffic narrative is also becoming a reality:

  • Binance’s Heavy Investment in Public Chains: As the world’s largest centralized exchange, Binance still decided to heavily invest in the Binance Smart Chain (BSC), likely recognizing the scarcity of entry resources and the reduction in traffic that could result from fewer application scenarios.

3. Iteration of Decentralized Exchanges (DEX/AMM)

(1) Vitalik and AMM

  1. Identifying Early Ethereum Project Pain Points: Excessive Spread FeesIn 2016, Vitalik Buterin wrote on Reddit, "Let’s run on-chain decentralized exchanges the way we run prediction markets," noting that early markets like MKR and EtherDelta had very high bid-ask spreads. He also pointed out that creating and canceling orders required Gas fees, which were very expensive.

  2. Revisiting the Concept: Closing the LoopholesIn May 2018, Vitalik revisited Martin Köppelmann’s architecture in "Improving front running resistance of x*y=k market makers," arguing that the greatest advantage of this model is that it can provide infinite liquidity and charge fixed fees.

    However, miners could launch front-running attacks against this model. Vitalik also mentioned corresponding remedial measures designed to penalize opportunistic miners.

(2) Rapid Iteration

The Automated Market Maker (AMM) curve was introduced by Uniswap at the end of 2018, marking the beginning of explosive growth in the DeFi industry. Subsequently, Balancer advanced the concept further by allowing more than two assets to participate in market-making and enabling weightings other than 50/50. This was followed by the emergence of Curve, which offered the market a Stable Swap option.

However, the launch of Uniswap V3 in 2021 seems to have unified the DEX landscape on Ethereum.

Figure 4: Uniswap Dominates, Accounting for 70-80% of Ethereum’s Trading

VolumeSource: Dune‌

(3) Pain Points

  1. Gas Fees and SlippageOn the active Ethereum network, Gas fees and slippage are unavoidable hurdles for all traders. While DEXs built on the blockchain offer simpler user interfaces, they also face the challenge of capital reduction due to trading friction.

  2. Cross-Chain ChallengesThe deep binding of DEXs with public chains enhances their ability to capture long-tail users on the chain, but it also closes off the possibility of migrating to other chains. The immaturity of cross-chain bridges fails to promote better capital flow on the blockchain.

4. Comparison

(1) Value Chain Analysis

  1. Traders—Preference for CEX

    Figure 5: Michael Porter's Value Chain Analysis Case StudySource: Internet

    • Trader Type—CEX is More MatureAccording to the 80/20 rule, the main participants in the market should be professional investors. Serious investors prefer the interface, operational habits, and investment options (derivatives) provided by CEXs.

    • Trading Variety—CEX is More DiverseCEXs have stronger aggregation functions, offering not only spot trading but also derivatives and other trading instruments.

    • Trading Costs—CEX is More ControllableThe transaction fees on DEXs have almost equaled those on CEXs, but the high and uncontrollable Gas fees limit the realization of arbitrage and other profit-making strategies.

    • Trading Volume—CEX Far Exceeds DEX

      Figure 6: Binance Spot Trading Volume

  1. Source: CoinGecko

    • Figure 7: DeFi Spot Trading Volume on EthereumSource: Dune

Binance's daily trading volume is currently more than 10 times that of Uniswap, a gap that reflects traders voting with their feet and suggests room for future improvements.

  1. Market Makers—Evenly Matched

    • Professional Market Makers—Embracing the MarketBoth Curve V2 and Uniswap V3 offer solutions for liquidity providers to aggregate liquidity, with capital efficiency almost on par with CEXs.

    • Retail Market Makers—Gradually LeavingAs capital migrates to more efficient markets (e.g., Uniswap V3), retail LPs (Liquidity Providers) may be gradually eliminated from the market due to their limited professional skills.

  2. Wallets—Entry PointAccess to CEX does not require a third-party wallet, whereas DEX transactions cannot be conducted without a wallet.

(2) Variables—The War of Dimensionality

In the professional market, the dominance of CEXs is unshakeable. Industry giants like Binance continue to invest heavily in IT and product services, making their offerings increasingly comprehensive. However, it's not another film producer that killed Kodak, but the digital camera; similarly, it's not another digital camera manufacturer that killed Nikon, but the smartphone.

If anything is likely to disrupt CEXs, it will be a shift in industry narrative. In the coming years, if the public chain wars settle and DEXs attached to major public chains become an indispensable part of the payment system, their role will be irreplaceable.

Looking back at Web 2.0, traffic and platforms were the core of the ecosystem. Extrapolating from this, when the aircraft carrier fleet of public chains + DEX + wallets + cross-chain bridges arrives in the future, can the battleships of CEXs still hold their ground?

Appendix: The March of Uniswap

Injecting liquidity and extracting liquidity correspond to the roles of market makers and traders, respectively. Market makers who inject liquidity can earn a share of the transaction fees from the pool, while traders who extract liquidity seek to exchange tokens (trade) and pay a portion of the transaction fees.

  1. V1 Version (Launched in November 2018)—The Beginning

    • Market-Making MechanismThe market-making process after the launch of Uniswap V1 was similar to a crowd-funding of a special vending machine, with real-time profit-sharing.

      The market-making formula was the constant product:xĂ—y=kx \times y = kxĂ—y=kIt can be transformed into the following form:

      Figure 5: Uniswap V1 Market-Making Curve

  1. Source: Paradigm

    • At this time, the liquidity supply was a straight line:

      Figure 6: Uniswap V1 Liquidity Supply Curve

    • Source: Paradigm

      There was no concentrated supply of liquidity, which harmed capital efficiency.

    • Impermanent LossThe AMM (Automated Market Maker) mechanism inevitably brings about impermanent loss, which is more of an ex-ante loss.This predictable slippage does not disappear as the liquidity pool deepens; it only reduces. The final loss is shown in the following graph:

      Figure 7: Impermanent Loss Curve

    • Source: Medium

      For a detailed mathematical explanation, refer to Hashkey's article, "The Quantification and Hedging of Impermanent Loss."

    • SummaryUniswap V1 was the debut of the AMM, establishing its early advantage in the DEX market.

  1. V2 Version (Launched in May 2020)—Iteration

    • Upgrades

      • Eliminating the Ethereum Intermediary: In V2, users no longer needed ETH as an intermediary token to facilitate the exchange between two ERC20 tokens, saving on Gas fees.

      • Price Oracle Functionality (TWAP): The time-weighted average price (TWAP) mechanism was introduced to effectively resist attacks. As liquidity increases, the cost of manipulation for attackers also rises.

      • Flash Loans: Tokens can be "borrowed" from Uniswap for interaction with any external service and then repaid within the same transaction. This feature is mainly used for arbitrage trading.

      • Protocol Fee of 0.05%: Lower transaction fees are always more popular.

    • Initiation of Fee MechanismUniswap V2 introduced a protocol fee mechanism. The project would charge a 0.05% fee, while the fee captured by liquidity providers was reduced from 0.30% to 0.25%.

    • SummaryThe V2 upgrade lowered participation costs and improved the robustness of the project. The introduction of flash loans brought Uniswap closer to the user experience of professional investors.

  2. V3 Version (Launched in May 2021)—A Leap Forward

    Financial markets primarily exist to solve the problem of efficient resource allocation. However, the order book model of CEXs and the concentrated liquidity model of Curve both offered higher capital returns than Uniswap. The birth of V3 marked a qualitative leap for Uniswap.

    • Upgrades

      • Concentrated Liquidity (Virtual Reserves): Individuals could earn higher returns within their defined range but would face higher risks. The same trading pairs would be aggregated into a single pool to form a trading curve.

      • Multi-Tier Fees: LPs are appropriately compensated for bearing different levels of risk, allowing for the creation of liquidity pools with varying fee rates.

      • ERC-721 for Market Making: ERC-721 tokens were also allowed for market making.

    • Mathematical Basis for Concentrated LiquidityThe relationship between a single Uniswap V3 position within its liquidity range and the reserves is as follows:

    • L=ΔPPcurrentL = \frac{\Delta \sqrt{P}}{\sqrt{P_{current}}}L=Pcurrent​​ΔP​​Where L represents liquidity, which can be defined as:
    • Figure 8: Uniswap V3 LP Position in a Single Range
  1. Source: Uniswap V3 Whitepaper

    Figure 9: Uniswap V3 Simulating Other Curves Through Active Market Making (Enhancing Capital Efficiency)

  1. Source: Paradigm

    For a detailed mathematical explanation, refer to Paradigm's article, "Uniswap v3: The Universal AMM."

    • SummaryThe improved V3 paved the way for low-slippage trade execution, potentially surpassing centralized exchanges and AMMs focused on stablecoins. LPs can significantly increase their investments in preferred assets while reducing downside risks.
  2. Conclusion

    • **Specialization:**The growth of Uniswap is a process of DeFi specialization. The introduction of flash loans in V2 allowed professional arbitrageurs to regain control of their tools. After the launch of V3, professional market makers regained dominance over LPs due to the introduction of concentrated liquidity.

    • **De-Retailization:**Maintaining an orderly market requires a certain cost and sufficient liquidity. The long-term motivation for providing liquidity must be a mathematically positive return expectation. Over time, the phenomenon of retail investors flooding into the market due to high liquidity incentives is unsustainable.

      Retail LPs, due to their inherent disadvantages such as limited professional knowledge and insufficient participation (the law of large numbers may not apply), are inevitably phased out.

    • Dimensional Observation

      1. **Risk:**Essentially, the V3 model, like other DeFi models, transforms credit risk into liquidity risk due to decentralization and full collateralization.

      2. **Evolution Logic—Enhancing Capital Efficiency and Reducing Market Friction:**Similar to the DeFi 2.0 narrative, the emergence of V3 is also moving towards greater capital efficiency. Concentrated liquidity and support for ERC-721 tokens are steps in this direction.

        Analyzing the new V3 model, we can see that slippage is continuously decreasing, making V3's position more difficult to challenge.

      3. **Looking Ahead—The Strong Get Stronger:**We can observe that Uniswap's market share on Ethereum has been steadily increasing. Since the release of V3 in May, its market share has risen from 60% to 80%.

        In the long run, the market may ultimately develop a 7:2:1 competitive pattern, where Uniswap is likely to occupy 70% of the DEX market share on Ethereum.

Subscribe to ZZ_Blockchain
Receive the latest updates directly to your inbox.
Verification
This entry has been permanently stored onchain and signed by its creator.
More from ZZ_Blockchain

Skeleton

Skeleton

Skeleton