Processing method and device for matchmaking transaction in block chain

By introducing an unpredictable but publicly verifiable random factor into the blockchain to determine the matching priority, and generating a settlement transaction for verification after the matching is completed, the single point of trust assumption and high gas fee problem caused by centralized matching engines are solved, and the auditability and fairness of matching transactions are improved.

CN121746069APending Publication Date: 2026-03-27WEBANK (CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511800553.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-02
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In existing blockchain-based transaction matching, the order matching process is decided by a centralized component, which makes it impossible for users to verify the information. This results in a single point of trust and a point of failure, and the gas fees are also high.

Method used

Matching orders are determined by matching nodes in the blockchain. An unpredictable but publicly verifiable random factor is introduced to determine the matching priority. Settlement transactions are generated when conditions are met, including matching proof and net settlement. Verification nodes verify these transactions before they are uploaded to the blockchain.

Benefits of technology

It improves the auditability of matched transactions, avoids unfairness issues, reduces gas fees, and ensures the fairness and reliability of transactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121746069A_ABST
    Figure CN121746069A_ABST
Patent Text Reader

Abstract

The invention relates to the field of block chains, and discloses a processing method and device for matchmaking transactions in a block chain, and the method comprises the steps: enabling a matchmaking node to determine at least one matchmaking order meeting a first price limit order from all second price limit orders; when the matchmaking node meets the transaction triggering condition, the matchmaking node generates settlement transactions according to the matchmaking orders; the verification node verifies the matchmaking proof of each matchmaking order and the net settlement of each matchmaking order in the settlement transaction, and generates a matchmaking verification abstract and a settlement verification abstract after the verification is passed; and the verification node links the settlement transaction, the matchmaking verification abstract and the settlement verification abstract. Through the mode, the problem of unfair order matching can be avoided, it is ensured that a settlement transaction formed by multiple matching orders can be verified, and the auditing performance of block chain transactions is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of blockchain technology, and in particular to a method and apparatus for processing matching transactions in a blockchain. Background Technology

[0002] With the development of computer technology, more and more technologies are being applied in the financial field, and the traditional financial industry is gradually transforming into Fintech. However, due to the security and real-time requirements of the financial industry, higher demands are being placed on technology, and blockchain technology is no exception.

[0003] Taking the DYDX V4 chain as an example, orders can be matched in the following way: First, users submit orders to the off-chain centralized matching engine. Then, the centralized matching engine maintains the order book in memory and matches orders in real time. Next, the centralized matching engine periodically summarizes the matching results as changes in net balance. Finally, the centralized matching engine submits the summarized results as a single transaction to the DYDX V4 chain for final settlement.

[0004] For the order matching scheme above, because the order matching process is decided by a centralized component, users cannot verify it. The off-chain centralized matching engine becomes a single point of trust assumption and a point of failure. Summary of the Invention

[0005] This application provides a method for processing matched transactions in a blockchain, which verifies the integrity of matched transactions in the blockchain and improves the auditability of the order matching process.

[0006] In a first aspect, embodiments of this application provide a method for processing matched transactions in a blockchain. The method includes: a matching node determining at least one matched order from a set of second limit orders that satisfies a first limit order; each matched order includes a matching proof with matching priority; the matching node is any node in the blockchain; when a transaction triggering condition is met, the matching node generates a settlement transaction based on each matched order; the settlement transaction includes the matching proof of each matched order and the net settlement of each matched order; the net settlement represents the change in the account value of the transaction account corresponding to each matched order; a verification node verifies the matching proof of each matched order and the net settlement of each matched order in the settlement transaction, and generates a matching verification summary and a settlement verification summary after successful verification; the verification node is any node in the blockchain; the verification node uploads the settlement transaction, the matching verification summary, and the settlement verification summary to the blockchain.

[0007] In the above scheme, since the matching nodes determine the objects to be matched with the first limit order from each second limit order according to the matching priority, and form a matching order after each matching transaction is completed, the matching proof with matching priority included in the matching order can be used by blockchain nodes that want to verify the matching transaction to verify the matching process, avoiding unfairness in order matching. In addition, by reporting each matching order that occurs during this period as a settlement transaction to the blockchain only when the transaction triggering condition is met, the practice of reporting to the blockchain after each matching order is completed is avoided, which significantly reduces the gas fees to be paid for each matching. Finally, by verifying the matching proof of each matching order in the settlement transaction and the net settlement of each matching order, after both aspects are verified, the settlement transaction, the verified matching verification summary and the settlement verification summary can be uploaded to the blockchain, ensuring that the settlement transaction consisting of multiple matching orders can be verified, and improving the auditability of blockchain transactions.

[0008] In one possible implementation, the matching node determines at least one matching order from the various second limit orders that satisfies the first limit order, including: the matching node, for the first limit order, obtains each of the second limit orders within a preset order matching window; wherein each second limit order has a different transaction direction from the first limit order and the order price of each second limit order satisfies the price requirement of the first limit order; for any second limit order, the matching node determines the matching priority of the second limit order based on the order price of the second limit order, the order submission time of the second limit order, and the corresponding random factor of the second limit order; wherein the random value is unpredictable but publicly verifiable; the matching node matches the second limit orders with the first limit order according to their matching priorities, thereby forming at least one matching order.

[0009] The above scheme describes how to form a matching order. In addition to considering time and price factors when forming a matching order, this application also considers introducing an unpredictable but publicly verifiable random factor to determine the matching priority of the order. This allows any node in the blockchain that wants to verify the fairness of the order matching to recalculate the matching priority and compare the calculated matching priority with the matching priority formed during the order matching period. Based on the comparison result, it can be determined whether the matching node acted maliciously during the order matching period.

[0010] In one possible implementation method, determining the matching priority of the second limit order based on its order price, order submission time, and corresponding random value includes: the matching node generating a corresponding random factor for the second limit order; the matching node determining a price factor for the second limit order based on its order price; wherein, if the trading direction of the second limit order is selling, the lower the selling price, the larger the price factor; and if the trading direction of the second limit order is buying, the higher the buying price, the larger the price factor; the matching node determining a time factor for the second limit order based on its order submission time; wherein, the earlier the order submission time, the larger the time factor; and the matching node determining the matching priority of the second limit order based on its random factor, price factor, time factor, and their respective weights.

[0011] The above scheme explains in detail how the matching priority of each second limit order is determined when the application matches the first limit order. The matching priority refers to the order in which orders are matched; second limit orders with higher matching priority are matched with the first limit order first, and vice versa. For example, this application considers the order price, order submission time, and randomness (corresponding to the random factor) of the second limit order. A weighted sum of these three factors yields a score for the limit order. Finally, by comparing the scores of each second limit order, the matching priority is determined; a higher score indicates a higher matching priority.

[0012] In one possible implementation method, when the transaction triggering condition is met, the matching node generates a settlement transaction based on each matched order, including: the matching node obtains each matched order when the matching reporting time arrives or the number of matched orders meets the reporting requirements; the matching node uses the changes in account value of the trading account with the trading direction of buying and the changes in account value of the trading account with the trading direction of selling in each matched order as net settlement; the matching node combines the matching proof of each matched order and the net settlement to form a settlement transaction.

[0013] The above-mentioned solution first introduces that this application forms a settlement transaction by combining various matched orders within a certain period of time or by matching orders that meet a certain number of requirements. Subsequently, by uploading the settlement transaction to the blockchain, it avoids uploading each matched order within a certain period of time or each matched order that meets a certain number of requirements to the blockchain separately. Obviously, the former solution is more resource-efficient. In addition, this application calculates the changes in the account value of the trading account with the trading direction of buying and the changes in the account value of the trading account with the trading direction of selling as net settlement, which helps to check the integrity of the matched orders from the perspective of the changes in the account value of the trading accounts of both parties.

[0014] In one possible implementation method, the verification node verifies the matching proof of each matched order in the settlement transaction, including: the verification node obtains the order prices of both parties in each matched order from the settlement transaction, and verifies whether the order price of a limit order with a buy direction is greater than or equal to the order price of a limit order with a sell direction, or verifies whether the order price of a limit order with a sell direction is less than or equal to the order price of a limit order with a buy direction; the verification node obtains the random factor generation proof in each matched order, determines the verification random factor of each matched order based on the random factor generation proof, and verifies the consistency of each verification random factor with the random factor in each matched order; the verification node obtains the order price and order submission time of each second limit order in each matched order and determines the verification price factor and verification time factor, determines the verification matching priority of each second limit order based on the verification random factor, verification price factor, verification time factor, and their respective weights, and verifies the consistency of each verification matching priority with the matching priority in each matched order.

[0015] The above scheme details how to verify the matching proof of each matched order, which includes checking the matching of order prices between the two parties, checking the random factor, and checking the matching priority.

[0016] In one possible implementation method, the verification node verifies the net settlement of each matched order in the settlement transaction, including: the verification node obtains from the settlement transaction whether the decrease in the transaction amount of each matched order with the transaction direction of buying is consistent with the increase in the transaction amount of each matched order with the transaction direction of selling; the verification node obtains whether the increase in the transaction quantity of each matched order with the transaction direction of buying is consistent with the decrease in the transaction quantity of each matched order with the transaction direction of selling.

[0017] The above scheme details how to verify the net settlement of each matched order, which is divided into verification of transaction amount and verification of transaction quantity.

[0018] In one possible implementation method, after the verification is passed, a matching verification digest and a settlement verification digest are generated, including: the verification node hashing the concatenation result of each matching proof and the settlement verification digest represented by placeholders, and using the resulting first hash result as the initial matching verification digest; the verification node hashing the concatenation result of the net settlement and the first hash result, and using the resulting second hash result as the initial settlement verification digest; the verification node hashing the concatenation result of each matching proof and the initial settlement verification digest, and using the resulting third hash result as the matching verification digest; and the verification node hashing the concatenation result of the net settlement and the initial matching verification digest, and using the resulting fourth hash result as the settlement verification digest.

[0019] The above scheme describes how to determine the matching verification summary and settlement verification summary after successful verification through cross-referencing.

[0020] Secondly, embodiments of this application provide a processing apparatus for matching transactions in a blockchain. The apparatus includes: an order matching unit, configured to determine at least one matching order from each second limit order that satisfies a first limit order; each matching order includes a matching proof with matching priority; the matching node is any node in the blockchain; a settlement transaction generation unit, configured to generate a settlement transaction based on each matching order when a transaction triggering condition is met; the settlement transaction includes the matching proof of each matching order and the net settlement of each matching order; the net settlement represents the change in the account value of the transaction account corresponding to each matching order; a verification unit, configured to verify the matching proof of each matching order and the net settlement of each matching order in the settlement transaction, and generate a matching verification summary and a settlement verification summary after successful verification; the verification node is any node in the blockchain; and an on-chain unit, configured to upload the settlement transaction, the matching verification summary, and the settlement verification summary to the blockchain.

[0021] Thirdly, embodiments of this application provide a computing device, including: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute any implementation method of the first aspect according to the obtained program.

[0022] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform any implementation method as described in the first aspect.

[0023] Fifthly, embodiments of this application provide a computer program product, the computer program product including computer-executable instructions, the computer-executable instructions being used to cause a computer to perform any implementation method as described in the first aspect. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 This is a schematic diagram of a blockchain structure applicable to the embodiments of this application; Figure 2 A schematic diagram illustrating a blockchain-based transaction matching method provided in an embodiment of this application; Figure 3 A schematic diagram of a blockchain matching transaction processing device provided in an embodiment of this application; Figure 4 This is a schematic diagram of a computing device provided in an embodiment of this application. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0027] refer to Figure 1 This is a schematic diagram of a blockchain structure applicable to an embodiment of this application. Figure 1 The blockchain shown can be used to execute the transaction matching processing method in the blockchain of this application. The schematic diagram includes multiple blockchain nodes as an example. Figure 1 Including node 1, node 2, node 3, node 4, node 5 and node 6, any blockchain node can be either a matching node or a verification node in this application scheme.

