In one of the earliest post on our Hindsight series, we covered DWF Ventures Investment Thesis 2023 where we elaborated on the three main verticals we are looking at –

  1. Derivatives Protocols
  2. Consumer Dapps
  3. Data and Privacy Layer in Infrastructure

For the first vertical, derivatives protocols cover a broad range of products. This encompasses a wide range of financial instruments, including futures, options, structured notes, and bonds. However, in this article, we will concentrate on one of the most prominent derivatives in the crypto space — perpetual contracts. Here, we will explore the current state of perpetuals, analyse the differences between centralised exchanges (CEX) and decentralised exchanges (DEX), examining existing DEX perpetual protocols evolution and discuss the potential developments of this space.

Perpetuals: A Product Fit for the Crypto World

For the uninitiated, perpetuals or perps, is currently the most popular derivative contract traded in the crypto market. Ever since the introduction by Bitmex in 2016, perpetuals have steadily claimed market share from traditional futures contracts.

Today, perpetuals constitute a staggering 97% of the total trading volume.

Source: Laevitas

The popularity of perpetuals can be attributed to two main factors:

  1. Flexible Contract Duration: Perpetuals provide flexibility, allowing positions to remain open indefinitely or be closed at the trader’s discretion. Fixed expiry in traditional futures serve useful purposes in hedging risk and pricing future production and delivery costs for physical commodities. However, in the digital asset realm, such as with Bitcoin, these costs are minimal, rendering the need for duration or delivery based hedges unnecessary.
  2. Better alignment with Spot Price through funding rates: Without expiry, perpetuals employ funding rates to ensure that their prices closely mirror the spot market. This approach results in fewer pricing fluctuations compared to futures contracts during their expiry period.

Ultimately, these factors simplify the trading experience, making it more user-friendly and intuitive for users to manage leverage positions. Hence, making it one of the most widely adopted derivatives.

Mismatch Between CEX Perpetuals and DEX Perpetuals

Given the success of perpetuals, one would expect to see this success extend to both centralised and decentralised crypto trading platforms. However, the current trade volume ratio between DEX and CEX is heavily skewed, with DEX accounting for only about 1% of the total trading volume.

Source: The Block — Derivatives

This significant contrast highlights that centralised exchanges still hold a clear advantage in terms of central limit order books (CLOB) and trading processes compared to most decentralised venues.

Creating a Decentralised “CEX experience”: The Limit Order Book Model

CEXs utilise a CLOB model for trading, as it is one of the most efficient ways to match buyers (taker) and sellers (maker). These limit order books can process up to 100,000 orders per second, with an average latency of just 5 milliseconds on CEXs like Binance. The model allows sophisticated players such as market makers to engage with the system and facilitate fair price discovery. This helps users to secure optimal prices with minimal slippage.

However, replicating the Limit Order Book (LOB) model in the DeFi has proven challenging due to blockchain limitations, such as block finality, speed, and gas costs. This challenge led to the emergence of Automated Market Makers (AMMs), an alternative solution. AMMs allowed tokens to be traded permissionless, eliminating the need for centralised exchanges or market makers, as liquidity providers (LPs) took on the role of facilitating trades.

Nonetheless, the inherent AMM algorithm has a downside. It tends to lead to higher slippages, especially for larger trade sizes and during periods of market volatility. This fundamental limitation underscores why market makers are inherently more motivated to engage in LOB models. LOB models allow market makers the capability to enter positions at advantageous bid and ask prices, significantly reducing the risk of finding themselves in unprofitable 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 offset by impermanent losses incurred when traders profit. This makes it less attractive for LPs in comparison to the potential profitability presented by LOB models.

DYDX: Leading the Way in the LOB Perpetuals Market

Recognising this market gap, dYdX pioneered the order book model in the decentralised perpetuals space. Being the first mover allowed dYdX to gain the necessary traction and secure its position as the top perpetuals DEX in terms of trading volume. Through the LOB model, it offers some of the lowest maker and taker rates among all DEX perpetual protocols, a factor contributing significantly to its dominance. It currently operates on an L2 infrastructure powered by StarkEx, enabling higher transaction throughput.

Source: The Block — Derivatives

However, dYdX is still not fully decentralised due to inherent limitations of the underlying blockchain. It utilises an off-chain matching engine as an on-chain model will be too slow and inefficient for users. StarkEX is able to scale dYdX through processing and validating transactions off-chain, with only the STARK proof being verified on-chain. Processing transactions on-chain would mean that it is processed on Ethereum, which is not efficient as an update can only be supported on every block which takes around ~12s.

