CN113763163A - Block chain payment channel network transaction commission distribution method and system - Google Patents

Block chain payment channel network transaction commission distribution method and system Download PDF

Info

Publication number
CN113763163A
CN113763163A CN202110833195.8A CN202110833195A CN113763163A CN 113763163 A CN113763163 A CN 113763163A CN 202110833195 A CN202110833195 A CN 202110833195A CN 113763163 A CN113763163 A CN 113763163A
Authority
CN
China
Prior art keywords
transaction
path node
path
sender
node
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
CN202110833195.8A
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.)
Sun Yat Sen University
Original Assignee
Sun Yat Sen University
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 Sun Yat Sen University filed Critical Sun Yat Sen University
Priority to CN202110833195.8A priority Critical patent/CN113763163A/en
Publication of CN113763163A publication Critical patent/CN113763163A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06QDATA PROCESSING SYSTEMS OR METHODS, SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL, SUPERVISORY OR FORECASTING PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL, SUPERVISORY OR FORECASTING PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06QDATA PROCESSING SYSTEMS OR METHODS, SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL, SUPERVISORY OR FORECASTING PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL, SUPERVISORY OR FORECASTING PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/085Payment architectures involving remote charge determination or related payment systems

Abstract

The invention provides a block chain payment channel network transaction commission fee distribution method and a system, which solve the problems that the commission fee distribution mode is unreasonable in the current block chain lower payment channel transaction and is not beneficial to the improvement of the block chain network transaction efficiency.

Description