[0028] based on Figure 1 The diagram shown illustrates the structure of a blockchain. This application embodiment provides a flowchart of a method for processing matching transactions in a blockchain, as follows: Figure 2 As shown, the process of this method is as follows: Figure 1 The execution of each node shown includes the following steps: Step 201: The matching node determines at least one matching order from each of the second limit orders that satisfies the first limit order.

[0029] Each matched order includes a matching proof with matching priority; the matching node is any node in the blockchain.

[0030] For example, combining Figure 1 The matching node can be Figure 1 Any one of the nodes 1, 2, 3, 4, 5, and 6 in the list.

[0031] In this process, the matching node receives numerous limit orders during order matching. Each received limit order can be designated as the first limit order. Once the first limit order is determined, the second limit orders are subsequently determined. In one possible implementation, each second limit order has a different trading direction from the first limit order, and the order price of each second limit order satisfies the price requirement of the first limit order.

[0032] For example, take the trading pair formed by P coin / Q coin on a decentralized spot trading platform as an example. This trading pair can be interpreted as: using P coin as the asset and Q coin as the trading price unit, and performing buy and sell operations on both.

[0033] Prior to implementing the proposed solution, the decentralized spot trading platform was in the following initial state: User Alice's account: Q-coin balance = 100,000; User Bob's account: P-coin balance = 2.0; User Carol's account: P-currency balance = 1.5.

