Overview of Perpetual Contract DEX

Beginner11/7/2024, 9:47:45 AM
Perpetual contracts are an essential derivative in the DeFi sector. Due to the lack of a fixed expiration date, these contracts have become a favorite among traders. This article provides an in-depth look at how perpetual contracts work, the operational framework of decentralized perpetual contract platforms, and the role of liquidity providers.

Introduction

The DeFi boom has opened new opportunities in the derivatives market. Perpetual contracts, a widely used financial derivative within DeFi, have quickly captured traders’ interest thanks to their unlimited duration and high-leverage capabilities. With rising demand for transparency and decentralization, more decentralized exchanges create flexible and secure trading experiences through innovative contract structures and pricing mechanisms.

Current Analysis of the DEX Perpetual Contract Market

Potential of Derivatives DEX

CoinMarketCap reports show around 480 decentralized spot exchanges, double the number of centralized spot exchanges (253). By comparison, there are only 18 decentralized derivatives exchanges, far fewer than the 101 centralized derivatives exchanges. Notably, in the CEX sector, derivatives trading volumes exceed spot trading volumes by over sevenfold, whereas, in the DEX space, derivatives trading volumes are nearly equal to spot trading volumes.


Source:coinmarketcap

Demand for Derivatives DEX

Despite the large spot market in CEX, derivatives traders are not necessarily drawn to CEX platforms. One primary reason is the frequent “price pinning” issue in CEX futures trading, which often arises from operational and transparency limitations in CEX. Such rapid price swings can be highly disruptive to users with leveraged positions. Consequently, there is a growing interest in decentralized derivatives exchanges.

Fundamentals of DEX Perpetual Contracts

The concept of futures contracts, first introduced by Robert Shiller in 1992, debuted in the crypto market through BitMEX in 2016. A futures contract specifies a future date and price for purchasing or selling a specific commodity, asset, or security. Unlike options, futures contracts are binding, and both parties must fulfill their contractual obligations.

Perpetual contracts are a unique form of futures contracts without a fixed expiration date, hence the term “perpetual.” Their price closely follows the underlying asset’s price changes. Each $1 shift in the underlying asset’s price leads to a corresponding adjustment in the contract’s price. Perpetual contracts let traders speculate on asset prices without time constraints, allowing them to adjust their long or short positions based on market conditions.

The liquidation mechanism is essential in most perpetual contract systems. Funding rates are generally implemented to maintain market efficiency and balance long and short positions. These rates compensate those holding minority positions, helping to stabilize the market.

Models of DEX Perpetual Contracts

DEX perpetual contract protocols generally fall into two main categories based on how they operate: Order Book and Liquidity Pool models. The Liquidity Pool model further divides into four types: single-asset liquidity providers, composite-asset liquidity providers, synthetic assets, and virtual automated market makers (vAMM).

Order Book Model

In the Order Book model, liquidity is provided by market makers, with users trading directly against them, while the platform matches buy and sell orders based on market demand. This model, commonly used by centralized exchanges, has robust liquidity but also certain centralization drawbacks.

Key features include:

  • Pricing: Asset prices are set by the market through buy and sell orders without centralized interference.
  • Transparency: All buy and sell orders are publicly visible, giving traders insight into market supply, demand, and pricing levels.
  • Higher Transaction Costs: In low-liquidity markets, large spreads may occur, and trades may take longer to complete.
  • Enhanced User Experience: This model supports various trade types, such as market, limit, and stop-loss orders, closely resembling the experience on centralized exchanges.
  • High Gas Costs: Off-chain matching and on-chain settlement require high gas fees, especially during network congestion, making small trades costly. (DYDX V4 has addressed this issue.)

This model’s representative project is DYDX. DYDX is a decentralized, non-custodial perpetual contract trading platform supporting over 143 asset pairs. The platform was developed by a team of engineers from prominent cryptocurrency companies such as Coinbase. In October 2023, the DYDX V4 version was launched, introducing the DYDX Chain, an independent public blockchain built on Cosmos. Each part of the protocol operates in a fully decentralized manner, including the consensus mechanism, order book, matching engine, and frontend. While DYDX V3 also supported high-performance perpetual contract trading, true decentralization was achieved only in V4.