Block chain payment channel network transaction commission distribution method and system
Technical Field
The invention relates to the technical field of blockchain transactions, in particular to a method and a system for distributing handling fee of blockchain payment channel network transactions.
Background
In 2008, the inventor has provided digital currency, bitcoin, which has raised the global trend of heat, and the core technology block chain technology has become the key research direction. The block chain is a novel distributed infrastructure and a calculation mode, and characteristics of decentralization, openness and transparency, safety and reliability, no tampering and the like are realized by a block chain type data structure, a distributed node consensus algorithm, cryptography, intelligent contract and the like. However, due to the strict consensus verification and signature authentication mechanism and the limitation of the block size, the throughput of the block chain processing transaction is low and the scalability is poor. For example, bitcoin processes up to 7 transactions per second, and verifies and confirms that new transactions take 10 minutes on average, which is unacceptable for high concurrent transactions, and at this time, the payment channel comes out as an efficient extension.
For example, 11/7/2017, a high-efficiency and safe blockchain down-link high-frequency transaction payment method and system are disclosed in the invention patent of china (publication number: CN107330787A), firstly, a transaction party establishes a payment channel under a chain, then, an agreed fund pool and transaction locking time are established, the transaction party changes the balance in the agreed fund pool in a multi-signature manner within the transaction locking time, after the transaction locking time is reached, the transaction party submits to a blockchain network to complete a transaction, that is, the payment channel transfers frequent and small amount transactions on the blockchain to be executed under the chain, nodes of both transaction parties respectively put initial funds to establish a point-to-point down-link payment channel, the transaction establishing the channel is performed on the blockchain, and then, the transactions and the updates of funds are allowed to be performed under the block chain privately, and the midway transactions do not need to be performed on the blockchain. When they have completed all of the down-chain transactions, deciding to close the channel, the latest fund allocation information may be updated onto the blockchain and the payment channel closed. In the whole process, only two operations of creating and closing a payment channel need to be performed on a block chain, the rest transaction information is privately recorded and changed by two nodes, and the atomicity and the safety of the transaction are guaranteed through protocols such as an intelligent Contract (Smart Contract), a Hash Time Lock Contract (HTLC for short), a removable Sequence Maturity Contract (RSMC for short) and the like, so that Time delay and extra expense caused by broadcasting and node consensus are avoided, the efficiency is improved, and the transaction amount in unit Time is increased.
From a macroscopic point of view, a plurality of Payment channels can form a Payment Channel Network (Payment Channel Network), such as a lightning Network of bitcoin, a lightning Network of ether house, and the like. In a payment channel network, nodes may complete a down-link transaction through a multi-hop path, i.e., complete the transaction via intermediate nodes. With the increasing number of payment channels, the size of the payment channel network will be larger and larger. Therefore, how to find a feasible and efficient transaction path, i.e. a transaction routing problem, for the sender and the receiver of a transaction becomes a key problem in the payment channel network. At present, a routing algorithm considering the fund inclination degree exists, but the consideration of the problem of transaction commission charge distribution in a block chain payment channel network is deficient, namely, a sender needs to give a certain commission charge to an intermediate node as a reward for assisting the transaction in one transaction of the payment channel network, so that the efficiency and the capacity expansion performance are improved, but the conventional method is to ignore the commission charge or averagely distribute the commission charge by the participating intermediate node, and the commission charge distribution mode is not reasonable enough, so that a network transaction mechanism is not fair enough, a path node cannot be attracted to join, and the improvement of the efficiency of block chain network transaction is not facilitated.
Disclosure of Invention
In order to solve the problem that the network transaction mechanism is not fair enough due to unreasonable handling fee distribution mode in the transaction of the lower payment channel of the current blockchain, the invention provides a handling fee distribution method and a system for network transaction of blockchain payment channels.
In order to achieve the technical effects, the technical scheme of the invention is as follows:
a method for allocating handling fee for blockchain payment channel network transaction, the method at least comprising:
s1, determining a transaction path node, a payment channel fund parameter and a fund transaction amount between path nodes in an original HTLC contract between a sender and a receiver of a transaction;
s2, sequentially acquiring the inclination degree of the path nodes from the sender to the receiver;
s3, according to the inclination degree of the path nodes, calculating the temporary weight of each intermediate path node by the sender, and calculating the total weight according to the temporary weight;
s4, calculating the commission charge which is required to be obtained by each path node by the sender according to the total weight;
s5, adding the commission charge which each path node should obtain on the fund transaction amount between the path nodes in the original HTLC contract, completing the transaction according to the HTLC transaction flow, and sending the original image y to the sender by the receiver;
s6, sequentially sending the HTLC contracts taking y as the original image to the next path node in the direction from the sender to the receiver, and setting a fund transaction amount;
and S7, sequentially receiving the HTLC contracts from the receiving party to the receiving party, and finishing the HTLC contract transaction by using the original image y.
Preferably, let V be the sender of the transaction0The receiving party is VmThe node of the transaction path between the sender and the receiver is denoted as Pi=(V0,V1,V2,V3,…,Vm-1,Vm);
Generating a payment channel between the path nodes, wherein the payment channel fund parameter comprises:
the fund of the path node on the payment channel is represented as C and the commission fee provided by the senderi=(C0,C1,C2,C3,…,Cm-1,Cm) The commission Fee provided by the sender is Fee;
the fund transaction amount between the path nodes in the original HTLC contract is as follows: x is the number of0,1,x1,2,x2,3,x3,4,…,xm-1,mWherein x ism-1,mRepresents a path node Vm-1And path node VmThe amount of funds transactions that occur in between.
Preferably, for path node Vm-1And path node VmIn other words, path node Vm-1And path node VmThe gradients in between are respectively expressed as:
wherein, Cm-1,m=Cm-1+Cm;Sm-1Represents a path node Vm-1Is marked asSmRepresents a path node VmThe gradient of (2) is recorded asCm-1Represents a path node Vm-1Funds on the payment channel; cmRepresents a path node VmFunds on the payment channel, Sm-1+Sm=1;
Path node Vm-1And path node VmX occurs in betweenm-1,mAfter the fund transaction, the inclination degree is respectively expressed as:
wherein the content of the first and second substances,represents a path node Vm-1And path node VmX occurs in betweenm-1,mCapital transaction back path node Vm-1The inclination of (2);showing roadRadial node Vm-1And path node VmX occurs in betweenm-1,mCapital transaction back path node VmThe inclination of (2);
based on the above solving formula, the inclination degree of the path node in the direction from the sender to the receiver in step S2 is sequentially obtained as follows:
here, for the payment channel network, the degree of skewness can suggest the health degree of the channels and the robustness of the whole network, and the degree of skewness of each channel of the payment channel is taken into consideration, so that the commission charge can be more fairly distributed to each path node.
Preferably, the calculation process of the temporary weight of each intermediate path node in step S3 is as follows:
let the intermediate path node be represented as:
V1,V2,V3,…,Vm-1
the ith path node V between 1-m-1iIn one transaction, at path node ViAnd path node Vi+1Temporary weight on the payment channel in betweenThe expression is as follows:
wherein the content of the first and second substances,respectively represent path nodes ViInclination of (2), path node ViAnd path node Vi+1X occurs in betweeni,i+1Capital transaction back path node ViThe inclination of (2);
the expression for calculating the total weight from the temporary weights is:
wherein, PoweriRepresenting the final weight of each path node.
The final weight of each path node is calculated in an inverse proportion mode, when the weight of one path node is larger, the path node is more in a fund balance state after receiving a transaction result, and therefore, the path node is beneficial to the transaction, and on the premise that the path node is already beneficial, the collection of lower commission charge represents the encouragement behavior of the transactions; the path nodes with lower weights are in a more inclined state after the transaction, which is disadvantageous, so that the final weight is larger to make more compensation.
Preferably, in step S4, the expression of calculating the commission fee that each path node should obtain by the sender according to the total weight is as follows:
wherein, Fee represents the commission provided by the sender; feeiRepresents the ith path node V between 0 and miA commission fee should be obtained.
Preferably, after the commission charge that each path node should obtain is added to the fund transaction quota between the path nodes in the original HTLC contract in step S5, the fund transaction quota between the path nodes in the HTLC contract satisfies:
where the sender and receiver do not have to discuss the commission allocation, x0,1And xm-1,mNo change occurred.
Preferably, in step S6, node V is assigned to the intermediate pathiSequentially transmitting HTLCs with y as primary imageContract to next path node Vi+1The set transaction limit is as follows:
wherein x isi,i+1Represents a path node ViAnd path node Vi+1The amount of funds transactions that occur in between.
By such an approach, a reasonable distribution of the individual intermediate path node commission may be achieved given the path and total commission for the payment channel transaction.
Preferably, the method further comprises: when the path nodes between the sender and the receiver are known and the inclination degree of the payment channels between the path nodes is unknown, each path node puts the own fund inclination into a routing packet based on a routing algorithm.
The invention also provides a system for realizing the block chain payment channel network transaction commission fee distribution method, wherein the system comprises the following steps:
the transaction parameter determining module is used for determining a transaction path node between a sender and a receiver of a transaction, a transaction path node between the sender and the receiver, a payment channel fund parameter and a fund transaction limit between path nodes in an original HTLC contract;
the inclination degree acquisition module is used for sequentially acquiring the inclination degrees of the path nodes from the direction from the sender to the receiver;
the weight calculation module is used for calculating the temporary weight of each intermediate path node by the sender according to the inclination degree of the path nodes and calculating the total weight according to the temporary weight;
the route node commission charge calculation module is used for calculating commission charge which is required to be obtained by each route node by the sender according to the total weight;
the path node commission charge distribution module is used for increasing commission charges which are required to be obtained by each path node on the fund transaction amount between the path nodes in the original HTLC contract, completing the transaction according to the HTLC transaction flow and sending the original image y to the sender by the receiver;
the sender transaction execution module is used for sequentially sending the HTLC contract which takes y as the primary image to the next path node in the direction from the sender to the receiver and setting the fund transaction amount;
and the receiving party transaction execution module receives the HTLC contracts in sequence from the receiving party to the receiving party and completes the HTLC contract transaction by using the original image y.
Compared with the prior art, the technical scheme of the invention has the beneficial effects that:
the invention provides a block chain payment channel network transaction commission charge distribution method and a system, wherein the method comprises the steps of firstly determining the commission charges to be paid by two parties of a transaction, a transaction path and a sender, establishing a payment channel under a block chain, considering the inclination degree of path nodes of the payment channel, distributing funds according to the interest of the inclination degree of the path nodes based on an HTLC contract, and attracting more path nodes to join under the condition of giving the transaction path and the commission charge of the payment channel transaction, so that the whole network is more robust, and the purpose of improving the block chain network transaction efficiency is achieved.
Drawings
Fig. 1 is a schematic flow chart illustrating a method for allocating handling fees for network transactions of blockchain payment channels according to an embodiment of the present invention;
fig. 2 is a block diagram of a system for implementing the method for allocating handling fees for network transactions of blockchain payment channels according to an embodiment of the present invention;
FIG. 3 is a schematic diagram showing the allocation and inclination of funds on the payment path between the sender and the recipient prior to the transaction;
FIG. 4 is a schematic diagram showing allocation and inclination of funds on a payment path between a sender and a receiver after a transaction;
fig. 5 is a schematic diagram showing fund distribution and inclination on a payment channel between a sender and a receiver after transaction by applying the method of the invention.
Detailed Description
The drawings are for illustrative purposes only and are not to be construed as limiting the patent;
for better illustration of the present embodiment, certain parts of the drawings may be omitted, enlarged or reduced, and do not represent actual dimensions;
it will be understood by those skilled in the art that certain well-known descriptions of the figures may be omitted.
The positional relationships depicted in the drawings are for illustrative purposes only and are not to be construed as limiting the present patent;
the technical solution of the present invention is further described below with reference to the accompanying drawings and examples.
Examples
As shown in fig. 1, the invention provides a block chain payment channel network transaction commission fee allocation method, based on a basic protocol of hash time locking, HTLC, which refers to a mechanism for a user to pay by revealing a hash value primitive y in a specified time period, and can realize asset exchange between two parties in a decentralized manner. Under the mechanism, the quick confirmation of the micropayment can be realized, and the flow of the method provided by the invention is shown in figure 1, and the method comprises the following steps:
s1, determining a transaction path node, a payment channel fund parameter and a fund transaction amount between path nodes in an original HTLC contract between a sender and a receiver of a transaction;
in this embodiment, let V be the sender of the transaction0The receiving party is VmThe node of the transaction path between the sender and the receiver is denoted as Pi=(V0,V1,V2,V3,…,Vm-1,Vm);
Generating a payment channel between the path nodes, wherein the payment channel fund parameter comprises:
the fund of the path node on the payment channel is represented as C and the commission fee provided by the senderi=(C0,C1,C2,C3,…,Cm-1,Cm) The commission Fee provided by the sender is Fee;
the fund transaction amount between the path nodes in the original HTLC contract is as follows:
x0,1,x1,2,x2,3,x3,4,…,xm-1,mwherein x ism-1,mRepresents a path node Vm-1And path node VmThe amount of funds transactions that occur in between.
For a transaction path node between a sender and a receiver
Pi=(V0,V1,V2,V3,…,Vm-1,Vm)
The Fee required to be paid by the sender is Fee, and the discussion object of the embodiment is Fee at V2,V3,V4,,…,Vm-1The allocation method between path nodes, because the head node and the tail node are the initiating node and the accepting node of the transaction, there is no practical meaning in discussing allocation of the commission fees, and one transaction may change the tilt degree of the fund, and the tilt degree is obtained by executing step S2:
s2, sequentially acquiring the inclination degree of the path nodes from the sender to the receiver;
in particular, for path node Vm-1And path node VmIn other words, pay channel Em-1,mRepresents a path node Vm-1And path node VmOne payment channel, path node V, is generatedm-1And path node VmThe gradients in between are respectively expressed as:
wherein, Cm-1,m=Cm-1+Cm;Sm-1Represents a path node Vm-1Is marked asSmRepresents a path node VmThe gradient of (2) is recorded asCm-1Represents a path node Vm-1Funds on the payment channel; cmRepresents a path node VmFunds on the payment channel, Sm-1+Sm=1;
Path node Vm-1And path node VmX occurs in betweenm-1,mAfter the fund transaction, the inclination degree is respectively expressed as:
wherein the content of the first and second substances,represents a path node Vm-1And path node VmX occurs in betweenm-1,mCapital transaction back path node Vm-1The inclination of (2);represents a path node Vm-1And path node VmX occurs in betweenm-1,mCapital transaction back path node VmThe inclination of (2);
based on the above solving formula, the inclination degree of the path node in the direction from the sender to the receiver in step S2 is sequentially obtained as follows:
for the payment channel network, the health degree of the channels and the robustness of the whole network can be improved by the inclination degree, and the inclination degree of each channel of the payment channel is taken into consideration, so that the commission charge can be more fairly distributed to each path node.
S3, according to the inclination degree of the path nodes, calculating the temporary weight of each intermediate path node by the sender, and calculating the total weight according to the temporary weight;
the calculation process of the temporary weight of each intermediate path node is as follows:
let the intermediate path node be represented as:
V1,V2,V3,…,Vm-1
the ith path node V between 1-m-1iIn one transaction, at path node ViAnd path node Vi+1Temporary weight on the payment channel in betweenThe expression is as follows:
wherein the content of the first and second substances,respectively represent path nodes ViInclination of (2), path node ViAnd path node Vi+1X occurs in betweeni,i+1Capital transaction back path node ViThe inclination of (2);
the expression for calculating the total weight from the temporary weights is:
wherein, PoweriRepresenting the final weight of each path node.
The final weight of each path node is calculated in an inverse proportion mode, when the weight of one path node is larger, the path node is more in a fund balance state after receiving a transaction result, and therefore, the path node is beneficial to the transaction, and on the premise that the path node is already beneficial, the collection of lower commission charge represents the encouragement behavior of the transactions; the path nodes with lower weights are in a more inclined state after the transaction, which is disadvantageous, so that the final weight is larger to make more compensation.
S4, calculating the commission charge which is required to be obtained by each path node by the sender according to the total weight;
the expression is as follows:
wherein, Fee represents the commission provided by the sender; feeiRepresents the ith path node V between 0 and miA commission fee should be obtained.
S5, adding the commission charge which each path node should obtain on the fund transaction amount between the path nodes in the original HTLC contract, completing the transaction according to the HTLC transaction flow, and sending the original image y to the sender by the receiver;
after the commission charge which is required to be obtained by each path node is added to the fund transaction amount between the path nodes in the original HTLC contract, the fund transaction amount between the path nodes in the HTLC contract meets the following requirements:
where the sender and receiver do not have to discuss the commission allocation, x0,1And xm-1,mNo change occurred.
S6, sequentially sending the HTLC contracts taking y as the original image to the next path node in the direction from the sender to the receiver, and setting a fund transaction amount;
in step S6, node V is assigned to the intermediate pathiSequentially sending the HTLC contract with y as the primary image to the next path node Vi+1The set transaction limit is as follows:
wherein x isi,i+1Represents a path node ViAnd path node Vi+1The amount of funds transactions that occur in between.
By such an approach, a reasonable distribution of the individual intermediate path node commission may be achieved given the path and total commission for the payment channel transaction.
And S7, sequentially receiving the HTLC contracts from the receiving party to the receiving party, and finishing the HTLC contract transaction by using the original image y.
In this embodiment, the method for allocating the procedure fee of the blockchain payment channel network transaction further includes: when the path nodes between the sender and the receiver are known and the inclination degree of the payment channels between the path nodes is unknown, each path node puts the own fund inclination into a routing packet based on a routing algorithm.
The inputs of the whole method are as follows:
degree of funds declination of payment channelOriginal HTLC transaction amount x0,1,x1,2,x2,3,x3,4,…,xm-1,mFee provided by the sender;
the output is: the corresponding transaction is completed.
Referring to fig. 2, the present invention further provides a system for implementing the method for allocating a block chain payment channel network transaction commission fee, wherein the system comprises:
the transaction parameter determining module is used for determining a transaction path node between a sender and a receiver of a transaction, a transaction path node between the sender and the receiver, a payment channel fund parameter and a fund transaction limit between path nodes in an original HTLC contract;
the inclination degree acquisition module is used for sequentially acquiring the inclination degrees of the path nodes from the direction from the sender to the receiver;
the weight calculation module is used for calculating the temporary weight of each intermediate path node by the sender according to the inclination degree of the path nodes and calculating the total weight according to the temporary weight;
the route node commission charge calculation module is used for calculating commission charge which is required to be obtained by each route node by the sender according to the total weight;
the path node commission charge distribution module is used for increasing commission charges which are required to be obtained by each path node on the fund transaction amount between the path nodes in the original HTLC contract, completing the transaction according to the HTLC transaction flow and sending the original image y to the sender by the receiver;
the sender transaction execution module is used for sequentially sending the HTLC contract which takes y as the primary image to the next path node in the direction from the sender to the receiver and setting the fund transaction amount;
and the receiving party transaction execution module receives the HTLC contracts in sequence from the receiving party to the receiving party and completes the HTLC contract transaction by using the original image y.
In the following, the present invention is further described with reference to specific implementation cases, as shown in fig. 3, it is assumed that path nodes between a sender and a receiver are "0", "1", "2", "3" and "4", where "0" is the sender, and "4" is the receiver, and "1", "2" and "3" are all intermediate path nodes, and the fund transaction amount between path nodes in the original HTLC contract is: [10, 10, 10, 10], the allocation and inclination of funds before transaction is shown in FIG. 3, the allocation of funds is from the upper side of the "directional arrow" in the direction from the sender to the receiver, the inclination is shown in the lower side, after a transaction is performed, the allocation and inclination of funds is shown in FIG. 4, and the concrete data of the inclination and the weight of the intermediate path node before and after the transaction are shown in Table 1.
TABLE 1
By applying the method provided by the invention, the fund distribution and inclination on the payment channel between the sender and the receiver after the transaction are schematically shown in fig. 5, and the fund can be distributed according to the interest of the inclination degree of the path node by the method obtained by the aid of the fig. 5.
It should be understood that the above-described embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the claims of the present invention.