[0034] Next, at time T0, Alice submits the purchase order Order_A1: { "order_id": "Order_A1", "type": "BUY", "pair": "P-coin / Q-coin", "price": 60000, "quantity": 1.5, "timestamp": "T0", "user_signature": "Sig_Alice } For order_A1, the matching node needs to verify the completeness of the order format, the validity of Alice's signature, and whether Alice's Q-coin balance is sufficient. Assuming the matching node passes the verification, confirming the order format is complete and Alice's signature is valid, and considering the value of order_A1, based on the order price of 60,000 and the purchase quantity of 1.5, Alice needs to spend a maximum of 60,000 × 1.5 = 90,000. Since 90,000 is less than Alice's Q-coin balance of 100,000, Alice's Q-coin balance is sufficient in this example. Therefore, after the matching node verifies order_A1, it can add order_A1 to the order queue, which contains individual orders awaiting matching. This application assumes order_A1 is the first limit order.

[0035] Next, at time T0+1, Bob submits a sell order Order_B1: { "order_id": "Order_B1", "type": "SELL", "pair": "P-coin / Q-coin", "price": 59800, "quantity": 1.0, "timestamp": "T0+1", "user_signature": "Sig_Bob" } And, assuming that at time T0+2, Carol submits a sell order Order_C1: { "order_id": "Order_C1", "type": "SELL", "pair": "P-coin / Q-coin", "price": 59900, "quantity": 0.8, "timestamp": "T0+2", "user_signature": "Sig_Carol" } For sell orders Order_B1 and Order_C1, the matching node must also verify the completeness of their formats, the validity of their signatures, and the sufficiency of the P-coin balance in both orders. Taking the verification of sell order Order_B1 as an example, assuming the matching node passes the verification, confirming that its order format is complete, Bob's signature is valid, and since the amount of P-coins Bob wrote to sell in order_B1 (1.0) is less than Bob's P-coin balance, Bob's P-coin balance is sufficient in this example. Therefore, after the matching node verifies sell order_B1, it can add it to the sell order queue, which contains sell orders awaiting matching. This application assumes that sell order_B1 is a second-limit order.

[0036] Similarly, this application assumes that the sell order Order_C1 has also passed the verification of the matching node, and assumes that the sell order Order_C1 is yet another second limit order.

[0037] In this example, the matching node needs to identify at least one sell order from the sell orders Order_B1 and Order_C1 to match the buy order Order_A1. After one or more sell orders are matched with the buy order Order_A1, a matched order can be constructed based on this set of successfully matched orders.

[0038] Regarding how a matching node determines at least one matching order from multiple second limit orders that satisfies the first limit order, one possible method involves the matching node determining at least one matching order from each second limit order, including: the matching node acquiring each second limit order within a preset order matching window for the first limit order; wherein each second limit order has a different transaction direction from the first limit order and the order price of each second limit order satisfies the price requirement of the first limit order; the matching node determining the matching priority of any second limit order based on the order price of the second limit order, the order submission time of the second limit order, and the corresponding random factor of the second limit order; wherein the random value is unpredictable but publicly verifiable; and the matching node matching the second limit order with the first limit order according to the matching priority of each second limit order, thereby forming at least one matching order.

[0039] For example, continuing with the previous examples of buy order_A1, sell order_B1, and sell order_C1, the matching node, for the buy order_A1 (which is the first limit order), can retrieve all the second limit orders within a preset order matching window. The preset order matching window can be measured by a set time or a set quantity. Furthermore, each second limit order must satisfy the following conditions: the transaction direction of each second limit order is different from that of the first limit order, and the order price of each second limit order meets the price requirement of the first limit order.

[0040] For example, suppose the preset order matching window is measured by a set time period. For the buy order Order_A1 mentioned earlier, since it was submitted at time T0, a 5-minute limit is set. This allows us to retrieve all sell orders submitted within the time period T0 + 5 minutes. Next, for these sell orders, the matching node needs to verify the transaction direction and order price. Since these are all sell orders with different transaction directions than the buy order Order_A1, the matching node only needs to identify sell orders with prices less than or equal to the buy order Order_A1. Only these identified sell orders can be used as the second limit orders. The set time period is not limited to 5 minutes.

[0041] For example, suppose the preset order matching window is measured by a set quantity. For the buy order Order_A1 mentioned earlier, since it was submitted at time T0, we set a limit of 100 sell orders. This allows us to obtain the 100 sell orders most recently submitted after time T0. Next, for these sell orders, the matching node needs to verify the transaction direction and order price. Since these are all sell orders with different transaction directions than the buy order Order_A1, the matching node only needs to identify sell orders with prices less than or equal to the buy order Order_A1. Only these identified sell orders can be used as the second limit orders. The set quantity is not limited to 100.

[0042] It should be noted that, since this application exemplifies using a buy order (Order_A1) with a buy direction as the first limit order, when determining the second limit order, it is necessary to control that the transaction direction of the second limit order is sell and that the order price of the second limit order is less than or equal to the order price of the first limit order. Conversely, when using a sell order with a sell direction as the first limit order, when determining the second limit order, it is necessary to control that the transaction direction of the second limit order is buy and that the order price of the second limit order is greater than or equal to the order price of the first limit order.

[0043] In this embodiment, for the sake of simplicity and convenience in explaining the scheme, it is assumed that the sell orders Order_B1 and Order_C1 are the second limit orders within a preset order matching window. Since there are two second limit orders, the matching node needs to calculate the matching priority of each second limit order. The matching node can determine the matching priority of each second limit order based on its order price, order submission time, and corresponding random factor. After calculating the matching priority, the matching node matches the second limit orders with the first limit orders according to their matching priorities, thereby forming at least one matched order.

[0044] Regarding how the matching node specifically calculates the matching priority of each second limit order, in one possible implementation method, determining the matching priority of the second limit order based on its order price, order submission time, and corresponding random value includes: the matching node generating a corresponding random factor for the second limit order; the matching node determining a price factor for the second limit order based on its order price; wherein, if the trading direction of the second limit order is selling, the lower the selling price, the larger the price factor; if the trading direction of the second limit order is buying, the higher the buying price, the larger the price factor; the matching node determining a time factor for the second limit order based on its order submission time; wherein, the earlier the order submission time, the larger the time factor; and the matching node determining the matching priority of the second limit order based on its random factor, price factor, time factor, and their respective weights.

[0045] For example, continuing from the previous example of sell orders Order_B1 and Order_C1 being the second limit orders within the preset order matching window, the matching node can generate random factors for the two sell orders using a Verifiable Delay Function (VDF), and set the random factors for sell orders Order_B1 and Order_C1 to be 0.37 and 0.62, respectively. Then, the matching node obtains the order prices of the two sell orders. Since the order price of sell order_B1 is slightly lower than that of sell order_C1, the matching node can determine the price factors of sell order_B1 and sell order_C1 respectively. The price factor of sell order_B1 needs to be slightly greater than that of sell order_C1. Let's set the price factor of sell order_B1 to 0.6 and the price factor of sell order_C1 to 0.55. The matching node also obtains the order submission times of the two sell orders. Since the order submission time of sell order_B1 is slightly earlier than that of sell order_C1, the matching node can determine the time factors of sell order_B1 and sell order_C1 respectively. The time factor of sell order_B1 needs to be slightly greater than that of sell order_C1. Let's set the time factor of sell order_B1 to 0.9 and the price factor of sell order_C1 to 0.8. Next, the matching node can calculate the matching priority of sell orders Order_B1 and Order_C1 based on preset weights for the random factor, price factor, and time factor, respectively, with weights set to 0.5, 0.3, and 0.2. If the matching priority of sell order_B1 is represented as P_B1, then: P_B1 = 0.5×0.6 + 0.3×0.9 + 0.2×0.37 = 0.644 If the matching priority of sell order_C1 is represented as P_C1, then: P_C1 = 0.5×0.55 + 0.3×0.8 + 0.2×0.62 = 0.639 Clearly, because P_B1 is greater than P_C1, the matching node will perform the first round of matching between the sell order Order_B1 and the buy order Order_A1. The matching details are as follows: Transaction price: 59,800 Q coins / P coins; Transaction quantity: min(1.5, 1.0) = 1.0 P currency; Transaction amount: 59,800 Q coins.

[0046] In simple terms, Alice spent 59,800 Q coins to buy 1.0 P coins that Bob sold.

[0047] After matching the sell order Order_B1 and the buy order Order_A1, the matching node generates a matching proof for that order, which contains the matching priority. For example, for the matched order Order_B1 and buy order Order_A1, since this is the first order matching, the corresponding matching proof can be represented as MatchProof_1, where the content of MatchProof_1 can be represented as follows: MatchProof_1: { "match_id": "Match_001", "timestamp": "T0+2", "buy_order": "Order_A1", "sell_order": "Order_B1", "match_price": 59800, "match_quantity": 1.0, "priority_calculation": { "P_B1": 0.644, "vdf_proof": { "input": "seed_12345", "output": "0xabc...", "proof": "0xdef..." }, "parameters": {"α": 0.5, "β": 0.3, "γ": 0.2} }, "taker": "Alice", "maker": "Bob" } Following the same matching logic, suppose that when the matching node performs the second order matching, it matches the sell order Order_C1 with the buy order Order_A1, and after the second order matching, the matching content is as follows: Transaction price: 59,900 Q coins / P coins; Transaction quantity: 0.5P currency; Transaction amount: 29,950 Q coins.

[0048] In simple terms, Alice spent 29,950 Q coins to buy 0.5 P coins from Carol, thus fulfilling Alice's order to buy 1.5 P coins.

[0049] After the matching node completes the matching of the sell order Order_C1 and the buy order Order_A1, it will generate a matching proof MatchProof_2 for the matched order. MatchProof_2 contains the matching priority 0.639. The specific content of MatchProof_2 can be found in MatchProof_1, which is omitted here.

[0050] Matching nodes can cache each matching proof locally.

[0051] Step 202: When the transaction triggering conditions are met, the matching node generates a settlement transaction based on each matched order.

[0052] The settlement transaction includes the matching certificate for each matched order and the net settlement for each matched order; the net settlement represents the change in the account value of the trading account corresponding to each matched order.

[0053] In one possible implementation method, when the transaction triggering condition is met, the matching node generates a settlement transaction based on each matched order, including: the matching node obtains each matched order when the matching reporting time arrives or the number of matched orders meets the reporting requirements; the matching node uses the changes in account value of the trading account with the trading direction of buying and the changes in account value of the trading account with the trading direction of selling in each matched order as net settlement; the matching node combines the matching proof of each matched order and the net settlement to form a settlement transaction.

[0054] For example, referring to the previous example of the matching node matching sell orders Order_B1 and Order_C1 (which are the second limit orders) with the first limit order Order_A1, assuming that time T0+5 minutes or 100 orders arrive, the matching node can retrieve the matching proofs of each matched order completed during this period from its local cache. Based on the matching proofs of each matched order, it calculates the change in account value of the trading account for the buy order Order_A1 (which is a buy order) and the change in account value of the trading account for the sell orders Order_B1 and Order_C1 (which are sell orders). These two changes are then combined as the net settlement. Referring to the previous example, this net settlement can be presented in Table 1 below:

[0055] Table 1

[0056] Finally, the matching node can combine the matching proofs and net settlements of each matched order into a settlement transaction, which is designated as Batch_T0. The specific content of settlement transaction Batch_T0 can be represented as follows: { "batch_id": "Batch_T0_001", "time_window": "T0 to T0+5", "match_count": 2, "net_changes": [ {"account": "Alice", "P currency": +1.5, "Q currency": -89750}, {"account": "Bob", "P currency": -1.0, "Q currency": +59800}, {"account": "Carol", "P currency": -0.5, "Q currency": +29950} ], "match_proofs": ["MatchProof_1", "MatchProof_2"] } Finally, the matching node can make each of the generated settlement transactions public.

[0057] Step 203: The verification node verifies the matching proof of each matched order and the net settlement of each matched order in the settlement transaction. After the verification is successful, a matching verification summary and a settlement verification summary are generated.

[0058] The verification node can be any node in the blockchain.

[0059] Combination Figure 1 In the blockchain structure shown, the verification nodes in this application can be Figure 1 Any one of the nodes 1, 2, 3, 4, 5, and 6 in the structure.

[0060] Because the matching node publishes each settlement transaction, the validator node can obtain the published settlement transaction. Referring to the previous example, the matching node publishes the settlement transaction Batch_T0, so the validator node can obtain the published settlement transaction Batch_T0. Specifically, the validator node can obtain the matching proof MatchProof_1, the matching proof MatchProof_2, and all the contents shown in Table 1 above.

[0061] After the verification node obtains the MatchProof_1, MatchProof_2, and all the contents shown in Table 1 above, it can verify the fairness of the matching node in matching each second limit order with the first limit order. That is, the verification node wants to verify whether the matching node maliciously matched the second limit order that should not have been matched first with the first limit order. On the other hand, the verification node can also verify the completeness of each matched order covered by this settlement transaction. That is, the verification node wants to verify whether the matching node has omitted any matched orders that actually occurred from being written into the settlement transaction.

[0062] In one possible implementation method, the verification node verifies the matching proof of each matched order in the settlement transaction, including: the verification node obtains the order prices of both parties in each matched order from the settlement transaction, and verifies whether the order price of a limit order with a buy direction is greater than or equal to the order price of a limit order with a sell direction, or verifies whether the order price of a limit order with a sell direction is less than or equal to the order price of a limit order with a buy direction; the verification node obtains the random factor generation proof in each matched order, determines the verification random factor of each matched order based on the random factor generation proof, and verifies the consistency of each verification random factor with the random factor in each matched order; the verification node obtains the order price and order submission time of each second limit order in each matched order and determines the verification price factor and verification time factor, determines the verification matching priority of each second limit order based on the verification random factor, verification price factor, verification time factor, and their respective weights, and verifies the consistency of each verification matching priority with the matching priority in each matched order.

[0063] For example, following the previous example, for the first matched order in a settlement transaction—the matched sell order Order_B1 and buy order Order_A1—the verification node can obtain the order price of buy order_A1 (60,000) and sell order_B1 (59,800) from the matching proof MatchProof_1 corresponding to this order. Clearly, the buy order price of 60,000 is greater than the sell order price of 59,800, satisfying the condition that the buy order price is greater than or equal to the sell order price. The verification node can obtain the random factor generation proof (vdf_proof) from MatchProof_1 and, based on this proof, determine the verification random factor used when matching sell order_B1 and buy order_A1. The verification node then performs a consistency comparison between its calculated verification random factor and the random factor in MatchProof_1. The verification node can obtain the order price and order submission time of the sell order Order_B1 from the matching proof MatchProof_1, and calculate the corresponding verification price factor and verification time factor based on the two. Finally, the verification node determines the verification matching priority of the sell order Order_B1 by calculating the verification random factor, verification price factor, verification time factor and their respective weights according to the matching priority calculation method. The verification node can then perform a consistency comparison between the verification matching priority and the matching priority P_B in the matching proof MatchProof_1.

[0064] Similarly, the verification node can also verify the matching proof MatchProof_2. After the verification node has verified both MatchProof_1 and MatchProof_2, it can also compare their verification matching priorities to determine whether they meet the matching priority ordering of the matching node when matching orders.

[0065] In one possible implementation method, the verification node verifies the net settlement of each matched order in the settlement transaction, including: the verification node obtains from the settlement transaction whether the decrease in the transaction amount of each matched order with the transaction direction of buying is consistent with the increase in the transaction amount of each matched order with the transaction direction of selling; the verification node obtains whether the increase in the transaction quantity of each matched order with the transaction direction of buying is consistent with the decrease in the transaction quantity of each matched order with the transaction direction of selling.

[0066] For example, combining the previous example, the verification node can obtain the data in Table 1 and verify that the transaction amount of Alice's account (which traded in the buy direction) decreased by a total of 89,750, while the transaction amount of Bob and Carol's accounts (which traded in the sell direction) increased by a total of 89,750. The decrease in the former is exactly equal to the increase in the latter. It can also verify that the transaction quantity of Alice's account increased by a total of 1.5, while the transaction amount of Bob and Carol's accounts decreased by a total of 1.5. The increase in the former is exactly equal to the decrease in the latter. Therefore, the verification node can determine that the net settlement in the settlement transaction has passed verification.

[0067] In one possible implementation method, after the verification is passed, a matching verification digest and a settlement verification digest are generated, including: the verification node hashing the concatenation result of each matching proof and the settlement verification digest represented by placeholders, and using the resulting first hash result as the initial matching verification digest; the verification node hashing the concatenation result of the net settlement and the first hash result, and using the resulting second hash result as the initial settlement verification digest; the verification node hashing the concatenation result of each matching proof and the initial settlement verification digest, and using the resulting third hash result as the matching verification digest; and the verification node hashing the concatenation result of the net settlement and the initial matching verification digest, and using the resulting fourth hash result as the settlement verification digest.

[0068] For example, following the previous example, suppose the verification node first verifies the matching proofs of each matched order in the settlement transaction. Upon successful verification, the verification node can hash the concatenation result of each matching proof and the settlement verification digest represented by placeholders, and use the first hash result as the initial matching verification digest. In this application, the initial matching verification digest is denoted as HM, and the calculation of HM is as follows: HM=Hash(MatchProof_1 MatchProof_2 / / HS) In this context, based on the previous example, let's assume the following input data is used in HM: MatchProof_1: Match_001;Order_A1;Order_B1;59800;1.0;0.644;seed_12345;0xabc...;0xdef... MatchProof_2: Match_002;Order_A1;Order_C1;59900;0.5;0.639;seed_12346;0xghi...;0xjkl... And, placeholders are used to represent the settlement verification summary as follows: 0x00000000000000000000000000000000000000000000000000000000000000 The various input data can be combined to form HM_input, which can be represented as follows: "Match_001;Order_A1;Order_B1;59800;1.0;0.644;seed_12345;0xabc...;0xdef...;Match_002;Order_A1;Order_C1;59900 " Suppose that, through hash calculation, HM = Keccak256(HM_input) = 0x1a2b3c4d5e6f78901234567890123456789012345678901234567890123456789012345678.

[0069] 0x1a2b3c4d5e6f78901234567890123456789012345678901234567890123456789012345678 is the first hash result, which is also the initial matching verification digest.

[0070] Next, assuming the verification node has also verified the net settlement of each matched order in the settlement transaction, upon successful verification, the verification node can hash the concatenation result of the net settlement and the first hash result to obtain a second hash result, which serves as the initial settlement verification digest. For example: Net Changes: Alice:+1.5,-89750;Bob:-1.0,+59800;Carol:-0.5,+29950 First hash result: 0x1a2b3c4d5e6f7890123456789012345678901234567890123456789012345678 Let the initial settlement summary be HS, then HS = Hash(NetChanges / / HM) Based on the net settlement and the first hash result, HS_input can be constructed as follows: Alice:+1.5,-89750;Bob:-1.0,+59800;Carol:-0.5,+29950;0x1a2b3c4d5e6f7890123456789012345678901234567890123456789012345678" Then HS = Keccak256(HS_input) =0x4d5e6f78901a2b3c4d5e6f78901a2b3c4d5e6f78901a2b3c4d5e6f78901a2b3c 0x4d5e6f78901a2b3c4d5e6f78901a2b3c4d5e6f78901a2b3c4d5e6f78901a2b3c is the second hash result, which is also the initial settlement verification digest.

[0071] Next, the verification node hashes the concatenation result of each matching proof and the initial settlement verification digest, and uses the resulting second hash result as the matching verification digest. For example: Let the matching verification summary be denoted as HM'. The calculation of HM' is as follows: HM'= Keccak256("Match_001;...;0x4d5e6f...")=0x1a2b3c4d5e6f7890... Finally, the verification node hashes the concatenation result of the net settlement and the initial matching verification digest, and uses the resulting fourth hash result as the settlement verification digest. For example: Let the settlement verification summary be denoted as HS', then the calculation of HS' is as follows: HS'= Keccak256("Alice:+1.5,-89750;...;0x1a2b3c...") = 0x4d5e6f78901a2b3c... Step 204: The verification node uploads the settlement transaction, the matching verification summary, and the settlement verification summary to the blockchain.

[0072] For example, following the example above, a verification node can upload the settlement transaction, the matching verification digest, and the settlement verification digest to the blockchain according to the following structure: { "batch_id": "Batch_T0_001", "H_M": "0x1a2b3c...", "H_S": "0x4d5e6f...", "net_changes": [ {"account": "Alice", "P currency": +1.5, "Q currency": -89750}, {"account": "Bob", "P currency": -1.0, "Q currency": +59800}, {"account": "Carol", "P currency": -0.5, "Q currency": +29950}T ], "timestamp": "T0+5", "block_height": 12345678 } In the above scheme, since the matching nodes determine the objects to be matched with the first limit order from each second limit order according to the matching priority, and form a matching order after each matching transaction is completed, the matching proof with matching priority included in the matching order can be used by blockchain nodes that want to verify the matching transaction to verify the matching process, avoiding unfairness in order matching. In addition, by reporting each matching order that occurs during this period as a settlement transaction to the blockchain only when the transaction triggering condition is met, the practice of reporting to the blockchain after each matching order is completed is avoided, which significantly reduces the gas fees to be paid for each matching. Finally, by verifying the matching proof of each matching order in the settlement transaction and the net settlement of each matching order, after both aspects are verified, the settlement transaction, the verified matching verification summary and the settlement verification summary can be uploaded to the blockchain, ensuring that the settlement transaction consisting of multiple matching orders can be verified, and improving the auditability of blockchain transactions.

[0073] Based on the same concept, embodiments of this application also provide a processing apparatus for matching transactions in a blockchain, such as... Figure 3 As shown, the device includes: The order matching unit 301 is used to determine at least one matching order from each of the second limit price orders that satisfies the first limit price order; each matching order includes a matching proof with matching priority; the matching node is any node in the blockchain; The settlement transaction generation unit 302 is used to generate settlement transactions based on each matched order when the transaction triggering conditions are met; the settlement transaction includes the matching certificate of each matched order and the net settlement of each matched order; the net settlement represents the change in the account value of the transaction account corresponding to each matched order; Verification unit 303 is used to verify the matching proof of each matched order and the net settlement of each matched order in the settlement transaction. After the verification is passed, a matching verification summary and a settlement verification summary are generated. The verification node can be any node in the blockchain. The on-chain unit 304 is used to upload the settlement transaction, the matching verification summary, and the settlement verification summary to the blockchain.

[0074] Further, for this device, the order matching unit 301 is specifically used for: acquiring each second limit order within a preset order matching window for the first limit order; wherein each second limit order has a different transaction direction from the first limit order and the order price of each second limit order meets the price requirement of the first limit order; for any second limit order, determining the matching priority of the second limit order based on the order price of the second limit order, the order submission time of the second limit order, and the corresponding random factor of the second limit order; wherein the random value is unpredictable but publicly verifiable; matching the second limit order with the first limit order according to the matching priority of each second limit order, thereby forming at least one matched order.

[0075] Further, for this device, the order matching unit 301 is specifically used for: generating a corresponding random factor for the second limit order; determining the price factor of the second limit order based on the order price of the second limit order; wherein, if the trading direction of the second limit order is selling, the lower the selling price, the larger the price factor; if the trading direction of the second limit order is buying, the higher the buying price, the larger the price factor; determining the time factor of the second limit order based on the order submission time of the second limit order; wherein, the earlier the order submission time of the second limit order, the larger the time factor; and determining the matching priority of the second limit order based on the random factor, price factor, time factor, and their respective weights.

[0076] Furthermore, for this device, the settlement transaction generation unit 302 is specifically used to: obtain each matched order when the matching reporting time arrives or the number of matched orders meets the reporting requirements; combine the changes in the account value of the trading account with the trading direction of buying and the changes in the account value of the trading account with the trading direction of selling in each matched order as net settlement; and form a settlement transaction by combining the matching certificate of each matched order and the net settlement.

[0077] Further, for this device, the verification unit 303 is specifically used for: obtaining the order prices of both parties in each matched order from the settlement transaction, and verifying whether the order price of a limit order with a buy direction is greater than or equal to the order price of a limit order with a sell direction, or verifying whether the order price of a limit order with a sell direction is less than or equal to the order price of a limit order with a buy direction; obtaining the random factor generation proof in each matched order, and determining the verification random factor of each matched order based on the random factor generation proof, and verifying the consistency of each verification random factor with the random factor in each matched order; obtaining the order price and order submission time of each second limit order in each matched order and determining the verification price factor and verification time factor, determining the verification matching priority of each second limit order based on the verification random factor, verification price factor, verification time factor, and their respective weights in each matched order, and verifying the consistency of each verification matching priority with the matching priority in each matched order.

[0078] Furthermore, for this device, the verification unit 303 is specifically used to: obtain from the settlement transaction whether the decrease in the transaction amount of each matched order with the transaction direction of buying is consistent with the increase in the transaction amount of each matched order with the transaction direction of selling; and obtain whether the increase in the transaction quantity of each matched order with the transaction direction of buying is consistent with the decrease in the transaction quantity of each matched order with the transaction direction of selling.

[0079] Furthermore, for this device, the verification unit 303 is specifically configured to: perform hash processing on the concatenation result of each matching proof and the settlement verification digest represented by placeholders, and use the obtained first hash result as the initial matching verification digest; perform hash processing on the concatenation result of the net settlement and the first hash result, and use the obtained second hash result as the initial settlement verification digest; perform hash processing on the concatenation result of each matching proof and the initial settlement verification digest, and use the obtained third hash result as the matching verification digest; and perform hash processing on the concatenation result of the net settlement and the initial matching verification digest, and use the obtained fourth hash result as the settlement verification digest.

[0080] This application also provides a computing device, which may specifically be a desktop computer, portable computer, smartphone, tablet computer, personal digital assistant (PDA), etc. The computing device may include a central processing unit (CPU), memory, input / output devices, etc. Input devices may include a keyboard, mouse, touchscreen, etc., and output devices may include display devices, such as liquid crystal displays (LCDs) and cathode ray tubes (CRTs).

[0081] The memory may include read-only memory (ROM) and random access memory (RAM), and provides the processor with program instructions and data stored in the memory. In this embodiment, the memory can be used to store program instructions for processing methods of matching transactions in a blockchain; The processor is used to call the program instructions stored in the memory and execute the processing method for matching transactions in the blockchain according to the obtained program.

[0082] like Figure 4 The diagram shown is a schematic representation of a computing device provided in an embodiment of this application. The computing device includes: The processor 401, memory 402, transceiver 403, and bus interface 404 are provided; wherein the processor 401, memory 402, and transceiver 403 are connected via bus 405. The processor 401 is used to read the program in the memory 402 and execute the above-mentioned blockchain matching transaction processing method; Processor 401 can be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. It can also be a hardware chip. The aforementioned hardware chip can be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0083] The memory 402 is used to store one or more executable programs and can store data used by the processor 401 when performing operations.