Source: dydx exchange

Liquidity Pool Model

The Liquidity Pool model, or pool-to-peer trading, involves users trading against a liquidity pool, with prices provided by oracles. This model includes:

Single-Asset Liquidity Provider

Users deposit one asset into a vault, creating a liquidity pool, and stakers earn from traders’ losses.

Key features include:

  • Over-Collateralization: As traders lose, the vault’s assets may exceed stakers’ initial deposits.
  • No Capital Guarantee: Depending on traders’ results, liquidity providers can incur direct losses.
  • Buffer Mechanism: When overall profits and losses are negative, part of the trading fees is used as a buffer to protect stakers’ funds and incentivize them to continue participating.

The representative project for this model is Gains Network. Gains Network is a decentralized leveraged trading platform based on Polygon and Arbitrum blockchains, with the core protocol being gTrade. The platform provides liquidity through a DAI vault and allows users to trade various assets such as cryptocurrencies, commodities, and forex. gTrade’s main advantages are its multi-level risk control mechanisms, with risk management adjusted through price impact, rollover fees, and funding rates.


Source: gains.trade

Composite-Asset Liquidity Provider

Liquidity providers stake multiple assets to form a composite-asset liquidity pool. For example, in GMX, users provide liquidity by staking GLP tokens, with the GLP price determined by various assets such as ETH, WBTC, and LINK.

Key features include:

  • Zero Slippage Trading: Transaction prices are determined by Oracle quotes, ensuring zero slippage even for large trades.
  • Unlimited Liquidity: As long as the GLP pool holds assets, all trading pairs can access liquidity, with integrated liquidity depth.
  • Permissionless Participation: Anyone can participate in providing liquidity and share platform earnings based on the GLP they hold.

The representative project for this type is GMX. GMX is a decentralized perpetual contract trading platform initially launched on Binance Smart Chain, then on Arbitrum in 2021, and later integrated with the Avalanche network in 2022. GMX uses Oracle pricing to avoid slippage losses and supports zero-slippage spot and margin trading. It’s worth noting that regardless of whether users go long or short, they need to pay fees. The GLP pool acts as a counterparty to traders; if traders profit, assets are deducted from the GLP pool, and vice versa.


Source: app.gmx.io

Synthetic Assets

Synthetic assets are simulated assets pegged to target asset prices via oracles.

Key features include:

  • Dynamic Global Debt: All synthetic assets form a debt pool, with asset quantity and price changes within the pool affecting total debt.
  • Debt Risk for Collateral Providers: All collateral providers are counterparties to each other, jointly bearing the system’s debt.

The representative project for this model is Kwenta. Based on the Synthetix protocol, Kwenta is a derivatives trading platform supporting cryptocurrencies, forex, and commodities like gold and silver. Kwenta’s traders transact through the Synthetix debt pool, backed by sUSD provided by SNX stakers. Kwenta focuses on user experience, offering over 42 trading pairs with up to 50x leverage. The dynamic debt pool model enables nearly unlimited liquidity, with prices provided by oracles, so there’s no slippage.


Source: kwenta.io

Virtual Automated Market Maker (vAMM) Mode

The vAMM mode, developed by the Perp protocol, is an extension of the automated market maker (AMM) concept. Like regular AMMs, vAMM also uses the x y = k formula for automated price discovery. However, vAMM doesn’t require real liquidity providers. Users deposit real assets into the smart contract vault as collateral, mint virtual assets, and then trade and quote within the liquidity pool using the x y = k formula. Users trade only within the virtual asset pool, reducing risk.

Key features include:

  • Efficient Trading: The automated mechanism allows trades to execute quickly without manual price adjustment.
  • No Impermanent Loss: Since there is no actual liquidity, and pricing is determined algorithmically, users don’t face impermanent loss.
  • Leverage Trading: Through a reasonable liquidation mechanism, traders can engage in leveraged trading in the virtual pool, improving capital efficiency.
  • Limited Liquidity: Liquidity depends on the depth provided, and liquidity cannot be shared between different trading pairs.