Claims (10)

1. A method for allocating handling fee for blockchain payment channel network transaction, the method at least comprising:
s1, determining a transaction path node, a payment channel fund parameter and a fund transaction amount between path nodes in an original HTLC contract between a sender and a receiver of a transaction;
s2, sequentially acquiring the inclination degree of the path nodes from the sender to the receiver;
s3, according to the inclination degree of the path nodes, calculating the temporary weight of each intermediate path node by the sender, and calculating the total weight according to the temporary weight;
s4, calculating the commission charge which is required to be obtained by each path node by the sender according to the total weight;
s5, adding the commission charge which each path node should obtain on the fund transaction amount between the path nodes in the original HTLC contract, completing the transaction according to the HTLC transaction flow, and sending the original image y to the sender by the receiver;
s6, sequentially sending the HTLC contracts taking y as the original image to the next path node in the direction from the sender to the receiver, and setting a fund transaction amount;
and S7, sequentially receiving the HTLC contracts from the receiving party to the receiving party, and finishing the HTLC contract transaction by using the original image y.
2. The method of claim 1, wherein the method further comprises issuing a transactionThe delivery side is V0The receiving party is VmThe node of the transaction path between the sender and the receiver is denoted as Pi=(V0,V1,V2,V3,...,Vm-1,Vm);
Generating a payment channel between the path nodes, wherein the payment channel fund parameter comprises:
the fund of the path node on the payment channel is represented as C and the commission fee provided by the senderi=(C0,C1,C2,C3,...,Cm-1,Cm) The commission Fee provided by the sender is Fee;
the fund transaction amount between the path nodes in the original HTLC contract is as follows:
x0,1,x1,2,x2,3,x3,4,...,xm-1,mwherein x ism-1,mRepresents a path node Vm-1And path node VmThe amount of funds transactions that occur in between.
3. The method of claim 2, wherein the step of allocating the transaction commission of the blockchain payment channel network comprises the step of allocating the transaction commission fee to the blockchain payment channel network,
for path node Vm-1And path node VmIn other words, path node Vm-1And path node VmThe gradients in between are respectively expressed as:
wherein, Cm-1,m=Cm-1+Cm;Sm-1Represents a path node Vm-1Is marked asSmRepresents a path node VmThe gradient of (2) is recorded asCm-1Represents a path node Vm-1Funds on the payment channel; cmRepresents a path node VmFunds on the payment channel, Sm-1+Sm=1。
4. The blockchain payment channel network transaction commission distribution method of claim 3 wherein the path node Vm-1And path node VmX occurs in betweenm-1,mAfter the fund transaction, the inclination degree is respectively expressed as:
wherein the content of the first and second substances,represents a path node Vm-1And path node VmX occurs in betweenm-1,mCapital transaction back path node Vm-1The inclination of (2);represents a path node Vm-1And path node VmX occurs in betweenm-1,mCapital transaction back path node VmThe inclination of (2);
based on the above solving formula, the inclination degree of the path node in the direction from the sender to the receiver in step S2 is sequentially obtained as follows:
5. the method of claim 4, wherein the step S3 of calculating the temporary weight of each intermediate path node comprises:
let the intermediate path node be represented as:
V1,V2,V3,...,Vm-1
the ith path node V between 1-m-1iIn one transaction, at path node ViAnd path node Vi+1Temporary weight on the payment channel in betweenThe expression is as follows:
wherein the content of the first and second substances,respectively represent path nodes ViInclination of (2), path node ViAnd path node Vi+1X occurs in betweeni,i+1Capital transaction back path node ViThe inclination of (2);
the expression for calculating the total weight from the temporary weights is:
wherein, PoweriRepresenting the final weight of each path node.
6. The method of claim 5, wherein the step S4 is to calculate the commission required by each path node according to the total weight by the sending party as follows:
wherein, Fee represents the commission provided by the sender; feeiRepresents the ith path node V between 0 and miA commission fee should be obtained.
7. The method for allocating transaction commission of the blockchain payment channel network of claim 6 wherein in step S5, after the commission fee to be obtained by each path node is added to the fund transaction quota between the path nodes in the original HTLC contract, the fund transaction quota between the path nodes in the HTLC contract satisfies:
where the sender and receiver do not have to discuss the commission allocation, x0,1And xm-1,mNo change occurred.
8. The method of claim 7, wherein in step S6, the intermediate path node V is usediSequentially sending the HTLC contract with y as the primary image to the next path node Vi+1The set transaction limit is as follows:
wherein x isi,i+1Represents a path node ViAnd path node Vi+1During hair-cuttingThe raw funds trade.
9. The blockchain payment channel network transaction commission distribution method of claim 1 further comprising: when the path nodes between the sender and the receiver are known and the inclination degree of the payment channels between the path nodes is unknown, each path node puts the own fund inclination into a routing packet based on a routing algorithm.
10. A system for implementing the method for allocating handling fee of network transaction of blockchain payment channel according to any one of claims 1 to 9, the system comprising:
the transaction parameter determining module is used for determining a transaction path node between a sender and a receiver of a transaction, a transaction path node between the sender and the receiver, a payment channel fund parameter and a fund transaction limit between path nodes in an original HTLC contract;
the inclination degree acquisition module is used for sequentially acquiring the inclination degrees of the path nodes from the direction from the sender to the receiver;
the weight calculation module is used for calculating the temporary weight of each intermediate path node by the sender according to the inclination degree of the path nodes and calculating the total weight according to the temporary weight;
the route node commission charge calculation module is used for calculating commission charge which is required to be obtained by each route node by the sender according to the total weight;
the path node commission charge distribution module is used for increasing commission charges which are required to be obtained by each path node on the fund transaction amount between the path nodes in the original HTLC contract, completing the transaction according to the HTLC transaction flow and sending the original image y to the sender by the receiver;
the sender transaction execution module is used for sequentially sending the HTLC contract which takes y as the primary image to the next path node in the direction from the sender to the receiver and setting the fund transaction amount;
and the receiving party transaction execution module receives the HTLC contracts in sequence from the receiving party to the receiving party and completes the HTLC contract transaction by using the original image y.
CN202110833195.8A 2021-07-22 2021-07-22 Block chain payment channel network transaction commission distribution method and system Pending CN113763163A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110833195.8A CN113763163A (en) 2021-07-22 2021-07-22 Block chain payment channel network transaction commission distribution method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110833195.8A CN113763163A (en) 2021-07-22 2021-07-22 Block chain payment channel network transaction commission distribution method and system

