Cross-chain atomic exchange method with high fault tolerance and mobility based on market maker algorithm

By introducing high fault tolerance and liquidity solutions based on market maker algorithms in cross-chain atomic exchange technology, the shortcomings in the degree of decentralization, security, transaction efficiency and technical compatibility in the existing technology are solved, and the company has achieved the goal of achieving the problem of decentralization, security, transaction efficiency and technical compatibility in the existing technology. Efficient, secure and flexible cross-chain asset exchange.

CN119417598AActive Publication Date: 2025-02-11SHULING TECHNOLOGY (CHANGZHOU) CO LTD

Patent Information

Application Number
CN202411426866.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-02-11
Estimated Expiration
2044-10-14

AI Technical Summary

Technical Problem

The existing cross-chain atomic exchange technology has serious shortcomings in terms of decentralization, security, transaction efficiency and technical compatibility, which leads to users facing security risks, insufficient liquidity and Operational complexity and other issues.

Method used

Using a cross-chain atomic exchange method based on market maker algorithm, the high fault tolerance and liquidity of market maker algorithm is introduced, and multiple market makers are used to form a complex payment network, and users can quickly use the minimum cost maximum flow algorithm. Match ACCS orders, design smart contracts and security parameters to ensure the security of assets and transaction consistency.

Benefits of technology

It greatly improves the efficiency and success rate of asset exchange, reduces the waiting time of users and the risk of transaction failure, enhances the flexibility and applicability of transactions, ensures the security of assets and transaction consistency, and improves the decentralization of the system. degree of transformation and transaction success rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119417598A_ABST
    Figure CN119417598A_ABST
Patent Text Reader

Abstract

The invention discloses a cross-chain atomic exchange method with high fault tolerance and mobility based on a market maker algorithm, and belongs to the field of computer science and technology. According to the method, a current cross-block chain atomic exchange scene is analyzed, and a cross-chain atomic exchange technology capable of meeting high fault tolerance and on-chain mobility in a non-trust environment is provided in combination with actual block chain requirements, so that the efficiency and success rate of asset exchange are greatly improved, the waiting time of a user and the risk of transaction failure are reduced, and the user experience is improved. By introducing a partial asset exchange mode, the flexibility and applicability of the transaction are improved, and the diversified requirements of the user are better met; in addition, the safety of assets and the consistency of transactions are effectively guaranteed through customized safety parameters and intelligent contracts, and the trust of the user to the system is enhanced. And due to high mobility and fault tolerance, the system is more competitive and adaptive in a complex market environment, and can better cope with various emergencies and challenges. Compared with the prior art, the method has the advantages that the decentration degree, the transaction success rate, the number of ACCSs of services and the like are remarkably improved, and new breakthrough and progress are brought to development of the block chain field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer science and technology, and specifically to a cross-chain atomic exchange method with high fault tolerance and liquidity based on a market maker algorithm. Background Art

[0002] With the unprecedented development of cryptocurrencies, coexisting blockchains are no longer isolated islands. Exchanging cryptocurrencies between different blockchains has become one of the top applications in the blockchain field. Numerous interoperability projects have been actually deployed, forming a multi-billion dollar industry.

[0003] However, the partially centralized models of the famous decentralized exchanges (DEX) and centralized exchanges (CEX) violate the basic principles of the blockchain world and are vulnerable to security attacks. Although decentralized exchanges claim to be decentralized, in actual operation, there is often a certain degree of centralized factors. For example, their transaction matching and order management may rely on a few core nodes, which threatens the security and stability of the entire system. Once these core nodes are attacked or fail, the entire trading system may be paralyzed, and the user's assets may also be lost. Centralized exchanges have a more obvious problem of centralization. The user's assets are completely controlled by the exchange, and the exchange has absolute control over the user's assets. This not only increases the risk of user assets being misappropriated or stolen, but also makes the exchange a major target of hacker attacks. Once the exchange is hacked, the user's assets will face huge losses. In addition, the transaction processes of these exchanges are often complicated and cumbersome, and users need to go through a series of complex operations to complete the transaction, which not only increases the user's usage cost, but also reduces the efficiency of the transaction. Moreover, due to the technical differences and compatibility issues between different blockchains, the existing cross-chain exchange technology has great difficulties in implementation. For example, differences in consensus mechanisms, data structures, and encryption algorithms among different blockchains make it easy for data loss and transaction delays to occur during cross-chain exchanges. In summary, the existing cross-chain exchange model has serious deficiencies in terms of decentralization, security, transaction efficiency, and technical compatibility, and a more advanced, secure, and efficient cross-chain exchange technology is urgently needed.

