Developers Forum for XinFin XDC Network

Galaxy
Galaxy

Posted on • Updated on

[Informative] Subswap swap module draft : Next generation deal aggregator

Subswap Swap Module Draft: Next Generation Deal Aggregator

Executive Summary

Subswap is positioned as a top-tier blockchain protocol, designed to meet the growing demand for blockchain and the increasing number of emerging trading protocols. We plan to develop a trading aggregator function module to achieve the goals of Subswap.

Workflow

The Subswap Swap module consists of the following parts:

  • Aggregation Protocol (Smart Contract): Responsible for aggregating trading data from different protocols and calculating the best trading route based on price and depth parameters.
  • Price Routing Relay (Backend): Responsible for calling the routing prices and depth parameters of different protocols on the chain (such as UXswap, Wefiswap), and providing the data to the aggregation protocol.
  • Frontend (UX): Provides a user interface for users to make transactions conveniently.

Function Details

  • Price Routing Relay (Backend):

    • Real-time monitoring of routing prices and depth parameters of different protocols on the chain.
    • Use algorithms to calculate the best trading route and provide it to the aggregation protocol.
    • Can be extended as needed to support more protocols.
  • Aggregation Protocol (Smart Contract):

    • Use the best trading route provided by the price routing relay to trade.
    • Relay transactions and call the target protocol to execute transactions.
    • Return the transaction results to the user.
    • Can be extended as needed to support more transaction types.
  • Frontend (UX):

    • Provide a clear and concise user interface for users to view transaction information.
    • Support users to select trading protocols and trading routes.
    • Display real-time transaction prices and depth.
    • Support users to confirm transactions and submit orders.
    • Provide transaction history query function.

Advantages

  • Better prices: By aggregating trading data from different protocols, the Subswap Swap module can provide users with better prices.
  • Higher efficiency: By using smart contracts to automatically execute transactions, the Subswap Swap module can improve transaction efficiency and reduce the number of user operation steps.
  • Stronger security: The Subswap Swap module uses smart contract technology to ensure the security and reliability of transactions.

Future Outlook

The Subswap Swap module will continue to be improved and upgraded to meet the growing needs of users. We plan to implement the following features in the future:

  • Support more trading protocols and transaction types.
  • Develop decentralized exchange functions.
  • Provide richer transaction analysis tools.

Discussion (0)