In a bid for full decentralisation, there have been attempts to introduce fully on-chain order books with the trade-off being to run on alternative chains such as Solana. Zeta and Mango Markets are examples of such protocols, leveraging on the quick block time of Solana (~0.5s) to provide an optimal on-chain experience. However, an on-chain order book on Solana still lags behind CEXs by a far bit — with Zeta only being able to hold a maximum of 910 bids and asks at a time and speeds that are still significantly slower than CEXs. The limited growth of these protocols signals that decentralisation will not be a key advantage for users to hop over.

Hence, improving trade volumes and liquidity is still key to competing with CEXs. dYdX is moving towards its own L1 built on Cosmos, utilising the Tendermint Byzantine Fault Tolerance (BFT) consensus mechanism. Besides high performance of 1s block time and up to 1000 transactions per second (TPS), the Tendermint BFT also allows for customisation on the validator set and their responsibilities. Each validator will ensure that orders placed and cancellations will always propagate through the network. However, this is not on-chain as it is not committed to consensus. Orders are still matched off-chain, which subsequently committed on-chain with each block as trades.

Thus, this brings up arguments that dYdX is at a high risk of centralisation given the incentives for validators to partner with market makers to front run or reorder transactions to capture MEV profits. On this front, dYdX is working with Skip Protocol and Chorus One on mitigating undesirable actions from validators. Slashing would most likely be used to deter possible collusions between market makers and validators, with penalties being set at levels that are not worth the risk of extra revenue for validators.

Pushing the Boundaries of LOB Perpetual DEX Decentralisation with Hyperliquid

Other protocols are following suit in creating their own L1 — such as Hyperliquid which is still in its beta stage. The app-chain is manually built by the team, utilising Tendermint only for consensus. It is reportedly able to handle up to 20000 operations per second (includes orders, cancels, liquidations) which is about 20x the current capabilities of dYdX v3. It utilises a mix of external and internal market makers (HLP LPs), fostering greater decentralisation since anyone can provide liquidity. It is able to bring the order book fully on-chain through optimisations on the infrastructure and application code. This ensures that ordering is transparent unlike in off-chain order books whereby validators can capture the MEV for themselves. Furthermore, a DAO will be responsible for utilisation of the insurance fund, as compared to the team-controlled insurance fund for dYdX. Overall, Hyperliquid decentralises more aspects of the protocol as compared to dYdX.

The protocol has done over $5.6b in trading volume since the start of its alpha mainnet phase from June 14, averaging out to be $47.8m a day. While this is only a small percentage of dYdX volumes, it is comparable to GMX and exceeds Perpetual Protocol’s daily trading volume.

Source: Hyperliquid

However, current volumes and liquidity are likely driven by rumours of an airdrop and it remains to be seen whether such levels can be maintained without rewards. The protocol will also likely be rather centralised from the start, with the majority of validators being the team to ensure smooth performance and uptime. Gradual decentralisation could bring consensus issues to the table, which would be a problem that dYdX may face as well. Overall, the app-chain model is still relatively new and it would be interesting to see if the protocols can handle stress tests in periods of volatility.

Nonetheless, dYdX remains the clear market leader in the decentralised perpetuals space for now with its low fees, deep liquidity and model that has been battle tested across different volatile periods. In the immediate aftermath of FTX’s collapse in November 2022, dYdX saw a 39% increase in the number of users. The average monthly trading volume on dYdX has been increasing since then as well, signalling that they provide a good alternative for CEX traders.

Adapting DeFi’s AMM Model: Introducing vAMM for Perpetuals

In the world of DeFi, AMMs have helped to address the challenge of high gas fees associated with numerous trade orders. Perpetual Protocol has taken a step further by introducing the concept of Virtual Automated Market Makers (vAMMs) specifically designed for perpetual contracts.

How vAMMs Work: Insights from Perpetual Protocol

In the vAMMs model, Liquidity Providers (LPs) assume a unique role. Unlike traditional setups where LPs directly counter traders, here, traders effectively provide liquidity for each other through a collateral vault located outside of the vAMM ecosystem. This vault plays a vital role in generating virtual tokens that facilitate the trading of perpetual contracts.

The vAMM mechanism relies on the x*y=k constant product formula, a well-established concept in DeFi. However, there’s a key difference. In this context, the “k” value isn’t determined by real assets in the pool; instead, it’s manually set by the platform’s team. This manual control ensures that the value of “k” is balanced to prevent users from experiencing slippage (if “k” is too low) or encountering significant price deviations relative to the underlying index price (if “k” is too high).