Source: perp.com

Pricing Methods of DEX Perpetual Contracts

Pricing mechanisms are crucial in perpetual contract DEXs to ensure market prices accurately reflect supply and demand. Various DEXs adopt different pricing approaches to achieve liquidity balance and reduce price volatility. Here are the primary pricing methods:

Oracle-Based Pricing

The Oracle-based method pulls pricing data from high-volume centralized exchanges. While this carries some risk of price manipulation, it helps reduce DEX pricing costs. For instance, GMX uses Chainlink oracles to ensure accurate and reliable price data. However, DEXs using oracles are often limited by reliance on major exchange prices, generally acting as price receivers with limited independent pricing capability.

Virtual Automated Market Maker (vAMM)

The vAMM model, inspired by Uniswap’s AMM, uses a virtual liquidity pool without actual assets. Instead, it simulates buying and selling dynamics through mathematical formulas for pricing. vAMMs require no significant capital investment or connection to the spot market, enabling perpetual contract trading. Although vAMMs may experience higher slippage and impermanent loss, their decentralized and transparent nature makes them an effective on-chain pricing method.

Hybrid Model

To address the performance issues of fully on-chain order matching, some DEXs use a hybrid model with off-chain order books and on-chain settlement. Here, order matching happens off-chain, while settlement and asset custody remain on-chain, reducing risks while ensuring asset safety.

On-Chain Order Book

In the On-Chain Order Book model, all order data and actions are processed directly on-chain, ensuring transaction integrity. Although it provides maximum security and decentralization, it’s limited by blockchain speed and capacity. Also, because all order data is public, this model may be vulnerable to certain attacks.

Advantages of DEX Perpetual Contracts

Lower Transaction Costs

In traditional futures, when a contract expires, traders must close their position and open a new contract to maintain it, incurring rollover fees and other costs like bid-ask spreads. Perpetual contracts have no expiration, allowing traders to avoid rollovers and reduce trading costs.

Reduced Holding Costs

Long-term contracts in traditional markets are generally priced higher than short-term contracts. During rollovers, investors often pay a premium for new contracts, raising holding costs. Perpetual contracts eliminate this issue with a funding rate mechanism, allowing traders to hold positions without paying for new contracts at higher prices.

Stable Pricing

Contract pricing involves market mechanisms to reflect an asset’s value. The funding rate in perpetual contracts helps balance supply and demand and continuously adjusts prices to follow spot market changes closely, ensuring smooth and stable price movements.

The Role of Liquidity Providers

Liquidity is essential for exchanges’ functionality, but acquiring it is challenging for DEXs. As DeFi rapidly develops, new DEXs attract liquidity through incentives like liquidity mining, while market mechanisms offer arbitrage opportunities to encourage participation.

In perpetual contract DEXs, liquidity typically comes from liquidity providers contributing assets to incentive-driven liquidity pools. These providers earn rewards while supporting DEX trading. Many traditional DEXs use high yields and airdrops to attract providers, but this model has limitations. To maintain high APYs and rewards, DEXs need large token supplies for liquidity mining, which may strain the economic model over time. As the number of DEXs grows, individual market shares shrink, making it harder to attract sufficient liquidity.

Conclusion

Perpetual contracts are now a driving force in decentralized derivatives trading, expanding in DeFi due to their flexibility and scalability. Despite challenges in acquiring liquidity, handling volatility, and platform competition, platforms like DYDX and GMX have improved trading efficiency and user experience through optimized liquidity models and Oracle-based pricing. With more innovative protocols and cross-chain advancements, the perpetual contract market is likely to expand further, contributing to the growth and maturity of the DeFi ecosystem.

Author: Snow
Translator: Panie
Reviewer(s): KOWEI、Edward、Elisa
* The information is not intended to be and does not constitute financial advice or any other recommendation of any sort offered or endorsed by Gate.io.
* This article may not be reproduced, transmitted or copied without referencing Gate.io. Contravention is an infringement of Copyright Act and may be subject to legal action.

Overview of Perpetual Contract DEX