[0004] As an important cornerstone of blockchain interoperability technology, Atomic Cross-chain Swaps (ACCS) have many significant problems in current applications. Related blockchain atomic swap (ACCS) solutions can generally be divided into three categories: methods based on trusted third parties, methods based on hash time lock contracts (HTLCs), and methods based on relay chains. However, these methods all have certain limitations:

[0005] (1) The trusted third party-based approach relies on a trusted third party in asset exchange, storing user assets in a trusted address or entrusting them to a trusted execution environment (TEE), which introduces significant single-point financial risks. Moreover, this solution assumes that all users own TEE, which is an expensive requirement.

[0006] (2) Although the asset exchange method based on HTLC technology can exchange assets in a trustless manner through smart contracts, it requires market makers to match the exchange, resulting in poor liquidity and hindering practical application. In addition, in the decentralized finance (DeFi) scenario, it is susceptible to exchange rate fluctuations and user offline, and its inherent "all or nothing" attribute limits its flexibility in a trustless environment.

[0007] (3) The relay chain-based approach is able to transfer assets to the intermediary link. However, the current solution requires assets to be transferred to the relay chain, resulting in high gas costs, and only supports asset exchange between permissioned blockchains and cannot be universally extended to public blockchains.

[0008] In the above traditional ACCS mode, users must manually match exchange requests off-chain and continuously monitor the status of other blockchains. This process is not only cumbersome and complicated, but also highly dependent on the user's manual operation and continuous attention, which increases the user's burden and operating costs. In addition, the lack of on-chain liquidity of ACCS is also a serious problem. Due to the lack of sufficient liquidity, the exchange of assets is often restricted, making it difficult to meet the actual needs of users, reducing the practicality and efficiency of the entire system. More importantly, the "all or nothing" attribute of ACCS greatly limits its feasibility in actual deployment and application. This means that if any minor problems or errors occur during the exchange process, the entire exchange will fail completely, causing the user's assets to be at risk, and also seriously affecting the user's experience and trust in the technology. In summary, the existing ACCS technology has serious deficiencies in terms of user operation convenience, on-chain liquidity, and fault tolerance, which greatly restricts its widespread application and development in the blockchain field.

[0009] Based on the above content, the present invention proposes a cross-chain atomic exchange method with high fault tolerance and liquidity based on the market maker algorithm to solve the above problems. The cross-chain atomic exchange technology of blockchain technology under conditions of mutual distrust is studied, and a cross-chain atomic exchange solution with high fault tolerance and liquidity is guaranteed by market makers. Summary of the invention

[0010] 1. Technical Problems to be Solved by the Present Invention

[0011] The purpose of the present invention is to propose a cross-chain atomic swap method with high fault tolerance and liquidity based on a market maker algorithm to solve the problems raised in the background technology, so that blockchain system users can safely complete the exchange of assets under the premise of mutual distrust, and greatly improve the fault tolerance and liquidity of the atomic swap process to meet more cross-chain scenario requirements.

[0012] 2. Technical solution

[0013] To achieve the above object, the present invention provides the following technical solutions:

[0014] A cross-chain atomic swap method with high fault tolerance and liquidity based on a market maker algorithm, comprising the following steps:

[0015] S1. Market maker design: Introduce an incentive-compatible market maker role for atomic swaps, which actively handles monitoring services, monitors state changes on the alternative blockchain on behalf of users, and automatically sends assets to users;

[0016] S2. Swap request matching design: Multiple market makers are used to form a complex payment network. Users can quickly find market makers and match ACCS orders through the minimum cost maximum flow (MCMF) algorithm to provide on-chain liquidity for atomic swaps.

[0017] S3. Smart contract design: Design the market maker management smart contract (BMSC) and the factory smart contract (FSC) to provide users with an excuse to query market makers and participate in the ACCS model, so that users can complete the exchange with the lowest cost and highest fault tolerance;

[0018] S4. Security parameter design: Design customized security parameters to help users balance costs and fault tolerance; use security parameters to divide assets into shares to ensure that when a market maker sends a portion of assets to others, the market maker itself also receives assets of equal value.

[0019] Preferably, the market maker management smart contract (BMSC) in S3 is used to manage the information of all market makers. The market makers can only register in the market maker management smart contract (BMSC) if they hold assets on both chains, and deposit collateral to prevent malicious behavior.

[0020] Preferably, the factory smart contract (FSC) described in S3 is used to manage the exchange requests of all users. When the user submits an exchange request, the factory smart contract (FSC) synchronizes the latest block headers on the two chains. When the exchange is successful, the Verify function is called to verify whether the transaction is successfully executed. If the exchange is successful, the information stored by the market maker in the market maker management smart contract (BMSC) is updated, including the number of successful exchanges and the amount of assets available for payment; if the exchange fails, the Judge function is called to deduct the collateral of the malicious broker.