In contrast to order book systems, where short and long open interest levels remain equal, the vAMM model allows for a free-floating net open interest. To maintain price stability and alignment with the index price, funding rates come into play. These rates serve as incentives for arbitrageurs, encouraging them to participate and push the perpetual price closer to the spot price.

Challenges from Perp v1

However, Perp v1 carried a huge risk for the protocol with its constant long short imbalance. The protocol had to step in to pay funding to traders, which comes from the insurance pool. Theoretically, transaction fees should always outweigh the amount of funding paid to traders for the protocol model to be sustainable. Unfortunately, this model proved unsustainable during periods of volatility when there was a significant deviation between the marked price and the index price. Overestimating “k” values as the market declined resulted in increased funding rate payments, ultimately depleting the insurance fund. Consequently, Perp v1 was sunsetted.

The Evolution with Perp v2

Perp v2 seeks to mitigate the risks that plagued v1 by leveraging Uni v3 pools as an execution layer for liquidity. While LPs still provide “single-sided liquidity,” the collateral is converted into two virtual tokens (e.g., USDC collateral generates an equal amount of vUSDC and vETH, which is then deposited into the Uniswap vUSDC-vETH pool) for use as range orders. This approach ensures that each long order corresponds to a short order taken by a maker, and vice versa. As a result, funding payments are limited between counterparties rather than involving the protocol and traders, as seen in v1. With concentrated liquidity, LPs are also able to achieve higher capital efficiency while traders receive better prices and lesser slippage. However, LPs will also experience impermanent loss through this model if their positions are not hedged accordingly.

V2 utilises Uniswap v3 TWAP and Chainlink oracles to determine index price. In theory, this would allow for permissionless listing of assets as long as they have a price feed on either oracle platform. However, there are still risks associated with listing alternative assets and the process is governed by a DAO, which adds a layer of complexity to the creation of new markets. Since the protocol utilises cross-margin by default, user’s collateral are automatically shared across different positions in an account. Long tail assets will pose a huge risk for these portfolios given the inherent volatility of these assets, combined with lack of liquidity which presents a significant challenge to the protocol for listing these assets.

Overall, vAMMs provide a good option for traders who are looking for decentralisation and instant liquidity. However, in the Perp v2 model — LPs have to take on impermanent loss risk. They are compensated through higher fees earned on trades, whereby the costs are passed onto traders. Furthermore, the vAMM is constrained by the amount of liquidity in the pool, which would cause price slippage on larger trades. The model still relies heavily on arbitrageurs to come in and reduce the divergence between mark and index price, incentivised by funding rates. As a result, the Top 10 traders on Perp v2 encompass ~88% of daily volume for all pairs on average. Thus, the protocol is better suited for sophisticated LPs and arbitrageurs, as traders are able to enjoy lower fees and deeper liquidity with other protocols.

Best of Both Worlds: Bridging Order Books and AMM for Optimal Trading

The experiences of Perp v1 and Drift v1 revealed that a pure vAMM model wasn’t sustainable in the long run. A similar situation occurred with Drift v1, which utilised a dynamic vAMM model (dAMM) that adjusted virtual reserves (k) based on trading demand. However, when the price of LUNA crashed, the long-short imbalance escalated quickly. At the same time, an issue in the smart contract regarding settlement allowed traders to withdraw substantial positive PnL without corresponding negative PnL, leading to bad debt that exceeded the insurance fund. This triggered a bank run scenario, forcing a pause on trading and withdrawals.

Drift v2: A Hybrid Solution

Drift v2 aims to address the issues from the dAMM model in v1 by introducing a hybrid approach of utilising both an orderbook and dAMM as part of the liquidity source. Drift v2 allows trades to route through 3 sources of liquidity, ensuring that orders of size can be matched effectively on-chain.

1. Just-In-Time (JIT) Liquidity: Market makers compete to fill market orders through a Dutch Auction. The auction begins at the market order price and changes incrementally. The auction is set to last for 5s.

2. Decentralised Limit Order Book: Orders then route through the LOB, managed by keepers who match these orders with makers, earning a percentage of fees from trades.

3. AMM: This component ensures that user’s orders are always filled even without makers. Uses funding rates to reach the goal of remaining neutral (i.e. if net long, premium on short positions)

Source: Drift Protocol

Benefits of the Hybrid Model