Beginner11/7/2024, 9:47:45 AM
Perpetual contracts are an essential derivative in the DeFi sector. Due to the lack of a fixed expiration date, these contracts have become a favorite among traders. This article provides an in-depth look at how perpetual contracts work, the operational framework of decentralized perpetual contract platforms, and the role of liquidity providers.

Introduction

The DeFi boom has opened new opportunities in the derivatives market. Perpetual contracts, a widely used financial derivative within DeFi, have quickly captured traders’ interest thanks to their unlimited duration and high-leverage capabilities. With rising demand for transparency and decentralization, more decentralized exchanges create flexible and secure trading experiences through innovative contract structures and pricing mechanisms.

Current Analysis of the DEX Perpetual Contract Market

Potential of Derivatives DEX

CoinMarketCap reports show around 480 decentralized spot exchanges, double the number of centralized spot exchanges (253). By comparison, there are only 18 decentralized derivatives exchanges, far fewer than the 101 centralized derivatives exchanges. Notably, in the CEX sector, derivatives trading volumes exceed spot trading volumes by over sevenfold, whereas, in the DEX space, derivatives trading volumes are nearly equal to spot trading volumes.


Source:coinmarketcap

Demand for Derivatives DEX

Despite the large spot market in CEX, derivatives traders are not necessarily drawn to CEX platforms. One primary reason is the frequent “price pinning” issue in CEX futures trading, which often arises from operational and transparency limitations in CEX. Such rapid price swings can be highly disruptive to users with leveraged positions. Consequently, there is a growing interest in decentralized derivatives exchanges.

Fundamentals of DEX Perpetual Contracts

The concept of futures contracts, first introduced by Robert Shiller in 1992, debuted in the crypto market through BitMEX in 2016. A futures contract specifies a future date and price for purchasing or selling a specific commodity, asset, or security. Unlike options, futures contracts are binding, and both parties must fulfill their contractual obligations.

Perpetual contracts are a unique form of futures contracts without a fixed expiration date, hence the term “perpetual.” Their price closely follows the underlying asset’s price changes. Each $1 shift in the underlying asset’s price leads to a corresponding adjustment in the contract’s price. Perpetual contracts let traders speculate on asset prices without time constraints, allowing them to adjust their long or short positions based on market conditions.

The liquidation mechanism is essential in most perpetual contract systems. Funding rates are generally implemented to maintain market efficiency and balance long and short positions. These rates compensate those holding minority positions, helping to stabilize the market.

Models of DEX Perpetual Contracts

DEX perpetual contract protocols generally fall into two main categories based on how they operate: Order Book and Liquidity Pool models. The Liquidity Pool model further divides into four types: single-asset liquidity providers, composite-asset liquidity providers, synthetic assets, and virtual automated market makers (vAMM).

Order Book Model

In the Order Book model, liquidity is provided by market makers, with users trading directly against them, while the platform matches buy and sell orders based on market demand. This model, commonly used by centralized exchanges, has robust liquidity but also certain centralization drawbacks.

Key features include:

  • Pricing: Asset prices are set by the market through buy and sell orders without centralized interference.
  • Transparency: All buy and sell orders are publicly visible, giving traders insight into market supply, demand, and pricing levels.
  • Higher Transaction Costs: In low-liquidity markets, large spreads may occur, and trades may take longer to complete.
  • Enhanced User Experience: This model supports various trade types, such as market, limit, and stop-loss orders, closely resembling the experience on centralized exchanges.
  • High Gas Costs: Off-chain matching and on-chain settlement require high gas fees, especially during network congestion, making small trades costly. (DYDX V4 has addressed this issue.)

This model’s representative project is DYDX. DYDX is a decentralized, non-custodial perpetual contract trading platform supporting over 143 asset pairs. The platform was developed by a team of engineers from prominent cryptocurrency companies such as Coinbase. In October 2023, the DYDX V4 version was launched, introducing the DYDX Chain, an independent public blockchain built on Cosmos. Each part of the protocol operates in a fully decentralized manner, including the consensus mechanism, order book, matching engine, and frontend. While DYDX V3 also supported high-performance perpetual contract trading, true decentralization was achieved only in V4.