Publications (1)

Publication Number Publication Date
CN113763163A true CN113763163A (en) 2021-12-07

Family

ID=78787840

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110833195.8A Pending CN113763163A (en) 2021-07-22 2021-07-22 Block chain payment channel network transaction commission distribution method and system

Country Status (1)

Country Link
CN (1) CN113763163A (en)

Similar Documents

Publication Publication Date Title
Khalil et al. Revive: Rebalancing off-blockchain payment networks
CN107341660B (en) Block chain bottom layer consensus mechanism and block chain system based on same
CN108009811A (en) A kind of across chain communication means towards high in the clouds computing environment exchange of value
CN109034840A (en) The green card method of commerce and system generated based on clean energy resource
WO2019092508A2 (en) System and method for scaling blockchain networks with secure off-chain payment hubs
CN109064167B (en) Data processing method and device based on block chain
CN109409877B (en) Block chain cross-chain value interaction method based on HTLC technology
CN105678151A (en) Block chain transmitting method and system for constructing trustable nodes/satellite nodes
Di Stasi et al. Routing payments on the lightning network
Jourenko et al. SoK: A taxonomy for layer-2 scalability related protocols for cryptocurrencies
Khalil et al. Commit-chains: Secure, scalable off-chain payments
CN110751468A (en) Multi-directional state channel method, system and medium for block chain expansion
CN111046437A (en) Block chain parallel transaction processing method and system based on isomorphic multi-chain and terminal
CN111563786A (en) Virtual power plant regulation and control platform based on block chain and operation method
Pang A new consensus protocol for blockchain interoperability architecture
CN111325628B (en) Multi-party payment channel transaction method based on block chain
CN110928951A (en) Data sharing and arbitration method based on block chain
CN112907252A (en) Block chain transaction method and system based on multi-person down-chain channel
CN112995167A (en) Kafka mechanism-based power utilization information acquisition method, block chain network and user side
WO2020059865A1 (en) Settlement system, settlement method, user device, and settlement program
CN110310107A (en) Settlement method, block chain node and client based on block chain
CN110610421B (en) Guarantee fund management method and device under fragment framework
CN110751469A (en) Encrypted currency multichannel payment method based on intelligent contract
CN113763163A (en) Block chain payment channel network transaction commission distribution method and system
CN110335038A (en) A kind of gas pays out method

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