CN116522376A - Cross-chain transaction method and system based on time lock rewarding mechanism - Google Patents

Cross-chain transaction method and system based on time lock rewarding mechanism Download PDF

Info

Publication number
CN116522376A
CN116522376A CN202310243063.9A CN202310243063A CN116522376A CN 116522376 A CN116522376 A CN 116522376A CN 202310243063 A CN202310243063 A CN 202310243063A CN 116522376 A CN116522376 A CN 116522376A
Authority
CN
China
Prior art keywords
lock
transaction
time
contract
rewarding
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.)
Pending
Application number
CN202310243063.9A
Other languages
Chinese (zh)
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.)
Changsha University of Science and Technology
Original Assignee
Changsha University of Science and Technology
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 Changsha University of Science and Technology filed Critical Changsha University of Science and Technology
Priority to CN202310243063.9A priority Critical patent/CN116522376A/en
Publication of CN116522376A publication Critical patent/CN116522376A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • 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

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Accounting & Taxation (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Finance (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention belongs to the technical field of blockchains, and particularly provides a cross-chain transaction method and system based on a time lock rewarding mechanism, wherein the method comprises the following steps: creating a contract for a bonus lock and a contract for a hash time bonus lock on two blockchains; both sides of the transaction submit orders; locking the orders of both sides of the transaction by calling an order locking contract; both parties to the transaction invoke respective hash time bonus lock contracts to create a new hash time lock, and if a bonus is desired, the other party to the transaction must complete unlocking in a shorter time. Aiming at the problem of the delay of the cross-chain transaction of the hash locking mechanism, the scheme improves the hash time locking contract, adds the time rewarding mechanism on the basis of the original contract, and greatly improves the transaction efficiency on the premise of ensuring the safety and reliability of the transaction.

Description

Cross-chain transaction method and system based on time lock rewarding mechanism
Technical Field
The invention relates to the technical field of blockchains, in particular to a cross-chain transaction method and system based on a time lock rewarding mechanism.
Background
After the bitcoin is proposed from the book, the concept of blockchain is widely known, and a decentralised distributed ledger technique is widely applied. The method realizes a safe and reliable value transmission network which does not depend on a trusted third party on a P2P network through a cryptography technology. Various public, private and alliance chains are present in the field of view of people, and various blockchain-based cryptocurrencies are also in operation, such as ethernet and laite. However, due to different architecture or consensus mechanism among each blockchain, the blockchains cannot communicate with each other, value transfer and the like, the value island phenomenon exists, the development of the blockchain technology is limited to a certain extent, and the value exchange among the heterogeneous blockchains mainly depends on the centralized exchange of a central exchange, so that certain problems exist in the aspects of privacy information protection, safety reliability and transaction efficiency of users.
Thus, to break trust issues between blockchains, implementing the ability to interoperate and transfer assets from chain to chain, there are currently ways to implement cross-chain using smart contracts. However, the current cross-chain transaction has timeliness, and because the set unlocking time (time lock) is considered, the waiting unlocking time is wasted, the cross-chain asset exchange can not be completed in a shorter time, and the asset transfer efficiency is affected; if the time is too long, the exchange proportion of the cryptocurrency may also change, resulting in unfairness to a party to the transaction.
Disclosure of Invention
The invention aims at the technical problem of low efficiency of cross-chain transaction in the prior cross-chain technology.
The invention provides a cross-chain transaction method based on a time lock rewarding mechanism, which comprises the following steps:
s1, the method comprises the steps of (1), creating a contract for a bonus lock and a contract for a hash time bonus lock on two blockchains;
s2, submitting orders by both transaction parties respectively located on the two block chains;
s3, locking both parties of the transaction to reserve money by calling a reserve money locking contract;
s4, calling respective hash time rewarding lock contracts by both transaction parties to create new hash time locks, and transmitting respective new hash time lock IDs to a notary mechanism;
unlocking the new hash time lock by both transaction parties to start transaction;
when the transaction is completed or interrupted, whether the transaction two parties have the right to fetch the subscription, otherwise, the subscription of the malicious party is acquired by the honest party.
Preferably, the step S3 specifically includes: the notary institution invokes the contract lock contract to lock the transaction for the two parties to contract.
Preferably, the S4 specifically includes:
based on the original hash time locking contract, the transaction parties can selectively add extra rewards to create a hash time rewarding lock contract, after the two parties subscribe to the contract and lock, the transaction parties call the respective hash time rewarding lock contract to create a new hash time lock, and the respective new hash time lock ID is transmitted into a notary mechanism;
when the transaction is completed or the transaction is interrupted, if any transaction party needs to retrieve the self-subscription, the notary mechanism goes to the blockchain of the transaction party to verify whether the corresponding new hash time lock information is correct, if so, the self-subscription can be retrieved, otherwise, the self-subscription cannot be retrieved;
if any transaction party needs to take out the contract of the other party, the notary institution goes to the other party to verify whether the new hash time lock information is correct or not, if so, the new hash time lock information cannot be taken out, otherwise, the new hash time lock information can be taken out.
Preferably, the notary institution scores and elects through a network user to obtain a third party institution with public trust; or by a notarization authority approved by a judicial agency.
Preferably, the S4 specifically includes:
user A invokes the hash time rewarding lock contract on the X chain where the user A is located to create the hash time rewarding lock, then returns the IDA of the hash time rewarding lock, then the user A transmits the IDA to a notary mechanism, and user B can verify whether the hash time rewarding lock information is correct or not through acquiring the related information of the hash time lock on the X chain of the IDA uploaded by the user A, and if the hash time rewarding lock information is incorrect, the user B is malicious.
Preferably, the information of the transaction includes: transaction total, received address, random number, hash value h(s) calculated by sha256, time lock, time reward.
The invention also provides a cross-chain transaction system based on the time lock rewarding mechanism, which is used for realizing a cross-chain transaction method based on the time lock rewarding mechanism, and comprises the following steps:
a contract creation module for creating a contract for a lock and a contract for a hash time bonus lock on two blockchains;
the booking submission module is used for submitting a booking through two transaction parties respectively positioned on the two block chains;
the booking locking module is used for locking the booking of both transaction parties by calling a booking locking contract;
the rewarding and punishing module is used for creating a new hash time lock by calling respective hash time rewarding lock contracts by both transaction parties and transmitting respective new hash time lock IDs to a notary mechanism;
unlocking the new hash time lock by both transaction parties to start transaction;
when the transaction is completed or interrupted, whether the transaction two parties have the right to fetch the subscription, otherwise, the subscription of the malicious party is acquired by the honest party.
The invention also provides an electronic device, which comprises a memory and a processor, wherein the processor is used for realizing the steps of the cross-chain transaction method based on the time lock rewarding mechanism when executing the computer management program stored in the memory.
The invention also provides a computer readable storage medium having stored thereon a computer management class program which when executed by a processor implements the steps of a time lock rewards mechanism based cross-chain transaction method.
The beneficial effects are that: the invention provides a cross-chain transaction method and a system based on a time lock rewarding mechanism, wherein the method comprises the following steps: creating a contract for a bonus lock and a contract for a hash time bonus lock on two blockchains; submitting orders by both transaction parties respectively located on the two block chains; locking the orders of both sides of the transaction by calling an order locking contract; both parties to the transaction invoke respective hash time bonus lock contracts to create a new hash time lock, and if a bonus is desired, the other party to the transaction must complete unlocking in a shorter time. Aiming at the problem of the delay of the hash locking mechanism cross-chain transaction, the scheme improves the hash time locking contract, adds a time rewarding mechanism (HashTimeAwardLockedContact, HTALC) on the basis of the original contract, and adds a rewarding fund when creating the hash time lock, if the trader wants to obtain rewards, the other party of the trade must finish unlocking in a shorter time, the speed of fund exchange can be artificially accelerated through the rewarding mechanism, and the trading efficiency is greatly improved on the premise of ensuring the safe and reliable trade.
Drawings
FIG. 1 is a flow chart of a cross-chain transaction method based on a time lock rewarding mechanism provided by the invention;
fig. 2 is a schematic hardware structure of one possible electronic device according to the present invention;
FIG. 3 is a schematic diagram of a possible hardware configuration of a computer readable storage medium according to the present invention;
FIG. 4 is a contract diagram of a hash time bonus lock provided by the invention;
FIG. 5 is a diagram of hash time bonus lock information provided by the invention;
FIG. 6 shows the present invention is a contract graph of a gold lock;
FIG. 7 is a diagram of a subscription lock information provided by the present invention.
Detailed Description
The following describes in further detail the embodiments of the present invention with reference to the drawings and examples. The following examples are illustrative of the invention and are not intended to limit the scope of the invention.
Referring to fig. 1 to 7, the present invention provides a cross-chain transaction method based on a time lock rewarding mechanism, which includes the following steps:
s1, the method comprises the steps of (1), creating a contract for a bonus lock and a contract for a hash time bonus lock on two blockchains;
s2, submitting orders by both transaction parties respectively located on the two block chains;
s3, locking both parties of the transaction to reserve money by calling a reserve money locking contract;
s4, the two transaction parties call respective hash time rewarding lock contracts to create new hash time locks, and if rewarding is required, the other transaction party must complete unlocking in a shorter time.
Wherein the purpose of creating the hash-time bonus lock contract is to give an additional bonus to the party that unlocks faster, if the party wants to get the bonus, the other party to the transaction must complete the unlocking in a shorter time.
Preferably, the transaction parties call respective hash time rewarding lock contracts to create new hash time locks, and the respective new hash time lock IDs are transmitted to a notary mechanism; unlocking the new hash time lock by both transaction parties to start transaction; when the transaction is completed or interrupted, whether the transaction two parties have the right to fetch the subscription, otherwise, the subscription of the malicious party is acquired by the honest party.
The notary mechanism in the embodiment of the invention can be a notary mechanism approved by a judicial administrative organ of province, autonomous region and direct administration, or can be a third party mechanism with public trust by scoring and electing network users. If the transaction is finished, the transaction parties find that the notary mechanism is dishonest through the check information, so that the credit of the notary mechanism is reduced or the notary mechanism is blackened; and the notary institution may be alerted. The credit is used for sorting the public trust of the notary organization in real time, and if the public trust is lower than a threshold value, the public trust is directly eliminated and punished. The penalty mechanism may be a penalty by a judicial agency to a notary agency. Therefore, the notary institution has certain public trust, can be a non-profit institution, and can provide funds and supply through vast network users or transaction parties.
The specific scheme is that the amount of the subscription is smaller than a safety value, wherein the safety value can be drawn through both transaction parties or an experience value. The subscription is a small part and the notary institution is not involved in the exchange of funds throughout the transaction, resulting in a loss of subscription if the notary institution is dishonest, which is very small for both parties to the transaction, but which has a significant impact on the notary institution and even faces a penalty risk, which may prompt the notary institution to trust.
In a preferred embodiment, step S4 specifically includes:
when the transaction is completed or the transaction is interrupted, if any transaction party needs to retrieve the self subscription, the notary mechanism goes to the blockchain of the transaction party to verify whether the corresponding hash time lock information is correct, if so, the self subscription can be retrieved, otherwise, the self subscription cannot be retrieved;
if any transaction party needs to take out the contract of the other party, the notary institution goes to the other party to verify whether the hash time lock information is correct or not, if so, the transaction party cannot take out the contract, otherwise, the transaction party can take out the contract.
Preferably, when the transaction is started, the transaction both sides create hash time rewarding lock contracts on respective block chains, and after the both sides subscribe to lock, the transaction both sides call the respective hash time rewarding lock contracts to create new hash time locks, and transmit the respective new hash time lock IDs to a notary institution. The new hash time lock can cover the original hash time lock, and only the new hash time lock needs to be unlocked during subsequent transaction and verification. The new hash time lock and the old hash time lock exist simultaneously, and when trading or booking is carried out, unlocking analysis verification is carried out on the old hash time lock and the new hash time lock, so that the security is ensured. Then, unlocking the new hash time lock by both transaction parties to start transaction; when the transaction is completed or interrupted, the notary institution verifies whether there is an malicious act to determine whether the transaction parties have the right to retrieve the subscription, otherwise the subscription of the malicious party will be obtained by the honest party.
Hash time bonus lock contract (HashTimeAwardLockedContact, HATALC): the transaction parties create contracts called by the hash time rewarding locks, on the basis of the original hash time rewarding contracts, a transactor can selectively add additional rewards, corresponding rewards are obtained according to the proportion of the time spent by current unlocking, and the transaction parties realize the transfer of the encrypted money by sequentially unlocking the hash time rewarding locks of the other parties. The primary function of the hash time bonus lock contract and the hash time bonus lock information are shown in fig. 4 and 5.
Wherein the functions of the hash time bonus lock contract include:
creating a hash time lock; unlocking and taking out the encrypted money, and successful transaction; retrieving the cryptocurrency when the transaction fails; and obtaining the related information of the hash time lock.
The hash time bonus lock information includes: the creator address, the receiver address, the transaction amount, the time rewarding amount, the hash value obtained by the random number through the sha256 algorithm, the unlocking time in the time lock, the latest time of unlocking, whether the encrypted currency is taken out by the other party, whether the encrypted currency is retrieved by the creator, and the original value of Ha Xisuo.
The embodiment of the invention has the following 7 characteristics:
(1) Atomicity: in the cross-chain transaction mechanism of the invention, either both parties to the transaction adhere to the agreement, all exchanges are completed successfully, or one party does not adhere to the agreement, and all exchanges are not performed.
(2) Safety: the three-party mechanism is used for supervising the cross-chain transaction process, so that malicious behaviors are no longer zero in cost, meanwhile, the benefits of honest users are guaranteed, the occurrence of the malicious behaviors is greatly reduced, and the safety is guaranteed.
(3) Timeliness: by adding the rewarding mechanism, users are stimulated to conduct transaction flow faster through rewarding, and the speed of cross-chain funds exchange is increased.
(4) Fairness: no matter which step of the cross-chain transaction is problematic, the relevant benefits to the honest user are guaranteed.
(5) Scalability: the cross-chain transaction mechanism of the invention can be applied to realize the transfer of the encryption currency among different blockchains as long as the blockchains of the intelligent contract can be realized.
(6) Decentralizing: the present invention uses intelligent contracts, which are code executing on the blockchain, to effect transfer of assets between blockchains, which are decentralised.
In one particular implementation scenario, a payor A of a cross-chain transaction transacts with a payor B of the cross-chain transaction, an area chain X where the payor is located, a blockchain Y where the payor is located, an account of the payor on the payor blockchain is A1, an account of the payor on the payor blockchain is B1, and encrypted currencies on the X chain (blockchain X) and on the Y chain (blockchain Y) are coinx and coiny, respectively.
Suppose that user a on the X chain proposes a cross-chain transaction with user B on the Y chain, where the exchange ratio of cryptocurrency coinx on the X chain and cryptocurrency coiny on the Y chain is 1:1, the A user prepares to reserve 100 coinx for the B user 100 coiny and negotiates a subscription for 5 coinx and 5 coiny.
The A user and the B user respectively submit 5 coinx and 5 coiny orders on the notary institution, and the receiving addresses are B1 and A1 respectively, which is equivalent to indirectly calling a newDepositContact method in an order lock contract. Furthermore, it is necessary to set the transaction deadline (the time when user a creates the hash time lock at the latest) at the payer, which functions to, if user a fails to create the hash time lock before this time to actively initiate a transaction, generate a default, he cannot retrieve his own subscription and the partner can take his subscription away. The malicious non-conservation behavior is obtained by verification by a notary organization.
After both parties to the transaction submit orders and create an order lock, the funds transfer stage is entered. Firstly, a user firstly calls a newHTALConct method in a Hash time rewarding lock contract on an X chain to create a Hash time rewarding lock, and transaction information is transmitted as parameters, wherein the transaction information comprises 108 coinx (the total transaction amount is the sum of 100 more than 8 time rewarding amounts), a random number s created by a user A with a received address of B1, a hash value h(s) calculated by sha256, a time lock 24h (the maximum unlocking time is allowed, and unlocking transaction cannot be carried out if the maximum unlocking time is exceeded), and 8 coinx are time rewarded. And then returning the ID-HTALConfectIDA of the hash time reward lock, then the user A transmits the HTALConfectIDA to the notary organization, and the user B can verify whether the hash time reward lock information is correct by calling the getHTALConfect method on the X-chain of the HTALConfectIDA uploaded by the user A.
When user a completes the creation, user B creates a hash time bonus lock on the Y-chain, and the entire process is the same as the a creation process and will not be described again. And returns the ID-htalcontactidb of its hash time bonus lock, then user B passes htalcontactidb to the notary authority, at which point user a is notified that unlocking is possible. After receiving htalcontactidb, user a uses the withdraw method of A1 dion Ying Ha time rewarding lock contract on the Y chain to transfer htalcontactidb and random number s (original value of hash time lock), and if the contract judges that the received address is the address of the current calling method, the current time does not exceed the time set by hash time lock, and the transferred random number s is equal to the hash value h(s) in lock, the encryption currency of lock seed can be extracted, then the time rewarding is automatically transferred to the A1 address according to whether the current time meets the requirement of unlocking rewarding, and the rest rewarding gold is returned to user B. After the user A finishes unlocking, the user B obtains the original value s of Ha Xisuo, and then the user B uses the hash time rewarding lock with the address B1 area team ID on the X chain being HTALContractIDA to unlock. The a and B users have thus completed the transfer of cryptocurrency, and finally only have to retrieve their subscription through the notary institution.
If user A creates but user B does not create the hash time bonus lock, or both create but user A times out and does not unlock, resulting in the transaction not being completed, both can invoke the refend method to enter the corresponding HTALContractID to retrieve that piece of cryptocurrency for themselves. The transaction parties can also call the getHTALConfect method to transfer HTALCTID to check the related information, such as payee address, transaction amount, time lock duration, rewarding amount, etc., whether the transaction requirements are met.
Finally, when the transaction stage or the transaction is completed, both parties are trusted, when the user applies for retrieving the subscription, the notary mechanism firstly goes to the getHTALConct method for calling the hash time rewarding lock contract on the corresponding blockchain to check whether the lock exists, if so, whether the sender of the hash time rewarding lock is the address of the current user A or B, whether the receiver address is the opposite party address B1 or A1, whether the time of the time lock is reached, whether the w-draw and the refnd methods of the current hash time rewarding lock are called, and if the subscription is returned to the user, the information is free of problems.
The embodiment of the invention also provides a cross-chain transaction system based on the time lock rewarding mechanism, which is used for realizing the cross-chain transaction method based on the time lock rewarding mechanism, and comprises the following steps:
a contract creation module for creating a contract for a lock and a contract for a hash time bonus lock on two blockchains;
the booking submission module is used for submitting a booking through two transaction parties respectively positioned on the two block chains;
the booking locking module is used for locking the booking of both transaction parties by calling a booking locking contract;
and the rewards and punishments module is used for creating a new hash time lock by calling respective hash time rewards lock contracts by both transaction parties, and if rewards are to be obtained, the other transaction party must complete unlocking in a shorter time.
Fig. 2 is a schematic diagram of an embodiment of an electronic device according to an embodiment of the present invention. As shown in fig. 2, an embodiment of the present invention provides an electronic device, including a memory 1310, a processor 1320, and a computer program 1311 stored in the memory 1310 and executable on the processor 1320, wherein the processor 1320 executes the computer program 1311 to implement the following steps: s1, the method comprises the steps of (1), creating a contract for a bonus lock and a contract for a hash time bonus lock on two blockchains;
s2, submitting orders by both transaction parties respectively located on the two block chains;
s3, locking both parties of the transaction to reserve money by calling a reserve money locking contract;
s4, the two transaction parties call respective hash time rewarding lock contracts to create new hash time locks, and if rewarding is required, the other transaction party must complete unlocking in a shorter time.
Fig. 3 is a schematic diagram of an embodiment of a computer readable storage medium according to the present invention. As shown in fig. 3, the present embodiment provides a computer-readable storage medium 1400 having stored thereon a computer program 1411, which computer program 1411, when executed by a processor, performs the steps of: s1, the method comprises the steps of (1), creating a contract for a bonus lock and a contract for a hash time bonus lock on two blockchains;
s2, submitting orders by both transaction parties respectively located on the two block chains;
s3, locking both parties of the transaction to reserve money by calling a reserve money locking contract;
s4, the two transaction parties call respective hash time rewarding lock contracts to create new hash time locks, and if rewarding is required, the other transaction party must complete unlocking in a shorter time.
In the foregoing embodiments, the descriptions of the embodiments are focused on, and for those portions of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may 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, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded computer, 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, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (9)

1. A method of cross-chain transaction based on a time lock rewarding mechanism, comprising the steps of:
s1, the method comprises the steps of (1), creating a contract for a bonus lock and a contract for a hash time bonus lock on two blockchains;
s2, submitting orders by both transaction parties respectively located on the two block chains;
s3, locking both parties of the transaction to reserve money by calling a reserve money locking contract;
s4, the two transaction parties call respective hash time rewarding lock contracts to create new hash time locks, and if rewarding is required, the other transaction party must complete unlocking in a shorter time.
2. The method for cross-chain transaction based on a time lock rewarding mechanism of claim 1 wherein S3 specifically comprises: the notary institution invokes the contract lock contract to lock the transaction for the two parties to contract.
3. The method for cross-chain transaction based on time lock rewards mechanism of claim 2 wherein S4 specifically comprises:
based on the original hash time locking contract, the transaction parties can selectively add extra rewards to create a hash time rewarding lock contract, after the two parties subscribe to the contract and lock, the transaction parties call the respective hash time rewarding lock contract to create a new hash time lock, and the respective new hash time lock ID is transmitted into a notary mechanism;
when the transaction is completed or the transaction is interrupted, if any transaction party needs to retrieve the self-subscription, the notary mechanism goes to the blockchain of the transaction party to verify whether the corresponding new hash time lock information is correct, if so, the self-subscription can be retrieved, otherwise, the self-subscription cannot be retrieved;
if any transaction party needs to take out the contract of the other party, the notary institution goes to the other party to verify whether the new hash time lock information is correct or not, if so, the new hash time lock information cannot be taken out, otherwise, the new hash time lock information can be taken out.
4. The method for cross-chain transactions based on a time lock rewarding mechanism of claim 2 wherein said notary institution obtains a third party institution with public trust by scoring and electing by network users; or by a notarization authority approved by a judicial agency.
5. The method for cross-chain transaction based on a time lock rewards mechanism of claim 1 wherein S4 specifically comprises:
user A invokes the hash time rewarding lock contract on the X chain where the user A is located to create the hash time rewarding lock, then returns the IDA of the hash time rewarding lock, then the user A transmits the IDA to a notary mechanism, and user B can verify whether the hash time rewarding lock information is correct or not through acquiring the related information of the hash time lock on the X chain of the IDA uploaded by the user A, and if the hash time rewarding lock information is incorrect, the user B is malicious.
6. The method of cross-chain transaction based on a time lock rewards mechanism of claim 1 wherein the information of the transaction includes: transaction total, received address, random number, hash value h(s) calculated by sha256, time lock, time reward.
7. A time lock rewarding mechanism based cross-chain transaction system for implementing a time lock rewarding mechanism based cross-chain transaction method as claimed in any of claims 1 to 6, comprising:
a contract creation module for creating a contract for a lock and a contract for a hash time bonus lock on two blockchains;
the booking submission module is used for submitting a booking through two transaction parties respectively positioned on the two block chains;
the booking locking module is used for locking the booking of both transaction parties by calling a booking locking contract;
and the rewards and punishments module is used for creating a new hash time lock by calling respective hash time rewards lock contracts by both transaction parties, and if rewards are to be obtained, the other transaction party must complete unlocking in a shorter time.
8. An electronic device comprising a memory, a processor for implementing the steps of the time lock rewards mechanism based cross-chain transaction method of any of claims 1-6 when executing a computer management class program stored in the memory.
9. A computer readable storage medium, having stored thereon a computer management class program which when executed by a processor implements the steps of a time lock rewards mechanism based cross-chain transaction method of any of claims 1-6.
CN202310243063.9A 2023-03-14 2023-03-14 Cross-chain transaction method and system based on time lock rewarding mechanism Pending CN116522376A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310243063.9A CN116522376A (en) 2023-03-14 2023-03-14 Cross-chain transaction method and system based on time lock rewarding mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310243063.9A CN116522376A (en) 2023-03-14 2023-03-14 Cross-chain transaction method and system based on time lock rewarding mechanism

Publications (1)

Publication Number Publication Date
CN116522376A true CN116522376A (en) 2023-08-01

Family

ID=87398322

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310243063.9A Pending CN116522376A (en) 2023-03-14 2023-03-14 Cross-chain transaction method and system based on time lock rewarding mechanism

Country Status (1)

Country Link
CN (1) CN116522376A (en)

Similar Documents

Publication Publication Date Title
JP6920333B2 (en) Secure peer-to-peer communication method on the blockchain
JP7407895B2 (en) Blockchain for general calculations
US11861606B2 (en) Blockchain system for confidential and anonymous smart contracts
Rabinovich-Einy et al. Blockchain and the inevitability of disputes: The role for online dispute resolution
CN107341402B (en) Program execution method and device
KR20200091882A (en) Incremental digital asset collateral wallet
JP2019519137A (en) Distributed Transaction Propagation and Verification System
Xu et al. A game-theoretic analysis of cross-chain atomic swaps with htlcs
CN106656600B (en) Resource rotation method and device
CN111383114A (en) Asset information management method and device based on block chain
US11449938B2 (en) Methods and systems for tracking unspent transaction output (UTXO) tokens in a distributed ledger technology-based network
AU2022215275A1 (en) Temporary consensus networks in a resource transfer system
Ng et al. LDSP: shopping with cryptocurrency privately and quickly under leadership
CN116415955A (en) Cross-chain transaction method and system based on combination of hash locking and notary
CN112016114B (en) Intelligent contract generating method based on cryptocurrency, related equipment and storage medium
CN116522376A (en) Cross-chain transaction method and system based on time lock rewarding mechanism
US20210350365A1 (en) Control method, data structure, server, and recording medium
CN111915313B (en) Digital asset transfer control method, device and communication system for blockchain
Herlihy et al. Adversarial cross-chain commerce
Shi et al. Formal verification of fair exchange based on bitcoin smart contracts
US20210342940A1 (en) Method, system, and medium for blockchain-enabled atomic settlement
Löf Decentralized transactions in a centralized environment: A blockchain study within the transport industry
Semaan A novel penalty system to limit profitability of selfish mining
NADAHALLI Improving Censorship-Resistance, Privacy, and Scalability of the Bitcoin Ecosystem
Cribäck Micro payments: Viable technical platforms and models for a bankto provide payments on micro amounts

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