Component Interactions

ULTRADE's architecture, while composed of three core components, is functionally divided into two major areas: Asset Management and Trading & Settlement. Each area handles specific interactions between components to ensure a seamless and secure trading experience.

1. Asset Management: Vault and Core Exchange Contracts

The Asset Management function handles user deposits and withdrawals across various blockchains. This process involves close interaction between the Vault Smart Contracts and the Core Exchange Contract:

Deposits:

  • Users deposit native assets directly into a Vault Smart Contract on their respective chain. The Vault Smart Contract records the deposit and communicates with the Core Exchange Contract via GMP.

  • Upon receiving the deposit message, the Core Exchange Contract verifies the details and updates the user's balance within the system, allowing them to trade those assets on the ULTRADE platform.

Withdrawals:

  • For withdrawals, users sign a withdrawal request using their Login Account. The request is processed by the Core Exchange Contract, which verifies the balance and the validity of the request.

  • Once verified, the Core Exchange Contract sends a GMP message to the corresponding Vault Smart Contract, instructing it to release the specified assets to the user’s designated account. The Vault ensures that the withdrawal is processed securely and directly, maintaining the non-custodial nature of the platform.

This design ensures that all asset management operations are conducted natively, without the need for bridges or wrapped assets, thus enhancing both security and user experience.

2. Trading and Settlement: Core Exchange Contract and In-Memory Matching Engine

The Trading and Settlement function is responsible for the execution of trades and the on-chain settlement of those trades, involving interactions between the Core Exchange Contract and the In-Memory Matching Engine:

Order Submission and Matching:

  • When a user submits an order, it is processed by the Backend, where the In-Memory Matching Engine matches the order in real-time. This off-chain processing ensures low latency and high efficiency in finding matching orders without burdening the blockchain with unnecessary transactions.

  • Once a match is found, the matching engine sends the order details to the Core Exchange Contract for verification and settlement.

Trade Verification and Settlement:

  • The Core Exchange Contract verifies the order details, including the signatures and balances, to ensure that the trade is legitimate and that both parties have sufficient assets to complete the transaction.

  • After successful verification, the Core Exchange Contract settles the trade by updating the respective user balances on-chain, ensuring that the transaction is recorded immutably on the blockchain.

By separating these functions, ULTRADE ensures that the trading process is both fast and secure, with the added benefit of cross-chain functionality without the reliance on bridges or wrapped assets—a key innovation of the NEX technology.

Last updated