Technical Overview
Last updated
Last updated
Modern cryptocurrency exchanges are complex mechanisms consisting of various interconnected modules. EVEDEX operates on a hybrid model that combines the best aspects of centralized and decentralized exchanges: the order matching process functions similarly to centralized platforms, ensuring speed and efficiency, while order settlement occurs in a decentralized manner, directly between users' wallets.
In this article, we will examine the operation principles of the EVEDEX exchange. We have chosen to break down the system into modules and describe each one and its interactions.
The backend is the heart of the exchange, serving as its central element and interacting with all entities. While the following list highlights some of its primary functions, in reality, the backend performs many more tasks:
User Information: Maintains data about user accounts, including balances, open positions, position history, and order details.
Order Management: Tracks created and executed orders.
Notifications: Alerts users about important events.
Liquidation Processes: Initiates liquidation procedures when necessary.
An off-chain order book (Matcher) system manages buy and sell orders outside the blockchain. This approach follows the same principle as centralized exchanges, enabling faster order processing and matching. By handling order management off-chain, EVEDEX achieves higher performance and lower latency, which are critical for efficient trading.
The matcher’s responsibilities include:
Order Matching: Matches buy and sell orders and places them in the order book.
Essential Risk Management: Ensures orders meet risk criteria before execution.
Real-Time Updates: Provides live data on the state of the order book and order matching events via WebSocket.
No blockchain fees: There is no need to pay any blockchain fees for trade, because we are not using blockchain at all at this step.
We provided a detailed description of the Matcher’s specifications on this .
The exchange’s backend communicates with the Matcher through API requests and Websocket. Here’s the workflow:
A user submits an order request signed by their private key.
The backend performs feasibility checks, such as verifying sufficient funds, ensuring the order meets minimum position requirements, and verifying the wallet’s signature.
The backend forwards the validated request to the Matcher.
The Matcher verifies the order signature, processes it, updates its status (e.g., executed, partially executed, pending, or canceled), and records it in the database.
The updated order status is relayed back to the backend.
The filled order will be recorded on the blockchain based on the demand from the backend.
On-chain settlement refers to the process of finalizing transactions directly on our L3 blockchain network. Unlike centralized exchanges, where trades are executed and settled off-chain within the exchange's internal ledger, EVEDEX leverages blockchain technology to ensure users' transparency, security, and self-custody.
Our L3 network, Eventum, handles the following:
Position and Funds Data: Logs user trading positions and balances.
Liquidation and ADL Data: Records liquidation events and ADL (Auto-Deleveraging) adjustments.
Funding Rates and Fees: Tracks funding rates and trading fees paid.
Auditability: It provides open, verifiable data for anyone to review.
User actions are periodically recorded in the blockchain to verify and ensure the correctness of the backend data*.
Key scenarios include:
Periodic Updates: User position data is written to the blockchain after sufficient changes have accumulated.
Withdrawals: When a user withdraws funds, the data is recorded on-chain to verify backend correctness.
*This feature is currently under development and will be available in future updates.
We have shared the entire journey of our current blockchain solution on this . You can find detailed insights and background information there.