CN113283889B - Decentralized exchange system, trading method, equipment and storage medium - Google Patents

Decentralized exchange system, trading method, equipment and storage medium Download PDF

Info

Publication number
CN113283889B
CN113283889B CN202110627010.8A CN202110627010A CN113283889B CN 113283889 B CN113283889 B CN 113283889B CN 202110627010 A CN202110627010 A CN 202110627010A CN 113283889 B CN113283889 B CN 113283889B
Authority
CN
China
Prior art keywords
transaction
module
network layer
contract
certification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110627010.8A
Other languages
Chinese (zh)
Other versions
CN113283889A (en
Inventor
俞铠俊
王志文
吴思进
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Fuzamei Technology Co Ltd
Original Assignee
Hangzhou Fuzamei Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Fuzamei Technology Co Ltd filed Critical Hangzhou Fuzamei Technology Co Ltd
Priority to CN202110627010.8A priority Critical patent/CN113283889B/en
Publication of CN113283889A publication Critical patent/CN113283889A/en
Application granted granted Critical
Publication of CN113283889B publication Critical patent/CN113283889B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/405Establishing or using transaction specific rules
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Multi Processors (AREA)

Abstract

The invention belongs to the technical field of computers, and particularly relates to a decentralized trading exchange system, a trading method, equipment and a storage medium. The decentralized trading system provided by the invention comprises a contract network layer, a server network layer and an attestation system, wherein the execution information processing and the trading result processing of the trading are respectively arranged on two layers of networks, the calculation process of the trading is operated in the two layers of network layers of the server, and one layer of the contract network layer only processes the trading with user account balance updating and contract locking, so that less TPS is consumed by the one layer of the contract network layer, and the two layers of the contract network layer have good expansibility, thereby greatly improving the whole trading processing capability of the system.

Description

Decentralized exchange system, trading method, equipment and storage medium
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a decentralized exchange system, a trading method, equipment and a storage medium.
Background
The most prominent essential feature of blockchains is decentralization. At present, two decentralization exchange schemes exist on a block chain, one scheme is to provide liquidity in the form of an order book, and represents the exchanges such as Newdex, IDEX, DDEX, Radar Relay, EtherDelta and the like; one is to provide liquidity by way of an automated market (AMM) represented by Uniswap, Bancor, etc.
The order book contains a list of orders, called bids (bid), and orders, called ask (ask), called ask. The order book lists the number of tokens to be bid or ask at each price point. The highest bid (buy one) and lowest ask (sell one) are referred to as buy and sell one (top of the book). They mark the market mood as well as the bid and offer prices needed to obtain the order. The difference between the highest bid price and the lowest ask price is the spread (spread). For an exchange in order book mode, its scope of applicability is a well-liquidated market. The traditional stock market and the centralized digital currency trading market adopt the order book mode. However, for a less mobile market, many problems arise with the exchange in order book mode. At the time of trading, an order is completed only if the bid and ask match, and the market will not be able to trade if the market highest bid is still below the lowest ask. Therefore, for the market with insufficient liquidity, the order book trading scheme has the problem that the trading success rate is low when the spread price is too large.
The automatic marketing scheme does not adopt an order book mode, but adopts a coin exchange algorithm, namely, the exchange between two or more coins is realized according to a certain rule or exchange rate. The essence of the automated market (AMM) is a commodity exchange or coin exchange, the transaction mode gives users great freedom, users can randomly select coins existing in two exchanges to exchange coins based on certain rules, the AMM exchanges on the market at present are gradually touted by the users, but with the gradual rise of transaction amount, the transaction amount is limited by the TPS of one layer of network, and limited by the TPS of one layer of network, the transaction fee may become very high, which is very unfriendly for the exchanges.
Disclosure of Invention
In order to solve the problem that the transaction processing capacity of the prior art is limited by network TPS and limited by network limited TPS, and the transaction fee may become very high, the invention provides a decentralized exchange system, a transaction method, equipment and a storage medium, which are suitable for AMM exchanges.
The invention aims to:
in the two-layer network, no matter how many transactions exist, only a small amount of transaction fee (even no transaction fee is needed) needs to be collected, and meanwhile, due to the expansibility of the two-layer network, the performance of the decentralized exchange can be greatly improved.
In order to achieve the purpose, the invention adopts the following technical scheme.
In a first aspect, there is provided a decentralized exchange system, comprising:
a contract network layer running intelligent contracts, the contract network layer for processing account balance data;
the system comprises a server network layer, a data processing layer and a data processing layer, wherein the server network layer is used for processing data generated in a transaction processing process; the system comprises a swap generating module, a block generating module, a state updating module and a controller module, wherein the swap generating module is used for responding to a user request and initiating a swap, the state updating module is used for modifying an under-link asset state Mercker tree corresponding to the current transaction and sending the under-link asset state Mercker tree to the controller module, and the controller module monitors the transaction locked to a contract by a contract network layer;
the certification system comprises a certification module, a certification engine module and a certification main module, wherein the certification module comprises a verification module, a certification engine module and a certification main module, the verification module is arranged on the contract network layer, the certification engine module and the certification main module are arranged on the service end network layer, the verification module is used for verifying the transaction certification sent by the controller module, the certification engine module is used for enabling the controller module to interact with the certification main module, and the certification main module generates the transaction certification based on zero knowledge certification.
In a second aspect, there is provided a decentralization exchange transaction method, which is applicable to the decentralization exchange system provided in the first aspect, the method including:
processing transaction information locked to a contract, user account certification balance updating information, state updating information of a maintenance two-layer network and verification transaction certification through a contract network layer;
and processing the swap generation information and the transaction execution information through the network layer of the server side, and monitoring the transaction locked to the contract by the network layer of the contract.
Preferably, the exchange transaction types include a pledge transaction, a cash-out transaction and a transfer transaction, and the pledge transaction method specifically includes:
the method comprises the steps that transaction mutual evidence required by the pledge transaction is locked in a contract according to market price at a contract network layer; in a service end network layer, a state updating module acquires locking transaction information, the state updating module updates an asset state tree related to a pledge transaction and sends the updated asset state tree to a controller module, the controller module generates a transaction certificate of the pledge transaction through interaction of a certification engine module and a certification main module, the root hash of the updated asset state tree is calculated, the root hash of the updated asset state tree and the transaction certificate are sent to a contract network layer, and in the contract network layer, a verification module verifies the transaction certificate and updates a user account certification balance according to the updated asset state tree and intelligent contract contents after the verification is passed;
the cash-out transaction method specifically comprises the following steps:
in response to a cash-out transaction initiated by a user at a service end network layer, a state updating module updates an asset state tree related to the cash-out transaction and sends the updated asset state tree to a controller module, the controller module generates a transaction certificate of the cash-out transaction through interaction of a certificate engine module and a certificate main module, the updated asset state tree root hash is calculated, the updated asset state tree root hash and the transaction certificate are sent to a contract network layer, a verification module verifies the transaction certificate at the contract network layer, and after the verification is passed, the user account certification balance is updated according to the updated asset state tree and intelligent contract content;
the transfer transaction method specifically comprises the following steps:
the method comprises the steps that in response to a transfer transaction initiated by a user at a server network layer, a swap generating module generates a swap, a block generating module integrates a plurality of transactions into a block, transaction calculation is executed in a controller module, a state updating module updates an asset state tree related to the transfer transaction, the controller module interacts with a certification main module through a certification engine module to generate a transaction certificate of the transfer transaction, the updated asset state tree root hash is calculated, the updated asset state tree root hash and a transaction certificate are sent to a contract network layer, a verification module verifies the transaction certificate at the contract network layer, and the user account passing balance is updated according to the updated asset state tree and intelligent contract content after the verification is passed.
Preferably, the asset state tree is data under the chain, and the decentralized trading exchange system updates the asset state tree through the state updating module.
Preferably, the asset state tree is a merkel tree structure that is used to store tradable asset information for the exchange.
In a third aspect, a computer device is provided that includes one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of the second aspects as described above.
In a fourth aspect, there is provided a storage medium storing a computer program which, when executed by a processor, implements the method of any one of the second aspects above.
The invention has the beneficial effects that:
1) the calculation process of the transaction is calculated in a network layer of a two-layer network service end, and only the transaction which is updated with the balance of a user account and locked with a contract is processed by a contract network layer, so that less TPS is consumed by the contract network layer, the two-layer network has good expansibility, and the whole transaction processing capability of the system is greatly improved;
2) the zero knowledge proof is utilized to ensure the state consistency and the data security of the network layer of the service end and the contract network layer, and the security of transaction information is ensured;
3) the overall performance of the exchange is improved, and the generation of transaction fees can be further reduced.
Drawings
FIG. 1 is a schematic view of embodiment 1 of the present invention;
FIG. 2 is a flowchart of a method of example 2 of the present invention;
fig. 3 is a schematic structural diagram of a computer device according to embodiment 3 of the present invention.
Detailed Description
The invention is described in further detail below with reference to specific embodiments and the attached drawing figures. Those skilled in the art will be able to implement the invention based on these teachings. Moreover, the embodiments of the present invention described in the following description are generally only some embodiments of the present invention, and not all embodiments. Therefore, all other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without any creative effort shall fall within the protection scope of the present invention.
In the description of the present invention, it is to be understood that the terms "thickness", "upper", "lower", "horizontal", "top", "bottom", "inner", "outer", "circumferential", and the like, indicate orientations and positional relationships based on those shown in the drawings, and are used merely for convenience in describing the present invention and for simplicity in description, and do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., and "a plurality" means one or more unless specifically limited otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; may be mechanically coupled, may be electrically coupled or may be in communication with each other; they may be directly connected or indirectly connected through intervening media, or they may be connected internally or in any other suitable relationship, unless expressly stated otherwise. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
Unless otherwise specified, all the raw materials used in the examples of the present invention are commercially available or available to those skilled in the art; unless otherwise specified, the methods used in the examples of the present invention are all those known to those skilled in the art.
Example 1
The present embodiment provides a decentralized exchange system, as shown in fig. 1, including:
a contract network layer running intelligent contracts, the contract network layer for processing account balance data;
the system comprises a server network layer, a data processing layer and a data processing layer, wherein the server network layer is used for processing data generated in a transaction processing process; the system comprises a swap generating module, a block generating module, a state updating module and a controller module, wherein the swap generating module is used for responding to a user request to initiate a swap, the state updating module is used for modifying an under-link asset state Mercker tree corresponding to the current transaction and sending the under-link asset state Mercker tree to the controller module, and the controller module monitors the transaction locked to a contract by a contract network layer;
the certification system comprises a certification module, a certification engine module and a certification main module, wherein the certification module comprises a verification module, a certification engine module and a certification main module, the verification module is arranged on the contract network layer, the certification engine module and the certification main module are arranged on the service end network layer, the verification module is used for verifying the transaction certification sent by the controller module, the certification engine module is used for enabling the controller module to interact with the certification main module, and the certification main module generates the transaction certification based on zero knowledge certification.
In the operation process of the decentralized trading place system provided by this embodiment, taking the transfer trade as an example, first a user sends a transfer request, the swap generation module generates a swap trade in response to the user's request, the block generation module packs the generated trade into a block, usually a plurality of trades are packed together, then the controller module executes the transaction content, updates the state of the asset state tree related to the transaction according to the transaction execution result state updating module, interacts the calculated and updated asset state tree root hash with the proof main module through the proof engine module to generate a transaction proof of the transfer transaction, sends the updated asset state tree root hash and the transaction proof to a contract network layer, and in a contract network layer, a verification module verifies the transaction certificate and updates the user account certification balance according to the updated asset state tree and the intelligent contract content after the verification is passed. In the whole process, the calculation process of the transaction is operated in a network layer of a two-layer network service end, and a first layer contract network layer only processes the transaction which is updated with the balance of a user account and locked with a contract, so that TPS consumed by the first layer contract network layer is less, the two-layer network has good expansibility, and the whole transaction processing capability of the system is greatly improved.
Example 2
A decentralization exchange transaction method, which is applied to the decentralization exchange system provided in embodiment 1, the method comprising:
processing transaction information locked to a contract, user account certification balance updating information, state updating information of a maintenance two-layer network and verification transaction certification through a contract network layer;
and processing the swap generation information and the transaction execution information through the network layer of the server side, and monitoring the transaction locked to the contract by the network layer of the contract.
Specifically, the exchange transaction types include a pledge transaction, a cash-out transaction and a transfer transaction, and the pledge transaction method specifically includes:
the method comprises the steps that transaction mutual evidence required by the pledge transaction is locked in a contract according to market price at a contract network layer; in a service end network layer, a state updating module acquires locking transaction information, the state updating module updates an asset state tree related to a pledge transaction and sends the updated asset state tree to a controller module, the controller module generates a transaction certificate of the pledge transaction through interaction of a certification engine module and a certification main module, the root hash of the updated asset state tree is calculated, the root hash of the updated asset state tree and the transaction certificate are sent to a contract network layer, and in the contract network layer, a verification module verifies the transaction certificate and updates a user account certification balance according to the updated asset state tree and intelligent contract contents after the verification is passed;
the cash withdrawal transaction method specifically comprises the following steps:
in response to a cash-out transaction initiated by a user at a service end network layer, a state updating module updates an asset state tree related to the cash-out transaction and sends the updated asset state tree to a controller module, the controller module generates a transaction certificate of the cash-out transaction through interaction of a certificate engine module and a certificate main module, the updated asset state tree root hash is calculated, the updated asset state tree root hash and the transaction certificate are sent to a contract network layer, a verification module verifies the transaction certificate at the contract network layer, and after the verification is passed, the user account certification balance is updated according to the updated asset state tree and intelligent contract content;
the transfer transaction method specifically comprises the following steps:
the method comprises the steps that in response to a transfer transaction initiated by a user at a server network layer, a swap generating module generates a swap, a block generating module integrates a plurality of transactions into a block, transaction calculation is executed in a controller module, a state updating module updates an asset state tree related to the transfer transaction, the controller module interacts with a certification main module through a certification engine module to generate a transaction certificate of the transfer transaction, the updated asset state tree root hash is calculated, the updated asset state tree root hash and a transaction certificate are sent to a contract network layer, a verification module verifies the transaction certificate at the contract network layer, and the user account passing balance is updated according to the updated asset state tree and intelligent contract content after the verification is passed.
Further, the asset state tree is data under the chain, and the decentralized exchange system updates the asset state tree through the state updating module.
Further, the asset state tree is in a Mercker tree structure and is used for storing tradable asset information of the exchange.
The method adopted by the embodiment carries out operation on the calculation process of the transaction in the network layer of the service end of the two-layer network, and the contract network layer only processes the transaction which is updated with the balance of the user account and locked with the contract, so that TPS consumed by the contract network layer is less, the two-layer network has good expansibility, and the whole transaction processing capability of the system is greatly improved; meanwhile, the zero knowledge proof is utilized to ensure the state consistency and the data security of the service end network layer and the contract network layer, thereby ensuring the security of the transaction information; thereby improving the overall performance of the exchange and further reducing the generation of transaction fees.
Example 3
A computer device, the device comprising: one or more processors; memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to perform the method of embodiment 2.
A storage medium storing a computer program which, when executed by a processor, implements the method as described in embodiment 2 above.
Fig. 3 is a schematic structural diagram of an apparatus provided in this embodiment.
As shown in fig. 3, as another aspect, the present application also provides a computer apparatus 500 including one or more Central Processing Units (CPUs) 501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the apparatus 500 are also stored. The CPU501, ROM502, and RAM503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication via a network such as the internet, and the processing driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to the embodiments disclosed in the present application, the method described in the above embodiment 1 may be implemented as a computer software program. For example, embodiments disclosed herein include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the method described in any of the embodiments above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511.
As yet another aspect, the present application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus of the above-described embodiment; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described herein.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, for example, each of the described units may be a software program provided in a computer or a mobile intelligent device, or may be a separately configured hardware device. Wherein the designation of a unit or module does not in some way constitute a limitation of the unit or module itself.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the present application. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (5)

