This article discusses the current status of perpetual contracts, analyzes the differences between CEX and DEX, reviews the evolution of existing DEX perpetual contract protocols, and discusses the potential development in this field.
Author: DWF Labs Research
Translation: Kaori, BlockBeats
In the early articles of the "Hindsight" series, we introduced the DWF Ventures 2023 investment thesis, detailing the three main areas of interest:
- Derivative contracts
- Consumer Dapps
- Data and privacy layers in infrastructure
For the first area, derivative contracts cover a wide range of products. This includes various financial instruments such as futures, options, structured notes, and bonds. However, in this article, we will focus on one of the most prominent derivatives in the crypto space - perpetual contracts. Here, we will explore the current status of perpetual contracts, analyze the differences between centralized exchanges (CEX) and decentralized exchanges (DEX), review the evolution of existing DEX perpetual contract protocols, and discuss the potential development in this field.
Perpetual Contracts: A Product Suited for the Crypto World
For beginners, perpetual contracts, or perps, are currently the most popular derivative contracts in the crypto market. Since their introduction by Bitmex in 2016, perpetual contracts have steadily taken market share from traditional futures contracts.
Today, perpetual contracts account for an astonishing 97% of total trading volume.
The popularity of perpetual contracts can be attributed to two main factors:
Flexible contract terms: Perpetual contracts provide flexibility, allowing positions to remain open indefinitely or be closed at the trader's discretion. The fixed expiration date in traditional futures contracts serves practical purposes in hedging risks and pricing future production and delivery costs for physical commodities. However, in the digital asset space like Bitcoin, these costs are minimal, making term-based or delivery-based hedging unnecessary.
Better alignment with spot prices through funding rates: In the absence of an expiration date, perpetual contracts use funding rates to ensure their prices closely align with the spot market. This approach leads to less price volatility compared to futures contracts during the expiration period.
Ultimately, these factors simplify the trading experience, making it easier for users to manage leveraged positions intuitively, making it one of the most widely adopted derivatives.
Mismatch Between CEX Perpetual Contracts and DEX Perpetual Contracts
Given the success of perpetual contracts, one might expect this success to extend to both centralized and decentralized cryptocurrency exchanges. However, the trading volume ratio between DEX and CEX is severely imbalanced, with DEX accounting for only about 1% of the total trading volume.
This significant contrast highlights that centralized exchanges still have a significant advantage in central limit order book (CLOB) and trading processes compared to most decentralized venues.
Creating a Decentralized "CEX Experience": Limit Order Book Model
CEX uses the CLOB model for trading, as it is one of the most efficient ways to match buyers (takers) and sellers (makers). These limit order books can process up to 100,000 orders per second on CEXs like Binance, with an average latency of only 5 milliseconds. This model allows savvy participants such as market makers to interact with the system and facilitate fair price discovery, helping users obtain the best prices with minimal slippage.
However, due to blockchain limitations such as block finality, speed, and gas fees, replicating the limit order book (LOB) model in DeFi has proven challenging. This challenge has led to the emergence of automated market makers (AMMs) as an alternative solution. AMMs allow tokens to be traded permissionlessly without the need for centralized exchanges or market makers, as liquidity providers (LPs) take on the role of facilitating trades.
However, inherent flaws exist in the AMM algorithm. It often leads to higher slippage, especially for larger trade sizes and during market volatility. This fundamental limitation underscores why market makers are inherently more incentivized to participate in the LOB model. The LOB model allows market makers to enter positions at favorable buy and sell prices, significantly reducing the risk of finding themselves in losing positions. In contrast, liquidity providers (LPs) in AMMs primarily rely on user trading fees as their source of income. However, these fee earnings may be temporarily offset when traders are profitable. This makes AMMs less attractive to LPs compared to the potential profit potential demonstrated by the LOB model.
DYDX: Leading the Decentralized Perpetual Contract Market
Recognizing this market gap, dYdX was the first to introduce the order book model in the decentralized perpetual contract space. As a market pioneer, dYdX gained the necessary market share and established itself as a top decentralized exchange (DEX) for perpetual contracts in terms of trading volume. Through the order book (LOB) model, it offers the lowest maker and taker fees among all DEX perpetual contract protocols, which is a key factor in its dominance. Currently, dYdX operates based on layer 2 (L2) infrastructure provided by StarkEx, achieving higher transaction throughput.
However, due to inherent limitations of the underlying blockchain, dYdX has not yet achieved full decentralization. It employs an off-chain matching engine because the on-chain model is too slow and inefficient for users. StarkEX extends dYdX by processing and verifying transactions off-chain, only submitting STARK proofs on-chain. Processing transactions on-chain means it operates on Ethereum, which is not efficient as each block update can support only about 12 seconds.
To achieve full decentralization, attempts have been made to introduce a fully on-chain order book, but at the cost of running on other chains such as Solana. Protocols like Zeta and Mango Markets utilize Solana's fast block time (approximately 0.5 seconds) to provide the best on-chain experience. However, compared to centralized exchanges (CEX), on-chain order books on Solana still lag behind - Zeta can only accommodate a maximum of 910 buy and sell orders at a time, and the speed is still significantly slower than CEX. The limited growth of these protocols suggests that decentralization may not be a key advantage for users.
Therefore, increasing trading volume and liquidity remains crucial in competing with CEX. dYdX is moving towards building its own L1 on Cosmos, utilizing the Tendermint Byzantine Fault Tolerance (BFT) consensus mechanism. In addition to high performance with 1-second block time and a maximum of 1000 transactions per second (TPS), Tendermint BFT allows for customization of the validator set and their responsibilities. Each validator will ensure that orders and cancellations are always propagated in the network. However, this is not an on-chain operation as it is not committed to consensus. Orders are still matched off-chain, and subsequently, each block submits transactions on-chain.
This has sparked debates about the high centralization risk dYdX faces, as validators have an incentive to collude with market makers to gain MEV profit from transaction front-running or reordering. In this regard, dYdX is collaborating with Skip Protocol and Chorus One to mitigate malicious behavior by validators. The penalties will be set at a level that discourages validators from taking on additional income risk.
Pushing the Boundaries of Decentralization for LOB Perpetual DEX: Hyperliquid
Other protocols are also following suit, creating their own L1 - such as the still in testing phase Hyperliquid. The application chain is manually built by the team, using only Tendermint for consensus. It is reported to be able to process up to 20,000 operations per second (including orders, cancellations, settlements), which is about 20 times the current capacity of dYdX v3. It utilizes a hybrid of external and internal market makers (HLP LPs), promoting a greater degree of decentralization as anyone can provide liquidity. Through optimization of infrastructure and application code, it is able to fully put the order book on-chain. This ensures transparency of orders, unlike in off-chain order books where validators can capture MEV for themselves. Additionally, a DAO will be responsible for the utilization of the insurance fund, unlike the insurance fund controlled by the dYdX team. Overall, Hyperliquid is more decentralized compared to dYdX.
Since starting its alpha mainnet phase on June 14th, the protocol has completed over $5.6 billion in trading volume, averaging $47.8 million per day. While this only represents a small portion of dYdX's trading volume, it is comparable to GMX and exceeds the daily trading volume of Perpetual Protocol.
However, the current trading volume and liquidity may be driven by rumors of airdrops, and it remains unclear whether this level can be sustained without incentives. From the start, the protocol may be quite centralized, with most validators being the team, to ensure smooth operation and uptime of the protocol. Gradual decentralization may bring about consensus issues, which dYdX may also face. Overall, the application chain model is still relatively new, and it will be very interesting to see if the protocol can withstand stress testing during volatile periods.
Nevertheless, dYdX remains the clear market leader in the decentralized perpetual contract space, with its low fees, deep liquidity, and battle-tested model in different volatile periods. As a direct consequence of the November 2022 FTX crash, dYdX saw a 39% increase in user numbers. Since then, dYdX's average monthly trading volume has also been increasing, indicating that they provide a good alternative for CEX traders.
Adapting the AMM Model for DeFi: Introducing vAMM for Perpetual Contracts
In the DeFi space, AMMs (Automated Market Makers) have helped address the high gas fees associated with numerous trading orders. Perpetual Protocol further advances this field by introducing the concept of virtual Automated Market Makers (vAMMs) specifically designed for perpetual contracts.
How Virtual Automated Market Makers Operate: Insights from Perpetual Protocol
In the vAMM model, liquidity providers (LPs) play a unique role. Unlike in traditional setups where LPs directly hedge with traders, here, traders provide liquidity to each other through collateral vaults located outside the vAMM ecosystem. These vaults play a crucial role in generating virtual tokens, facilitating the trading of perpetual contracts.
The vAMM mechanism relies on the constant product formula x*y=k, a well-tested concept in decentralized finance (DeFi). However, there is a key difference here. In this case, the "k" value is not determined by the real assets in the pool; instead, it is manually set by the platform team. This manual control ensures that the "k" value remains balanced to prevent users from experiencing slippage (if "k" is too low) or significant price deviation relative to the underlying index price (if "k" is too high).
Unlike in the order book system where the unrealized PnL levels for long and short positions remain equal, the vAMM model allows for freely floating net unrealized PnL. To maintain price stability and align with the index price, funding rates come into play. These rates serve as incentives for arbitrageurs, encouraging them to participate and drive the perpetual price closer to the spot price.
Challenges Faced by Perp v1
However, Perp v1 faced significant risk due to its ongoing imbalance between long and short positions. The protocol had to intervene, paying funds to traders from the insurance pool. In theory, trading fees should always exceed the total funds paid to traders to make the protocol model sustainable. Unfortunately, during periods of high volatility, the model proved to be unsustainable due to significant deviations between the mark price and the index price. As the market declined, overestimation of the "k" value led to increased funding rate payments, ultimately depleting the insurance fund. As a result, Perp v1 was gradually phased out.
Evolution of Perp v2
Perp v2 attempts to mitigate the risks that plagued v1 by using Uni v3 pools as the execution layer for liquidity. While LPs still provide "single-sided liquidity," collateral is converted into two virtual tokens (e.g., USDC collateral generates equivalent vUSDC and vETH, which are then deposited into the Uniswap vUSDC-vETH pool) for range orders. This approach ensures that each long order corresponds to a short order taken on by market makers, and vice versa. Therefore, funding payments are limited to the counterparties, not involving the protocol and traders as seen in v1. By concentrating liquidity, LPs can achieve higher capital efficiency, while traders can obtain better prices and smaller slippage. However, if LP positions are not hedged accordingly, they will also experience temporary losses in this model.
V2 utilizes Uniswap v3 TWAP and Chainlink oracles to determine the index price. In theory, as long as assets have price data sources on any oracle platform, it allows assets to be listed permissionlessly. However, there are still risks involved in listing other assets, a process managed by the DAO, adding a layer of complexity to the creation of new markets. Due to the protocol defaulting to cross-margining, users' collateral is automatically shared across different positions in their accounts. Long-tail assets, due to their inherent volatility and lack of liquidity, pose significant risks to these portfolios, presenting a major challenge for the protocol in listing these assets.
Overall, vAMM provides a good option for traders seeking decentralization and instant liquidity. However, in the Perp v2 model, liquidity providers (LPs) bear the risk of impermanent loss. They are compensated through higher fees earned from trading, passing the cost on to traders. Additionally, vAMM is limited by the amount of liquidity in the pool, leading to price slippage for larger trades. The model still heavily relies on arbitrageurs to reduce the gap between the mark price and the index price, with arbitrageurs incentivized by funding rates. As a result, the top 10 traders on Perp v2 average about 88% of the daily trading volume across all currency pairs. Therefore, the protocol is more suitable for LPs and arbitrageurs skilled in market operations, as traders can enjoy lower fees and deeper liquidity on other protocols.
Merging Two Major Advantages: Connecting Order Book with AMM for Optimal Trading
The experiences of Perp v1 and Drift v1 have shown that a pure vAMM model is unsustainable in the long run. A similar situation also occurred in Drift v1, which adopted a dynamic vAMM model based on adjusting virtual reserves (k) according to trading demand. However, during a sharp decline in LUNA price, the long-short imbalance escalated rapidly. Meanwhile, issues in the smart contract regarding settlement allowed traders to withdraw large positive PnL without corresponding negative PnL, leading to insolvency exceeding the insurance fund. This triggered a scenario of bank run, forcing trading and withdrawals to be suspended.
Drift v2: A Hybrid Solution
Drift v2 Aims to Address the Issues of the dAMM Model in v1 by Introducing a Hybrid Approach that Utilizes both Order Book and dAMM as Sources of Liquidity. Drift v2 Allows Trades to be Routed through 3 Liquidity Sources, Ensuring Efficient Matching of Large Orders on-chain.
Just-In-Time (JIT) Liquidity: Market makers compete to fill market orders through a Dutch auction. The auction starts from the market order price and gradually changes. The auction lasts for 5 seconds.
Decentralized Limit Order Book: Orders are routed through a limit order book (LOB) managed by keepers, matched with market makers, and earn a certain percentage of fees from trades.
AMM: This component ensures that users' orders are always filled even without market makers. Funding rates are used to achieve the goal of maintaining neutrality (i.e., premium on short positions if net long).
Advantages of the Hybrid Model
With the hybrid order book AMM model, Drift is able to bridge the gap in reducing slippage for large trades, which is a barrier for users to fully transition to on-chain trading. Another advantage of this model is that trading pairs on Drift's Decentralized Limit Order Book (DLOB) can achieve tighter bid-ask spreads compared to other Solana perpetual contract DEXs. This is due to market makers being able to input limit orders based on real-time oracle prices and price offsets, i.e., oracle-offset orders.
By reversing the traditional order book market maker-taker sequence (i.e., market makers are "passive" as takers specify their orders before market makers compete for execution), this enhances competition and incentivizes market makers to execute orders quickly. This approach is also more efficient compared to traditional LOBs, as market makers do not have to actively manage positions (i.e., re-quoting with price changes). Therefore, the incentives align with both counterparties—encouraging market makers to continue providing liquidity as the protocol is able to reduce toxic liquidity for takers, while ensuring takers get the best execution price through market maker competition.
The hybrid model significantly enhances liquidity, improving traders' experience with better prices and faster execution. On Drift, over half of the trading volume is now completed by market makers rather than dAMM, indicating the added effectiveness of an additional layer of liquidity. Having external liquidity sources also helps balance inventory skew in AMMs, reducing the likelihood of impermanent losses for LPs and reducing the need for arbitrageur intervention. In the near future, there may be more iterative improvements to this model, with protocols like Vertex and Syndr also building towards a hybrid order book AMM model.
Rise of Liquidity Pool Models in Perpetual Contract DEX
Driven by the growth of protocols like Synthetix and GMX, the liquidity pool model is becoming increasingly popular in the perpetual contract trading space. Over the past year, we have observed more and more new decentralized trading platforms adopting this model.
Unique Approach of GMX
A notable example is GMX. GMX is a decentralized spot and perpetual trading platform built on Arbitrum and Avalanche. Unlike typical AMM models, GMX adopts a spot pool model.
GMX v1 features a multi-asset pool and a dynamic aggregated oracle provided by Chainlink to determine the real prices of assets. GLP consists of a basket of assets used for trading and leveraged trading, such as BTC, ETH, AVAX, UNI, LINK, and stablecoins. GLP tokens can be minted by depositing any of the index assets. GMX v2 also introduces a separate GM pool (GMX Market Pool), allowing liquidity providers to customize their exposure by choosing specific tokens they prefer to support.
GLP essentially acts as the "house" in a casino. When a trader goes long on ETH, the trader is gaining exposure to the upside of ETH from the GLP pool. When a trader goes short on ETH, the trader is gaining exposure to the upside of other assets relative to ETH from the GLP pool.
If the trader wins, profits are paid out from the GLP pool in the form of the token the trader went long or short on. If the trader loses, the loss is deducted from the collateral and paid to the GLP pool.
While there is a risk for liquidity providers to lose their principal when traders are profitable, historical data shows that the majority of liquidity providers actually profit from hedging with traders. For example, in the illustration below, it is noteworthy that the majority of traders on GMX v1 are at a loss against LPs (liquidity providers).
Revolutionary Role of Synthetix
Synthetix, as a decentralized liquidity layer based on Ethereum and Optimism, has been at the forefront of this revolution. Synthetix derivatives, facilitated through platforms like Kwenta on Optimism, rely on the liquidity provided by the Synthetix debt pool. The Synthetix debt pool plays a crucial role in facilitating synthetic asset and perpetual futures trading. With the Synthetix liquidity pool and Chainlink and Pyth oracles, traditional order books and counterparty demand are eliminated. This approach allows Synthetix liquidity to be pooled and transmitted across various markets, effectively addressing the issue of slippage.
Additionally, the native token $SNX plays a crucial role in the collateral of the Synthetix debt pool. Currently, about 93% of $SNX is collateralized, with a total collateral value of approximately $573 million and a fully diluted valuation of $617 million (as of October 10, 2023).
Distinguishing Liquidity Pool from vAMM
In this context, understanding the core differences between the liquidity pool model and vAMM is crucial. While both approaches eliminate traditional intermediaries such as market makers and centralized trading platforms, their mechanisms are significantly different.
In vAMM, the pool merely replicates the liquidity depth of an AMM. Perp v2 is built on Uni v3, and the perp pool essentially consists of virtual tokens minted by the clearinghouse in a Uni v3 pool. On the other hand, the liquidity pool model does not replicate liquidity like Perp v2 and GMX, with traders directly trading with the pool's liquidity.
Additionally, in vAMM, funding rates play a crucial role. They incentivize arbitrageurs to intervene and minimize deviations between market prices and index prices. In contrast, for the liquidity pool model, oracle prices play a more crucial role compared to funding rates. It is noteworthy that GMX v1 did not rely on funding rates to maintain consistency with spot market prices. This continued until the launch of GMX v2.
Finally, in terms of risk management, vAMMs typically use an insurance fund as a safety net. This fund is used to absorb traders' profits and losses (PnL). In contrast, in the liquidity pool model, liquidity providers (LPs) need to fully bear traders' PnL. ```
The rise of the liquidity pool model in perpetual contract trading reflects a transformative shift in the DeFi space. This innovative approach facilitates direct and decentralized interaction between traders and liquidity providers, while also bringing profit opportunities for the latter. Pioneering protocols like Synthetix and GMX are paving the way for a more efficient and inclusive trading ecosystem. As DeFi continues to evolve, ongoing exploration of innovative trading models is expected to bring more diversity and efficiency to the entire space, meeting the needs of a broader range of users and investors.
Beyond Decentralization: Insights into the Future of Perpetual DEX
In the evolving field of perpetual DEX, this article delves into their evolution and discusses case studies of some prominent models. Ideally, choosing between perpetual CEX or DEX should be a simple binary decision between centralization and decentralization. However, reality is far more complex.
While perpetual trading is undoubtedly well-suited for the crypto trading space, the challenges faced by perpetual DEX go beyond improvements in speed, trading volume, and transaction fees. Transitioning from CEX to DEX is multifaceted and must address many complex factors for users to confidently shift to perpetual DEX.
Key Components of Building a Perpetual Contract Trading Platform
Developing a perpetual contract trading platform involves many key components that are crucial for its successful operation. These components are important for both CEX (centralized exchange) and DEX (decentralized exchange) platforms, but the methods of implementing them differ significantly, driven by the core differences between centralization and decentralization. The following is a breakdown of these essential components and their importance:
Note: UI/UX is not included in the components as we consider it a fundamental aspect of evaluating any perpetual DEX aiming for mass adoption.
Decentralized Creativity: Inspiring Progress in Perpetual DEX
While both CEX and DEX platforms aim to provide perpetual contracts, the fundamental differences in backend technology and the concept of decentralization make achieving the same goal significantly different. The three key differences of blockchain technology, decentralization, and protocol token utility have important implications for the operation of DEXs relative to CEXs:
· Blockchain Technology: Decentralized exchanges (DEXs) leverage blockchain technology to provide a transparent and tamper-resistant trading environment. All transactions are recorded on the blockchain, ensuring trust and verifiability.
· Decentralization: DEXs distribute power and control among network participants, reducing the risk of centralized manipulation or shutdown. This enhances security and censorship resistance.
· Protocol Token Utility: The presence of protocol tokens encourages active governance and community participation. Token holders can voice opinions on platform decisions, fostering ownership and decentralization.
These fundamental differences in perpetual decentralized trading platforms have given rise to multiple DeFi innovations, such as unique trading models through vAMMs and liquidity pools, different from traditional LOB models. Therefore, we are focusing on the innovation potential in these three areas:
Looking ahead, we expect ongoing innovation in the perpetual DEX environment. We are eager to see how each protocol addresses these three pillars, further shaping the future of perpetual DEX.
免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。