How Does edgeX Work? A Complete Breakdown of the Perpetual DEX Mechanism

Last Updated 2026-04-03 12:56:12
Reading Time: 2m
edgeX adopts a hybrid model of “off-chain matching + on-chain settlement” for decentralized perpetual contract trading. This design maintains asset self-custody and verifiable outcomes while improving execution efficiency. From order submission to final settlement, each trade goes through matching, risk calculation, and on-chain confirmation. This hybrid architecture has become a typical approach for improving performance in Perp DEX systems.

As decentralized finance continues to expand into the derivatives space, trading systems must balance high-frequency matching, low latency, and on-chain security. Fully on-chain execution offers strong transparency, but still faces limitations in performance and cost. This has driven the rise of hybrid trading architectures.

Against this backdrop, edgeX represents a typical Perp DEX design. By moving the matching process off-chain while retaining on-chain settlement and asset custody, it creates a model that balances efficiency with verifiability. This approach is increasingly becoming a core direction for decentralized derivatives infrastructure.

Overview: How a Trade Works on edgeX

At a high level, a typical trade on edgeX follows six steps:

  1. Order creation: The user sets price, size, and leverage, then signs the transaction with their wallet

  2. Order submission: The order is sent to the off-chain matching system instead of being directly posted on-chain

  3. Order matching: The matching engine pairs buy and sell orders based on price and time priority

  4. Trade confirmation: The system generates a trade record and updates the user’s position

  5. Risk calculation: Margin, unrealized PnL, and liquidation risk are calculated

  6. On-chain settlement: The results are submitted to a smart contract for fund transfers and final confirmation

In essence, edgeX operates through a hybrid execution model that combines off-chain matching with on-chain settlement, ensuring both efficiency and security while keeping results verifiable.

Core Architecture: The EDGE Stack Execution Layer

edgeX can be understood as a layered system, where the execution layer, often referred to as the EDGE Stack, handles the core trading logic.

Core Architecture: The EDGE Stack Execution Layer Source: edgeX Docs

This architecture consists of three main components: the user interface layer, the matching and execution layer, and the on-chain settlement layer. Users interact with the system through a frontend or API, the matching engine processes orders off-chain, and the blockchain network finalizes state changes and asset transfers.

The key idea is to move computation-heavy operations, such as matching, off-chain, while submitting critical results on-chain. This creates a practical balance between performance and security.

Order Matching Mechanism: How edgeX Achieves Efficient Execution

edgeX typically uses an order book model for trade matching. In this setup, buyers and sellers place limit orders that form market depth, and the matching engine executes trades based on price priority followed by time priority.

Because the matching engine operates off-chain, it can process orders with very low latency, achieving speeds close to centralized exchanges. This is especially important for perpetual contracts, where prices move quickly and execution speed directly impacts outcomes.

Compared to automated market maker models, the order book approach relies more on active liquidity providers. However, it offers different advantages in price discovery and slippage control.

Trade Execution and Settlement: From Matching to Final Confirmation

Once orders are matched in the engine, the system generates trade records and moves into the execution and settlement phase.

First, user positions are updated based on the execution price, along with margin adjustments and unrealized profit and loss. Then, this data is submitted to on-chain smart contracts, which handle final fund transfers and state confirmation.

On-chain settlement ensures that all results are verifiable and provides the foundation for liquidation mechanisms, such as forced position closure when margin requirements are not met. This stage serves as the critical bridge between off-chain execution and on-chain security.

How the “Zero Gas” Model Works: Understanding edgeX’s Fee Structure

From a user experience perspective, edgeX often implements a “zero Gas” or Gas abstraction model to simplify interactions.

This is typically achieved by having the platform cover on-chain transaction fees or by bundling those costs into trading fees. As a result, users do not need to pay Gas separately, even though costs still exist behind the scenes.

Overall, edgeX’s fee structure mainly consists of trading fees based on a Maker and Taker model, along with funding rates that help maintain market balance.

Liquidity Sources and Market Structure

Liquidity on edgeX primarily comes from limit orders placed in the order book by both market makers and regular traders.

Market makers provide continuous quotes, improving depth and reducing slippage. At the same time, overall trading activity influences liquidity levels, creating a dynamic market structure.

Unlike AMM models that rely on liquidity pools, the order book model depends more on active participants. This makes liquidity more flexible, but it may also lead to reduced depth during extreme market conditions.

edgeX’s Revenue and Incentive Mechanisms

edgeX’s incentive structure typically revolves around trading activity and liquidity provision.