[0084] Specifically, the program may include program code, which includes computer operation instructions. Memory 402 may include volatile memory, such as random-access memory (RAM); memory 402 may also include non-volatile memory, such as flash memory, hard disk drive (HDD), or solid-state drive (SSD); memory 402 may also include combinations of the above types of memory.

[0085] Memory 402 stores the following elements: executable modules or data structures, or subsets thereof, or extended sets thereof: Operation instructions: This includes various operation instructions used to perform various operations.

[0086] Operating system: includes various system programs used to implement various basic business functions and handle hardware-based tasks.

[0087] Bus 405 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0088] Bus interface 404 can be a wired communication interface, a wireless bus interface, or a combination thereof. The wired bus interface can be, for example, an Ethernet interface. The Ethernet interface can be an optical interface, an electrical interface, or a combination thereof. The wireless bus interface can be a WLAN interface.

[0089] This application also provides a computer-readable storage medium storing computer-executable instructions for causing a computer to execute a transaction matching method in a blockchain.

[0090] This application also provides a computer program product, which includes computer-executable instructions for causing a computer to execute a transaction matching processing method in a blockchain.

[0091] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0092] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0093] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0094] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0095] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for processing matched transactions in a blockchain, characterized in that, include: The matching node determines at least one matching order from each of the second limit orders that satisfies the first limit order; each matching order includes a matching proof with matching priority; The matching node can be any node in the blockchain; When the transaction triggering conditions are met, the matching node generates a settlement transaction based on each matched order; the settlement transaction includes the matching proof of each matched order and the net settlement of each matched order; the net settlement represents the change in the account value of the trading account corresponding to each matched order. The verification node verifies the matching proof of each matched order and the net settlement of each matched order in the settlement transaction. After the verification is successful, a matching verification summary and a settlement verification summary are generated. The verification node can be any node in the blockchain. The verification node uploads the settlement transaction, the matching verification summary, and the settlement verification summary to the blockchain.