Source: dydx exchange

Liquidity Pool Model

The Liquidity Pool model, or pool-to-peer trading, involves users trading against a liquidity pool, with prices provided by oracles. This model includes:

Single-Asset Liquidity Provider

Users deposit one asset into a vault, creating a liquidity pool, and stakers earn from traders’ losses.

Key features include:

  • Over-Collateralization: As traders lose, the vault’s assets may exceed stakers’ initial deposits.
  • No Capital Guarantee: Depending on traders’ results, liquidity providers can incur direct losses.
  • Buffer Mechanism: When overall profits and losses are negative, part of the trading fees is used as a buffer to protect stakers’ funds and incentivize them to continue participating.

The representative project for this model is Gains Network. Gains Network is a decentralized leveraged trading platform based on Polygon and Arbitrum blockchains, with the core protocol being gTrade. The platform provides liquidity through a DAI vault and allows users to trade various assets such as cryptocurrencies, commodities, and forex. gTrade’s main advantages are its multi-level risk control mechanisms, with risk management adjusted through price impact, rollover fees, and funding rates.


Source: gains.trade

Composite-Asset Liquidity Provider

Liquidity providers stake multiple assets to form a composite-asset liquidity pool. For example, in GMX, users provide liquidity by staking GLP tokens, with the GLP price determined by various assets such as ETH, WBTC, and LINK.

Key features include:

  • Zero Slippage Trading: Transaction prices are determined by Oracle quotes, ensuring zero slippage even for large trades.
  • Unlimited Liquidity: As long as the GLP pool holds assets, all trading pairs can access liquidity, with integrated liquidity depth.
  • Permissionless Participation: Anyone can participate in providing liquidity and share platform earnings based on the GLP they hold.

The representative project for this type is GMX. GMX is a decentralized perpetual contract trading platform initially launched on Binance Smart Chain, then on Arbitrum in 2021, and later integrated with the Avalanche network in 2022. GMX uses Oracle pricing to avoid slippage losses and supports zero-slippage spot and margin trading. It’s worth noting that regardless of whether users go long or short, they need to pay fees. The GLP pool acts as a counterparty to traders; if traders profit, assets are deducted from the GLP pool, and vice versa.


Source: app.gmx.io

Synthetic Assets

Synthetic assets are simulated assets pegged to target asset prices via oracles.

Key features include:

  • Dynamic Global Debt: All synthetic assets form a debt pool, with asset quantity and price changes within the pool affecting total debt.
  • Debt Risk for Collateral Providers: All collateral providers are counterparties to each other, jointly bearing the system’s debt.

The representative project for this model is Kwenta. Based on the Synthetix protocol, Kwenta is a derivatives trading platform supporting cryptocurrencies, forex, and commodities like gold and silver. Kwenta’s traders transact through the Synthetix debt pool, backed by sUSD provided by SNX stakers. Kwenta focuses on user experience, offering over 42 trading pairs with up to 50x leverage. The dynamic debt pool model enables nearly unlimited liquidity, with prices provided by oracles, so there’s no slippage.


Source: kwenta.io

Virtual Automated Market Maker (vAMM) Mode

The vAMM mode, developed by the Perp protocol, is an extension of the automated market maker (AMM) concept. Like regular AMMs, vAMM also uses the x y = k formula for automated price discovery. However, vAMM doesn’t require real liquidity providers. Users deposit real assets into the smart contract vault as collateral, mint virtual assets, and then trade and quote within the liquidity pool using the x y = k formula. Users trade only within the virtual asset pool, reducing risk.

Key features include:

  • Efficient Trading: The automated mechanism allows trades to execute quickly without manual price adjustment.
  • No Impermanent Loss: Since there is no actual liquidity, and pricing is determined algorithmically, users don’t face impermanent loss.
  • Leverage Trading: Through a reasonable liquidation mechanism, traders can engage in leveraged trading in the virtual pool, improving capital efficiency.
  • Limited Liquidity: Liquidity depends on the depth provided, and liquidity cannot be shared between different trading pairs.