With a hybrid orderbook AMM model, Drift is able to bridge the gap of lowering slippage for larger size trades — which is one barrier for users to fully move towards on-chain trading. Another advantage through this model is enabling tighter bid-ask spreads for pairs on the Drift Decentralised Limit Orderbook (DLOB) vs. other Solana perpetual DEXs. This is possible due to the ability for makers to input oracle offset orders, which is a limit order as a function of real-time oracle price and price offset.

Coupled with the inversion of the maker-taker sequence from traditional order books (i.e. makers are ‘passive’ as takers specify their orders first before makers compete to fill), it enhances competition and incentivises makers to fill orders fast. This approach is also more efficient as compared to traditional LOB as makers do not have to be actively managing positions (i.e. re-quoting as price changes). Thus, incentives are aligned with both counterparties — encouraging makers to continue providing liquidity since the protocol is able to reduce toxic flow from takers while ensuring that takers get the best prices filled through competition between makers.

Source: Twitter

The hybrid model significantly enhances liquidity, improving the trader’s experience through better prices and faster execution. More than half of the volume on Drift are now being filled by makers instead of the dAMM, signalling the effectiveness of having an additional layer of liquidity. Having a source of external liquidity also helps to balance the inventory skew of the AMM, reducing the potential of impermanent loss faced by LPs and the need for arbitrageurs to step in. There will probably be more iterations improving on this model in the near future, with protocols such as Vertex and Syndr are also building towards a hybrid orderbook AMM model.

The Rise of Liquidity Pool Models in Perpetuals DEX

Contributed by the growth of protocols like Synthetix and GMX, the liquidity pool model has gained popularity in the perpetuals trading space. Over the past year, we have observed a growing amount of new decentralised exchanges have adopted this model.

Exploring Liquidity Pools via Industry-Leading Protocols

In the liquidity pool model, there are two types of pools — single-asset pool (e.g. Synthetix & Gains Network) and multi-asset pool (e.g. GMX). These pools serve as the source of liquidity for trading on the protocols. Liquidity providers deposit their cryptocurrencies into these pools, and in return, they earn trading fees and yields. When traders want to execute a trade, they also need to deposit collaterals into the pools.

As opposed to the LOB model, where market makers serve as direct counterparties, the liquidity pools function as the counterparties of the traders. When traders want to execute a trade, they interact directly with the liquidity pools.

The liquidity pool model is known as a zero-sum game. Although intermediaries are eliminated, liquidity providers indirectly serve as counterparties to traders. Therefore, traders’ win would actually be equivalent to liquidity providers’ loss, and vice versa. Fees are generated and paid out to liquidity providers when traders lose or get liquidated in their trades.

GMX’s Unique Approach

A notable example would be GMX. GMX is a decentralised spot and perpetual exchange built on Arbitrum and Avalanche. Unlike the typical AMM model, GMX adopts a peer-to-pool model.

GMX v1 has a multi-asset pool and dynamic aggregation oracle provided by Chainlink to determine the true price of assets. GLP consists of an index of assets used for swaps and leverage trading, such as BTC, ETH, AVAX, UNI, LINK, and stablecoins. GLP token can be minted by depositing any index asset. GMX v2 also introduced an isolated GM pool (GMX Market pool), allowing liquidity providers to customise their exposure by selecting specific tokens they prefer to support.

GLP essentially acts like “the house” in a casino. When a trader enters a long position on ETH, the trader is leveraging the upside in ETH from the GLP pool. When a trader enters a short position on ETH, the trader is leveraging the upside in other assets versus ETH from the GLP pool.

If the trader wins, profits will be paid from the GLP pool in the form of the token being longed for or shorted for. If the trader loses, losses will be deducted from the collateral and paid into the GLP pool.

Despite the risk that liquidity providers may lose capital if traders are profitable, historical data indicates that most liquidity providers actually yield profits against traders. For example below, it has been notable that most traders on GMX v1 have been losing money against LPs.

Source: GMX (Arbitrum)

Synthetix’s Revolutionary Role

Synthetix, a decentralised liquidity layer on Ethereum and Optimism, has been at the forefront of this transformation. Synthetix’s derivatives, facilitated by platforms like Kwenta on Optimism, rely on the liquidity provided by the Synthetix Debt Pool. The Synthetix Debt Pool plays the key role in facilitating the trading of synthetic assets and perpetual futures. With Synthetix liquidity pool and Chainlink & Pyth oracles, the need for conventional order books and counterparties is eliminated. This approach enables Synthetix’s liquidity to be pooled and transferred across various markets, effectively addressing the issue of slippage.