2. The method as described in claim 1, characterized in that, The matching node determines at least one matching order from each of the second limit orders that satisfies the first limit order, including: For the first price limit order, the matching node obtains each of the second price limit orders within a preset order matching window; wherein each of the second price limit orders has a different transaction direction from the first price limit order and the order price of each of the second price limit orders meets the price requirement of the first price limit order; For any given second limit order, the matching node determines the matching priority of the second limit order based on the order price, the order submission time, and the corresponding random factor of the second limit order; wherein the random value is unpredictable but publicly verifiable. The matching node matches the second limit order with the first limit order according to the matching priority of each second limit order, thereby forming at least one matched order.

3. The method as described in claim 2, characterized in that, The step of determining the matching priority of the second limit order based on its order price, submission time, and corresponding random value includes: The matching node generates a corresponding random factor for the second limit order; The matching node determines the price factor of the second limit order based on the order price of the second limit order; wherein, if the trading direction of the second limit order is selling, the lower the selling price, the larger the price factor; if the trading direction of the second limit order is buying, the higher the buying price, the larger the price factor. The matching node determines the time factor of the second limit order based on the order submission time of the second limit order; wherein, the earlier the order submission time of the second limit order, the larger the time factor; The matching node determines the matching priority of the second limit order based on the random factor, price factor, time factor, and their respective weights.