Source: perp.com

Pricing Methods of DEX Perpetual Contracts

Pricing mechanisms are crucial in perpetual contract DEXs to ensure market prices accurately reflect supply and demand. Various DEXs adopt different pricing approaches to achieve liquidity balance and reduce price volatility. Here are the primary pricing methods:

Oracle-Based Pricing

The Oracle-based method pulls pricing data from high-volume centralized exchanges. While this carries some risk of price manipulation, it helps reduce DEX pricing costs. For instance, GMX uses Chainlink oracles to ensure accurate and reliable price data. However, DEXs using oracles are often limited by reliance on major exchange prices, generally acting as price receivers with limited independent pricing capability.

Virtual Automated Market Maker (vAMM)

The vAMM model, inspired by Uniswap’s AMM, uses a virtual liquidity pool without actual assets. Instead, it simulates buying and selling dynamics through mathematical formulas for pricing. vAMMs require no significant capital investment or connection to the spot market, enabling perpetual contract trading. Although vAMMs may experience higher slippage and impermanent loss, their decentralized and transparent nature makes them an effective on-chain pricing method.

Hybrid Model

To address the performance issues of fully on-chain order matching, some DEXs use a hybrid model with off-chain order books and on-chain settlement. Here, order matching happens off-chain, while settlement and asset custody remain on-chain, reducing risks while ensuring asset safety.

On-Chain Order Book

In the On-Chain Order Book model, all order data and actions are processed directly on-chain, ensuring transaction integrity. Although it provides maximum security and decentralization, it’s limited by blockchain speed and capacity. Also, because all order data is public, this model may be vulnerable to certain attacks.

Advantages of DEX Perpetual Contracts

Lower Transaction Costs

In traditional futures, when a contract expires, traders must close their position and open a new contract to maintain it, incurring rollover fees and other costs like bid-ask spreads. Perpetual contracts have no expiration, allowing traders to avoid rollovers and reduce trading costs.

Reduced Holding Costs

Long-term contracts in traditional markets are generally priced higher than short-term contracts. During rollovers, investors often pay a premium for new contracts, raising holding costs. Perpetual contracts eliminate this issue with a funding rate mechanism, allowing traders to hold positions without paying for new contracts at higher prices.

Stable Pricing

Contract pricing involves market mechanisms to reflect an asset’s value. The funding rate in perpetual contracts helps balance supply and demand and continuously adjusts prices to follow spot market changes closely, ensuring smooth and stable price movements.

The Role of Liquidity Providers

Liquidity is essential for exchanges’ functionality, but acquiring it is challenging for DEXs. As DeFi rapidly develops, new DEXs attract liquidity through incentives like liquidity mining, while market mechanisms offer arbitrage opportunities to encourage participation.

In perpetual contract DEXs, liquidity typically comes from liquidity providers contributing assets to incentive-driven liquidity pools. These providers earn rewards while supporting DEX trading. Many traditional DEXs use high yields and airdrops to attract providers, but this model has limitations. To maintain high APYs and rewards, DEXs need large token supplies for liquidity mining, which may strain the economic model over time. As the number of DEXs grows, individual market shares shrink, making it harder to attract sufficient liquidity.

Conclusion

Perpetual contracts are now a driving force in decentralized derivatives trading, expanding in DeFi due to their flexibility and scalability. Despite challenges in acquiring liquidity, handling volatility, and platform competition, platforms like DYDX and GMX have improved trading efficiency and user experience through optimized liquidity models and Oracle-based pricing. With more innovative protocols and cross-chain advancements, the perpetual contract market is likely to expand further, contributing to the growth and maturity of the DeFi ecosystem.

Author: Snow
Translator: Panie
Reviewer(s): KOWEI、Edward、Elisa
* The information is not intended to be and does not constitute financial advice or any other recommendation of any sort offered or endorsed by Gate.io.
* This article may not be reproduced, transmitted or copied without referencing Gate.io. Contravention is an infringement of Copyright Act and may be subject to legal action.
Start Now
Sign up and get a
$100
Voucher!