[0021] 3. Beneficial effects

[0022] The present invention proposes a cross-chain atomic exchange method with high fault tolerance and liquidity based on the market maker algorithm, analyzes the current cross-blockchain atomic exchange scenario, and proposes a cross-chain atomic exchange technology that can meet high fault tolerance and on-chain liquidity in a mutually distrustful environment in combination with actual blockchain needs. The beneficial effects of the present invention are specifically embodied as follows:

[0023] (1) Greatly improve the efficiency and success rate of asset exchange, and reduce users' waiting time and the risk of transaction failure.

[0024] (2) By introducing the partial asset exchange model, the flexibility and applicability of transactions are increased, better meeting the diverse needs of users.

[0025] (3) Customized security parameters and smart contracts effectively ensure the security of assets and the consistency of transactions, and enhance users' trust in the system.

[0026] (4) High liquidity and fault tolerance make the system more competitive and adaptable in a complex market environment, and better able to cope with various emergencies and challenges.

[0027] (5) Compared with existing technologies, there are significant improvements in the degree of decentralization, transaction success rate, and the number of ACCS served, bringing new breakthroughs and progress to the development of the blockchain field. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A schematic diagram of a system model of a cross-chain atomic swap method with high fault tolerance and liquidity based on a market maker algorithm proposed in the present invention;

[0029] Figure 2 This is a schematic diagram of the smart contract workflow proposed by the present invention;

[0030] Figure 3 Schematic diagram of the atomic exchange workflow proposed in the present invention. DETAILED DESCRIPTION

[0031] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

[0032] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0033] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0034] See also Figure 1-3 , the present invention proposes a linear communication complexity consensus method based on DAG structure, performs exchange matching based on minimum cost maximum flow algorithm, proposes a new cross-blockchain system and a corresponding technical solution for atomic exchange thereon, and the specific implementation method is as follows:

[0035] Step 1. Market Maker Design: A novel incentive-compatible market maker role is introduced for atomic swaps. The market maker will actively handle monitoring services, monitor state changes on the alternative blockchain on behalf of the user, and automatically send assets to the user. This eliminates the need for users to own assets on both blockchains, as the designated account receiving the transferred assets does not need to perform any contract operations. Market makers need to hold assets in different networks for exchange.

[0036] Step 2: Exchange request matching design: Multiple market makers form a complex payment network. Users can quickly find market makers and match ACCS orders through the minimum cost maximum flow (MCMF) algorithm, providing on-chain liquidity for atomic swaps.

[0037] Step 3, smart contract design: To address the challenge of how to efficiently match users with participating market makers, the present invention designs a market maker management smart contract (BMSC) and a factory smart contract (FSC) to provide users with an interface for querying market makers and participating in the ACCS model, enabling users to complete exchanges at the lowest cost and with the highest fault tolerance.

[0038] Step 3.1. The Market Maker Management Smart Contract (BMSC) will manage the information of all market makers, including the address of the market maker, the rate of payment for one unit of assets, the number of successful services to ACCS, the total number of services to ACCS, and whether it is online. Market makers need to hold assets on both chains to register in the Market Maker Management Smart Contract (BMSC), and they need to deposit collateral to prevent malicious behavior.

[0039] Step 3.2, the Factory Smart Contract (FSC) will manage all users' exchange requests. When the user submits an exchange request, the Factory Smart Contract (FSC) will synchronize the latest block headers on the two chains. When the exchange is successful, the Verify function will be called to verify whether the transaction is successfully executed. If successful, the information stored by the market maker in the Market Maker Management Smart Contract (BMSC) will be updated, including the number of successful exchanges and the amount of assets available for payment. When the exchange fails, the Judge function will be called to deduct the collateral of the malicious broker.

[0040] Step 4: Security parameter design: To address the challenge of how to ensure consistency in asset transfers when multiple market makers are involved, the present invention designs customized security parameters to help users balance cost and fault tolerance. Dividing assets into shares ensures that when a market maker sends a portion of assets to others, they will also receive assets of equal value.

[0041] The following is an explanation of a cross-chain atomic swap method with high fault tolerance and liquidity based on a market maker algorithm proposed in the present invention with reference to specific examples and accompanying drawings. The specific contents are as follows.

[0042] Embodiment 1:

[0043] The linear communication complexity consensus method based on DAG structure proposed in this invention is applied to multiple different inter-chain exchange assets, such as trusted transfer between two banks, data exchange between medical systems, etc. The specific examples are as follows.

[0044] Step 1: Preparation

[0045] Step 1-1: The market maker registers its exchange information on the Market Maker Management Smart Contract (BMSC), including the address of the market maker, the rate of payment for one unit of asset, the number of successful service ACCS, the total number of service ACCS, and whether it is online.