Trading fees serve as a primary source of platform revenue, and a portion of these fees may be used to incentivize market makers or reward active users. In addition, token-based incentives may be introduced to encourage long-term participation, such as distributing rewards to liquidity providers and traders.

This design helps align the interests of different participants in a decentralized environment, supporting both market activity and system stability.

Summary

edgeX demonstrates a typical hybrid architecture by combining off-chain matching for high-performance execution with on-chain settlement for asset security and verifiable outcomes. From order submission to final settlement, the full workflow illustrates how decentralized derivatives exchange balance efficiency with decentralization.

Understanding this mechanism provides a structured way to analyze how Perp DEX systems operate and offers a useful framework for comparing different trading protocols.

FAQs

Is edgeX fully on-chain?

No, it typically uses a hybrid model with off-chain matching and on-chain settlement.

Why does edgeX use off-chain matching?

To increase execution speed and reduce latency, especially for high-frequency trading scenarios.

Does “zero Gas” mean there are no fees?

No, fees still exist but are usually bundled into trading fees or covered by the platform.

Where does edgeX liquidity come from?

Mainly from market makers and traders placing orders in the order book.

How does edgeX ensure trust in trade results?

Through on-chain settlement and smart contract execution, which make all outcomes verifiable.

Author: Jayne
Translator: Jared
Reviewer(s): Ida
Disclaimer
* 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.
* This article may not be reproduced, transmitted or copied without referencing Gate. Contravention is an infringement of Copyright Act and may be subject to legal action.

Share

Crypto Calendar
Tokens Unlock
Pyth Network will unlock 2,130,000,000 PYTH tokens on May 19th, constituting approximately 36.96% of the currently circulating supply.
PYTH
2.25%
2026-05-18
Tokens Unlock
Pump.fun will unlock 82,500,000,000 PUMP tokens on July 12th, constituting approximately 23.31% of the currently circulating supply.
PUMP
-3.37%
2026-07-11
Tokens Unlock
Succinct will unlock 208,330,000 PROVE tokens on August 5th, constituting approximately 104.17% of the currently circulating supply.
PROVE
2026-08-04
sign up guide logosign up guide logo
sign up guide content imgsign up guide content img
Sign Up

Related Articles

In-depth Explanation of Yala: Building a Modular DeFi Yield Aggregator with $YU Stablecoin as a Medium
Beginner

In-depth Explanation of Yala: Building a Modular DeFi Yield Aggregator with $YU Stablecoin as a Medium

Yala inherits the security and decentralization of Bitcoin while using a modular protocol framework with the $YU stablecoin as a medium of exchange and store of value. It seamlessly connects Bitcoin with major ecosystems, allowing Bitcoin holders to earn yield from various DeFi protocols.
2026-03-24 11:55:44
Sui: How are users leveraging its speed, security, & scalability?
Intermediate

Sui: How are users leveraging its speed, security, & scalability?

Sui is a PoS L1 blockchain with a novel architecture whose object-centric model enables parallelization of transactions through verifier level scaling. In this research paper the unique features of the Sui blockchain will be introduced, the economic prospects of SUI tokens will be presented, and it will be explained how investors can learn about which dApps are driving the use of the chain through the Sui application campaign.
2026-03-24 11:54:36
Dive into Hyperliquid
Intermediate

Dive into Hyperliquid

Hyperliquid's vision is to develop an on-chain open financial system. At the core of this ecosystem is Hyperliquid L1, where every interaction, whether an order, cancellation, or settlement, is executed on-chain. Hyperliquid excels in product and marketing and has no external investors. With the launch of its second season points program, more and more people are becoming enthusiastic about on-chain trading. Hyperliquid has expanded from a trading product to building its own ecosystem.
2024-06-19 06:39:42
What Is a Yield Aggregator?
Beginner

What Is a Yield Aggregator?

Yield Aggregators are protocols that automate the process of yield farming which allows crypto investors to earn passive income via smart contracts.
2026-03-24 11:52:20
What is Stablecoin?
Beginner

What is Stablecoin?

A stablecoin is a cryptocurrency with a stable price, which is often pegged to a legal tender in the real world. Take USDT, currently the most commonly used stablecoin, for example, USDT is pegged to the US dollar, with 1 USDT = 1 USD.
2026-03-24 11:52:13
Arweave: Capturing Market Opportunity with AO Computer
Beginner

Arweave: Capturing Market Opportunity with AO Computer

Decentralised storage, exemplified by peer-to-peer networks, creates a global, trustless, and immutable hard drive. Arweave, a leader in this space, offers cost-efficient solutions ensuring permanence, immutability, and censorship resistance, essential for the growing needs of NFTs and dApps.
2026-03-24 11:54:35