1. A decentralized exchange trading method, adapted for a decentralized exchange system, said system comprising:
a contract network layer running intelligent contracts, the contract network layer for processing account balance data;
the server network layer is used for processing data generated in the transaction process; the system comprises a swap generating module, a block generating module, a state updating module and a controller module, wherein the swap generating module is used for responding to a user request to initiate a swap, the state updating module is used for modifying an under-link asset state Mercker tree corresponding to the current transaction and sending the under-link asset state Mercker tree to the controller module, and the controller module monitors the transaction locked to a contract by a contract network layer;
the certification system comprises a verification module, a certification engine module and a certification main module, wherein the verification module is arranged on the contract network layer, the certification engine module and the certification main module are arranged on the service network layer, the verification module is used for verifying the transaction certification sent by the controller module, the certification engine module is used for the controller module to interact with the certification main module, and the certification main module generates the transaction certification based on zero knowledge certification;
the method comprises the following steps:
processing transaction information locked to a contract, user account certification balance updating information, state updating information of a maintenance server network and verification transaction certification through a contract network layer;
processing swap generation information and transaction execution information through a server network layer, and monitoring the transaction locked to the contract by the contract network layer, wherein the transaction types of the exchange comprise a pledge transaction, a cash withdrawal transaction and a transfer transaction; the pledge transaction method specifically comprises the following steps:
the method comprises the steps that transaction mutual evidence required by the pledge transaction is locked in a contract according to market price at a contract network layer; in a service end network layer, a state updating module acquires locking transaction information, the state updating module updates an asset state tree related to a pledge transaction and sends the updated asset state tree to a controller module, the controller module generates a transaction certificate of the pledge transaction through interaction of a certification engine module and a certification main module, the root hash of the updated asset state tree is calculated, the root hash of the updated asset state tree and the transaction certificate are sent to a contract network layer, and in the contract network layer, a verification module verifies the transaction certificate and updates a user account certification balance according to the updated asset state tree and intelligent contract contents after the verification is passed;
the cash withdrawal transaction method specifically comprises the following steps:
in response to a cash-out transaction initiated by a user at a service end network layer, a state updating module updates an asset state tree related to the cash-out transaction and sends the updated asset state tree to a controller module, the controller module generates a transaction certificate of the cash-out transaction through interaction of a certificate engine module and a certificate main module, the updated asset state tree root hash is calculated, the updated asset state tree root hash and the transaction certificate are sent to a contract network layer, a verification module verifies the transaction certificate at the contract network layer, and after the verification is passed, the user account certification balance is updated according to the updated asset state tree and intelligent contract content;
the transfer transaction method specifically comprises the following steps:
the method comprises the steps that in response to a transfer transaction initiated by a user at a server network layer, a swap generating module generates a swap, a block generating module integrates a plurality of transactions into a block, transaction calculation is executed in a controller module, a state updating module updates an asset state tree related to the transfer transaction, the controller module interacts with a certification main module through a certification engine module to generate a transaction certificate of the transfer transaction, the updated asset state tree root hash is calculated, the updated asset state tree root hash and a transaction certificate are sent to a contract network layer, a verification module verifies the transaction certificate at the contract network layer, and the user account passing balance is updated according to the updated asset state tree and intelligent contract content after the verification is passed.
2. The decentralized exchange transaction method according to claim 1, wherein the asset state tree is data under link, and the decentralized exchange system updates the asset state tree through the state updating module.
3. The decentralized exchange trading method according to claim 1, wherein the asset state tree is a mercker tree structure, and the asset state tree is used for storing tradeable asset information of the exchange.
4. A computer device, characterized by one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited in any of claims 1-3.
5. A storage medium storing a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-3.
CN202110627010.8A 2021-06-04 2021-06-04 Decentralized exchange system, trading method, equipment and storage medium Active CN113283889B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110627010.8A CN113283889B (en) 2021-06-04 2021-06-04 Decentralized exchange system, trading method, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110627010.8A CN113283889B (en) 2021-06-04 2021-06-04 Decentralized exchange system, trading method, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113283889A CN113283889A (en) 2021-08-20
CN113283889B true CN113283889B (en) 2022-08-16