[0046] Step 1-2: The atomic swap participants use the query interface of BMSC to find the list of market makers that are currently online and can perform swaps. This process is performed through the minimum cost maximum flow algorithm. Specifically, the DFS algorithm is used to find the augmenting path first, and then the augmenting path with the minimum total payment fee and the maximum flow is returned to the user. The user matches the swap graph based on this result.

[0047] Step 2: Locking Phase

[0048] Step 2-1: The user calls the Factory Smart Contract (FSC) to generate an exchange request. The request content includes the ID and address of the market makers participating in the exchange. When there are n=3 market makers participating in the exchange, the Factory Smart Contract (FSC) will remotely call the Market Maker Management Smart Contract (BMSC) and increase the number of participations of the market makers participating in the exchange by one. After that, the user can split the assets to be transferred into n equal parts and lock them in the Factory Smart Contract (FSC) using a time lock.

[0049] Step 3: Exchange Phase

[0050] Step 3-1: When all participants lock their assets in the Factory Smart Contract (FSC), the market maker will actively transfer the assets to the receiving address specified by the participants.

[0051] Step 3-2: When step 3-1 is completed, the market maker can submit the transfer transaction to the factory smart contract (FSC) for verification. The factory smart contract (FSC) will synchronize the latest block header on another blockchain, and verify whether the Merkle proof provided by the market maker and the amount of the transfer are equal to the request submitted by the user. If both are true, the user's locked assets can be transferred to the market maker. At this time, the exchange is completed, and the market maker who successfully executes the exchange will get the corresponding tip and increase his successful execution of the exchange in the market maker management smart contract (BMSC).

[0052] Step 3-3: If there is a market maker that does not execute the exchange correctly in step 3-2, as a participant, you first need to retrieve the assets locked in the Factory Smart Contract (FSC), and then you can submit a transaction to retrieve the assets to the Market Maker Management Smart Contract (BMSC), which will deduct the market maker’s collateral as a penalty.

[0053] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and improved concepts of the present invention within the technical scope disclosed by the present invention, and they should be covered by the protection scope of the present invention.

Claims

1. A cross-chain atomic swap method with high fault tolerance and liquidity based on a market maker algorithm, characterized in that: The steps include: S1. Market maker design: Introduce an incentive-compatible market maker role for atomic swaps, which actively handles monitoring services, monitors state changes on the alternative blockchain on behalf of users, and automatically sends assets to users; S2. Exchange request matching design: Multiple market makers are used to form a complex payment network. Users can quickly find market makers and match ACCS orders through the minimum cost maximum flow algorithm to provide on-chain liquidity for atomic swaps. S3. Smart contract design: Design market maker management smart contracts and factory smart contracts to provide users with an excuse to query market makers and participate in the ACCS model, so that users can complete exchanges at the lowest cost and highest fault tolerance; S4. Security parameter design: Design customized security parameters to help users balance cost and fault tolerance; The security parameters are used to divide the assets into equal shares, ensuring that when the market maker sends a portion of the assets to others, the market maker itself also receives an equal value of assets.

2. A cross-chain atomic swap method with high fault tolerance and liquidity based on a market maker algorithm according to claim 1, characterized in that: The market maker management smart contract described in S3 is used to manage the information of all market makers. The market makers can only be registered in the market maker management smart contract if they hold assets on both chains, and deposit collateral to prevent malicious behavior.

3. A cross-chain atomic swap method with high fault tolerance and liquidity based on a market maker algorithm according to claim 2, characterized in that: The factory smart contract described in S3 is used to manage the exchange requests of all users. When the user submits an exchange request, the factory smart contract synchronizes the latest block headers on the two chains. When the exchange is successful, the Verify function is called to verify whether the transaction is successfully executed. If the exchange is successful, the information stored by the market maker in the market maker management smart contract is updated, including the number of successful exchanges and the amount of assets available for payment; If the exchange fails, the Judge function is called to deduct the malicious broker's collateral.

Citation Information

Patent Citations

  • Cross-currency settlement method and device based on blockchain, and electronic equipment

    CN111815309A

  • Token transaction method and device based on blockchain, electronic equipment and storage medium

    CN112435121A

  • Novel carbon transaction method, device and platform based on automatic market maker

    CN115545915A

  • Cross-chain transfer method, computer equipment and storage medium

    CN115936696A

  • Block chain protocol verification platform supporting multiple consensus protocols and cross-fragmentation mechanism

    CN116582244A

Cited By

  • Risk transaction identification method and device, and computer program product

    CN121547283A

  • A method, apparatus and computer program product for identifying risky transactions

    CN121547283B