Additionally, Synthetix’s native token, $SNX, plays an essential role as collateral for the Synthetix Debt Pool. Currently, approximately ~93% of $SNX is staked, with a total value of approximately US$573 million staked and a fully diluted valuation of US$617 million (as of October 10, 2023).

Source: Dune

How Liquidity Pools Differs from vAMMs

In this context, it’s essential to understand the core differences between liquidity pool models and vAMMs. While both approaches eliminate traditional intermediaries like market makers and centralised exchanges, their mechanics diverge significantly.

In vAMMs, the pool is only replicating the liquidity depth of an AMM. Perp v2 is built on top of Uni v3 and the perp pools are essentially Uni v3 pools made up of virtual tokens minted by the clearing house. On the other hand, the liquidity pool model does not have replicated liquidity like Perp v2 and GMX traders directly trade against the pool liquidity.

Furthermore, in vAMMs, funding rates play a crucial role. They incentivise arbitrageurs to step in and minimise deviations between the market price and the index price. In contrast, for liquidity pool models, the oracle price takes on a much more significant role than funding rates. It’s important to note that GMX v1 didn’t rely on funding rates to maintain price alignment with the spot market. This was the case until the introduction of GMX v2.

Finally, when it comes to risk management, vAMMs often utilise an insurance fund as a backstop. This fund is used to absorb traders’ profit and loss (PnL). Conversely, in the liquidity pool model, liquidity providers (LPs) assume the responsibility for traders’ PnL entirely.

The rise of liquidity pool models in perpetuals trading exemplifies a transformative shift in the DeFi landscape. This innovative approach fosters a direct and decentralised interaction between traders and liquidity providers while proving to be a profitable endeavour 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, the ongoing exploration of innovative trading models promises to bring more diversity and efficiency to the space, catering to a broader range of users and investors.

Beyond Decentralisation: Insights into the Future of Perpetual DEXs

In the ever-evolving landscape of perpetual DEXs, this article has taken an in-depth look at their evolutionary journey and explored case studies of prominent models. Ideally, the choice between perpetuals CEX or DEX should be a straightforward binary decision between centralisation and decentralisation. However, the reality is far more complex.

While perpetual trading undeniably fits well within the crypto trading sphere, the challenges faced by perpetual DEXs extend beyond mere improvements in speed, volumes, and trading fees. This transition from CEX to DEX is multifaceted, and numerous intricate factors must be addressed before users can comfortably make the leap to a perpetual DEX.

Key Components for Building a Perpetual Exchange

The development of a perpetual exchange involves various key components that are essential for its successful operation. These components are important for both CEX and DEX platforms, but the approach to implementing them differs significantly, driven by the core distinctions between centralisation and decentralisation. Below is a breakdown of these essential components and their significance:

Note: UI/UX has not been included in the components as we consider it to be a fundamental aspect of assessment for any perpetual DEX aiming to achieve mass adoption.

Decentralisation’s Creative Force: Inspiring Perpetual DEX Advancements

While both CEX and DEX platforms aim to provide perpetual contracts, the fundamental differences in backend technology and the concept of decentralisation make achieving the same goals profoundly distinct. These three key differences in blockchain technology, decentralisation, and the utility of protocol tokens have significant implications for how a DEX operates compared to a CEX:

  1. Blockchain Technology: DEXs leverage blockchain technology to provide a transparent and tamper-proof trading environment. All transactions are recorded on the blockchain, ensuring trust and verifiability.
  2. Decentralisation: DEXs distribute authority and control among network participants, reducing the risk of centralised manipulation or shutdown. This enhances security and censorship resistance.
  3. Protocol’s Token Utility: The presence of a protocol token encourages active governance and community involvement. Token holders have a say in platform decisions, fostering a sense of ownership and decentralisation.

These fundamental differences for a perpetual DEX have led to multiple DeFi innovations such as unique trade models via vAMMs and liquidity pools, differing from the traditional LOB model. Hence, we are keeping a lookout in these potential areas of innovation in these three segments:

As we look to the future, we anticipate continued innovation within the perpetual DEX landscape. We are eager to see how each protocol addresses the three pillars, further shaping the future of perpetual DEXs.

For teams seeking a strategic investor, with deep understanding and value add in terms of trading capabilities, feel free to reach out to DWF Ventures. Interested parties can apply through our perpetual DEX pitch form at https://forms.gle/g8YzHxUt6hoUB7HEA.