Family

ID=77283495

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110627010.8A Active CN113283889B (en) 2021-06-04 2021-06-04 Decentralized exchange system, trading method, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113283889B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111325533A (en) * 2019-12-31 2020-06-23 深圳大学 Decentralized transaction method, decentralized transaction system and computer equipment
CN111478932A (en) * 2019-01-24 2020-07-31 北京京东尚科信息技术有限公司 Intelligent contract data processing method, block chain network and storage medium
CN112287034A (en) * 2020-12-24 2021-01-29 腾讯科技(深圳)有限公司 Data synchronization method, equipment and computer readable storage medium
CN112396423A (en) * 2021-01-20 2021-02-23 腾讯科技(深圳)有限公司 Transaction data processing method, device, equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100306531A1 (en) * 2009-05-29 2010-12-02 Ebay Inc. Hardware-Based Zero-Knowledge Strong Authentication (H0KSA)

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111478932A (en) * 2019-01-24 2020-07-31 北京京东尚科信息技术有限公司 Intelligent contract data processing method, block chain network and storage medium
CN111325533A (en) * 2019-12-31 2020-06-23 深圳大学 Decentralized transaction method, decentralized transaction system and computer equipment
CN112287034A (en) * 2020-12-24 2021-01-29 腾讯科技(深圳)有限公司 Data synchronization method, equipment and computer readable storage medium
CN112396423A (en) * 2021-01-20 2021-02-23 腾讯科技(深圳)有限公司 Transaction data processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN113283889A (en) 2021-08-20

