Tech Architecture

Architecture Overview

Below is a diagram illustrating the GoTrading server's multi-chain interoperability, marketplace extensibility, and robust performance. Users can interact either with the Aggregator Contract or directly with the respective third-party marketplace contracts, depending on the context of order fulfillment.


The GoTrading platform comprises five core components that together facilitate seamless multi-marketplace NFT trading.

1. Aggregator Contract

The Aggregator Contract is the main interface for users, facilitating order fulfillment across multiple marketplaces in a single transaction. Key features of the Aggregator Contract include:

  • Unified Interface: Provides a unified interface for users to interact with various marketplaces, simplifying the order fulfillment process.
  • Fee Management: Manages additional fees for transactions involving third-party marketplaces, ensuring accurate fee distribution and marketplace cost coverage.

Note: When a user transacts with third-party marketplaces, the Aggregator Contract processes the extra fee, sending a portion to your designated address, and directs the corresponding marketplace contract to complete the transaction.

2. Order Collectors

Order Collectors interface with various marketplace order protocols, standardizing orders and ensuring their availability. Specifically, the responsibilities of Order Collectors include:

  • Protocol Adaptation: Adapting to various marketplace order protocols, thereby facilitating a unified order handling process across different marketplaces.
  • Order Standardization: Normalizing and standardizing orders to maintain a consistent order format, which simplifies order processing and execution.
  • Availability Monitoring: Continuously monitoring the availability of orders by subscribing to relevant on-chain events and off-chain APIs, ensuring that the order data is accurate and up-to-date.

3. Aggregated Order Books

The Aggregated Order Books serve as a centralized storage for standardized NFT orders across multiple blockchains, enabling advanced order query and business operations. Key features of the Aggregated Order Books include:

  • Multi-Blockchain Support: Stores and manages NFT orders from various blockchains in a unified, accessible format.
  • Flexible Query Capabilities: Provides a range of query methods tailored to different scenarios, facilitating efficient order retrieval and analysis.
  • Advanced Business Operations: Supports the computation of advanced business models like Best Listing and Best Offer, aiding in the optimization of order placements and fulfillment.
  • High-Performance Design: Engineered for top-notch performance to handle high traffic loads, ensuring seamless operation and a positive user experience.

4. Command Generator

The Command Generator streamlines the process of executing trading operations by generating a list of standardized commands for the client-end. Key attributes of the Command Generator include:

  • Standardized Command Generation: Produces a set of standardized, developer-friendly commands that simplify client-end interception, thereby lowering the development cost required to integrate GoTrading.
  • Atomic Trading Facilitation: Serves as a fundamental component in enabling atomic trading capabilities, ensuring that a series of operations are executed successfully and in the correct sequence.
  • Gas-Saving Mechanism: Incorporates a gas-saving mechanism to optimize the generated transaction commands for minimal gas consumption, promoting cost-efficiency in transaction execution.

5. Tenant Manager

The Tenant Manager oversees the business status of all GoTrading tenants, ensuring accurate tracking and management of their operations and activities. Key functionalities of the Tenant Manager include:

  • Tenant Tracking and Management: Vigilantly monitors and manages the business status of all GoTrading tenants, ensuring a consistent update and tracking of their operations and activities.
  • Order Book Access Control (Future Enhancement): In future iterations, this component will facilitate order book access control, enabling tenants to manage their order book accessibility and collaborate with others in a variety of ways.

Order Management

Create Order To Third-party Marketplace Order Book

Creating orders on a third-party marketplace generally involves two interactions between the end-user and your marketplace frontend.

  1. the end-user needs to approve the marketplace contract to transfer NFT or ERC20 assets, and then signs the order with their Externally Owned Account (EOA).
  2. Once the order is signed, it will be posted to the designated marketplace.

Create Order To Your Own Order Book

We utilize the marketplace protocol Seaport for standardizing orders and executing trades in your own order book. The orders are saved directly into our database.

Fulfill Third-party Marketplace Order

To fulfill a third-party marketplace order, our Command Generator will return the order fulfillment transaction based on the order details. The end-user sends the transaction to invoke the respective marketplace contract to complete the trade. Once the order's fulfillment transaction is recorded, the Order Collector will update the order status in our database.

Fulfill Multiple Third-party Marketplace Orders

Fulfilling multiple orders from third-party marketplaces in one transaction requires the end-user's EOA to call the Aggregator Contract with the orders as parameters. The Aggregator Contract adapts the order fulfillment methods of third-party marketplaces' contracts to complete the trades.

Fulfill Your Own Order Book Order

Fulfilling an order from your own order book requires the end-user to invoke the order fulfillment method on the Seaport contract, as your orders are created following the Seaport standard. Once the order is fulfilled, we will update the order's status in our order book.

Collect Your Marketplace Fee

  • Third-party Marketplace Orders

Your marketplace can request the end-user to pay an extra marketplace fee on top of the order's sale price. The order fulfillment transaction routes through our Aggregator Contract first to split the marketplace fee to your fee receiving address, then it invokes the marketplace contract to execute order fulfillment.

  • Your Own Orders

The marketplace fee, set at order creation, is intercepted by the Seaport Contract and sent to you during fulfillment, ensuring collection regardless of where the order is traded.

Order Cancellation

Orders are cancelled on-chain; each marketplace contract maintains a map to record the status of orders by unique order hashes. Once an order is cancelled, any subsequent transaction to fulfill the order will be reverted by the smart contract.

Contract Reference

  • Ethereum
    • Aggregator Contract: 0xc2c862322e9c97d6244a3506655da95f05246fd8
    • Seaport v1.5: 0x00000000000000adc04c56bf30ac9d3c0aaf14dc