4. The method as described in claim 1, characterized in that, When the transaction triggering conditions are met, the matching node generates a settlement transaction based on each matched order, including: The matching node obtains each matched order when the matching reporting time arrives or the number of matched orders meets the reporting requirements; The matching node will use the changes in account value of trading accounts with a buy direction and the changes in account value of trading accounts with a sell direction in each matched order as the net settlement. The matching node combines the matching proof of each matched order with the net settlement to form a settlement transaction.

5. The method as described in claim 3, characterized in that, The verification node verifies the matching proof of each matched order in the settlement transaction, including: The verification node obtains the order prices of both parties in each matched order from the settlement transaction, and verifies whether the order price of the limit order with the transaction direction of buying is greater than or equal to the order price of the limit order with the transaction direction of selling, or verifies whether the order price of the limit order with the transaction direction of selling is less than or equal to the order price of the limit order with the transaction direction of buying. The verification node obtains the random factor generation proof in each matched order, determines the verification random factor of each matched order based on the random factor generation proof, and verifies the consistency between each verification random factor and the random factor in each matched order. The verification node obtains the order price and order submission time of each second limit order in each matched order and determines the verification price factor and verification time factor. For each second limit order in each matched order, the verification random factor, verification price factor, verification time factor and their respective weights are used to determine the verification matching priority of each second limit order, and verify the consistency of each verification matching priority with the matching priority in each matched order.

6. The method as described in claim 1, characterized in that, The verification node verifies the net settlement of each matched order in the settlement transaction, including: The verification node obtains from the settlement transaction whether the decrease in the transaction amount of each matched order with the transaction direction of buying is consistent with the increase in the transaction amount of the transaction direction of selling. The verification node checks whether the increase in the number of transactions with the buy direction in each matched order is consistent with the decrease in the number of transactions with the sell direction.

7. The method as described in claim 5, characterized in that, Upon successful verification, a matching verification summary and a settlement verification summary are generated, including: The verification node performs hash processing on the concatenation result of each matching proof and the settlement verification digest represented by the placeholder, and uses the first hash result as the initial matching verification digest. The verification node performs hash processing on the concatenation result of the net settlement and the first hash result, and uses the resulting second hash result as the initial settlement verification digest; The verification node performs hash processing on the concatenation result of each matching proof and the initial settlement verification digest, and uses the resulting third hash result as the matching verification digest. The verification node performs hash processing on the concatenation result of the net settlement and the initial matching verification summary, and uses the resulting fourth hash result as the settlement verification summary.

8. A processing device for matching transactions in a blockchain, characterized in that, include: The order matching unit is used to determine at least one matched order from each of the second limit orders that satisfies the first limit order; Each matched order includes a matching proof with matching priority; the matching node is any node in the blockchain; The settlement transaction generation unit is used to generate settlement transactions based on each matched order when the transaction triggering conditions are met; the settlement transaction includes the matching certificate of each matched order and the net settlement of each matched order; the net settlement represents the change in the account value of the trading account corresponding to each matched order; The verification unit is used to verify the matching proof of each matched order and the net settlement of each matched order in the settlement transaction. After the verification is successful, a matching verification summary and a settlement verification summary are generated. The verification node can be any node in the blockchain. The on-chain unit is used to upload the settlement transaction, the matching verification summary, and the settlement verification summary to the blockchain.

9. A computing device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the method as described in any one of claims 1-7 according to the obtained program.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the method as described in any one of claims 1-7.