Similar Documents

Publication Publication Date Title
EP3808051B1 (en) Device, method, and computer readable medium for large scale electronic processing
US10878387B2 (en) Real-time determination of funds availability for checks and ACH items
CN102859938B (en) Calculate resource by networking and data are carried out the device of synchronization process, system and method
US20190087893A1 (en) Methods and Systems for Blockchain Based Segmented Risk Based Securities
US8626639B2 (en) Trade matching platform with variable pricing based on clearing relationships
KR20220136998A (en) Blockchain-based green certificate transaction system
AU2011252961A1 (en) Out of band credit control
US10516624B2 (en) Electrical computer system processing architecture
US11354742B2 (en) Fee/rebate contingent order matching system and method
US20200265515A1 (en) Framework for digital asset lending and hedging using stable coin
KR102201944B1 (en) Virtual currency transaction system
CN110930257A (en) Data processing method, device, equipment and storage medium
US10776870B2 (en) Computer network systems for accurate market based benchmark estimates
Swanson Decentralized financial market infrastructures
US20120197779A1 (en) Trade Matching Platform with Variable Pricing Based on Clearing Relationships
CN113283889B (en) Decentralized exchange system, trading method, equipment and storage medium
CN114881639A (en) Multi-stage prepayment transaction method, system and storage medium based on block chain
CN111383099A (en) Wind control method and device based on bulk goods transaction
CN116483689B (en) Method, device, equipment and medium for testing option brokerage quick trading system
WO2023233600A1 (en) Transaction management system
CN116797229A (en) Block chain technology-based electric power spot market transaction method
CN116416045A (en) Block chain-based decentralization financial method, system and storage medium
CN113220697A (en) Storage method, equipment and storage medium for decentralized exchange
US20140279678A1 (en) Automated Cash Leveraging Facility to Provide Available Cash from Sweep Investments for Margin Financing
CN113220696A (en) Storage method, equipment and storage medium for decentralized exchange

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant