Lightning Network: To Break Through Impossible Triangle Advance Path
Tags: Blockchain Business, Tech, Invest, Blockchain Development, Lightning Network

Lightning Network: To Break Through Impossible Triangle Advance Path

How does AITD Blockchain set a concurrent and quick confirmed lightning networks to resolve current pain point issues for Public chain as a public chain at business level under the restriction of impossible triangle in 2020.

So-called impossible triangle is referring to a distributed account keeping system, it is not able to satisfy extensibility, safety, and decentralization trait simultaneously. Extensibility means performance, or concurring capability; Safety means Ledger consistency; And decentralization, this is having confusability trait, people always consider Decentralization as the purpose. However, decentralization’s purpose is to improve viability, if the decentralization process is thoroughly, which means the strong survival capability it has.

Bitcoin is choosing safety and decentralization traits, therefore, it sacrifices performance. From the time it was created and the purpose of Bitcoin, this choice is reasonable. However, it is undeniable that its underlying application technology is always facing multiple unsatisfied problems, such as poor extensibility , high transaction fees, transaction speed delay etc. For example: In terms of processing capability (tps) , whole network is processing 7 transactions /second; In terms of time delay, it will take 10 minutes to generate a Block; In terms of transaction confirmation , after 6 Blocks are confirmed then can be considering as transaction finalization, block trade will wait for more time; In terms of capacity， current generated Blocks are around 400,000, which is taking about 60 GB data quantity, and magnitude is gradually enlarging in the future.

AITD Blockchain is clear that any products will have a life cycle, from respecting user’s choice, protecting user’s assets aspect, setting confirm in seconds, unlimited TPS as design goal, getting rid of decentralization, to choose lightning network in order to pursue extensibility and safety is reasonable.

Although lightning network is currently at initial stage, it already attracted a lot of attentions. Until now, nodes quantities have passed 8000, channels are exceeding 25000,internet capacity is reaching 760 BTCs. Previously, someone initiated “ Lightning torch” to disseminate lightning networks on Twitter, the content is about to process payment “Relay Race “ through lightning networks. Each new torch bearer will receive last torch bearers “SAT”（The total amount of all the previous SAT combined ), and add 10,000 SAT to pass to the next torch bearer.

What Actually Is Lightning Network ?

At present, the processing capacity of the blockchain is only 7–30 transactions per second (Let’s take Bitcoin and Ethereum as examples), and there are a large number of transactions waiting to be processed in the block, so the mining labors who carry out the package accounting are picking the transaction which pays the highest mining labor fee . According to this behavior , a large amount of high frequency ,small amount of transactions will not be processed in time.

Therefore,, the Lightning Network has proposed an improvment plan. The idea is to build a “green channel” beyond the Blockchain and conduct a large number of high-frequency and small transactions beyond the blockchain. In this way, both parties to the transaction can proceed multiple, high-frequency, two-way, and peer-to-peer payments through this “green channel”, which can achieve instant confirmation of micro-payments; and if there are no direct peer-to-peer payment channels between the two parties, as long as there is one a payment path which consisting of multiple payment channels that connects both parties can also use this payment path to achieve reliable transactions in the lightning network.

LIGHTNING NETWORK WORK PROCESS

If A wants to process transaction with B or F, then it can use a payment channel built between AB and AF;If A wants to proceed payment with D, then it needs to rely on the “Relay Race”among AB,BE,ED, This time ,intermediaries B.E will get certain “Toll Fee”.

In regards to why it needs to be high frequent, small amount transaction? This is involving the core concept of Lightning Network:RSMC(Recoverable Sequence Maturity Contract) and HTLC(Hashed Timelock Contract . The first concept resolves confirmation problems for off-chain transactions;The second concept resolves payment channel issues.

What is RSMC? Repeal Sequence Mature Contract

Chinese translation is “Revocable Sequential Maturity Contract”. Its main idea is similar to the reserve mechanism, that is to say, to ensure the validity of the transaction and avoid deception behavior, both parties must deposit a certain portion of the funds within this payment channel, and this payment channel is similar to a third-party intermediary, which supervises and judges if funds of both parties is sufficient to pay for each transaction (to fully control the transaction risk, each transaction cannot exceed the limit of the channel balance).

RSMC WORK PROCESS

For example, A and B need to process a transaction, so when the micro-payment channel is established, both parties must have a certain amount of funds deposited in the channel. We assume that the current funds are 0.4 for A and 0.6 for B in the channel, so pre-deposit in the channel A total of 1.0 BTC of funds, of which A has 0.4 BTC and B has 0.6 BTC. The establishment of payment channels will be recorded on the blockchain of Bitcoin.

One time, B decides to pay 0.1BTC to A. In the case that both parties sign and approve, the latest balance distribution plan of the off-chain payment channel will become (A is 0.5, B is 0.5), and both parties need to sign and agree to void the previous version of the balance distribution plan (A is 0.4, B is 0.6) In this way, A actually gains control of 0.5BTC.

If A considers that he will trade with B in the future, A does not need to withdraw the 0.5 BTC that now belongs to her, nor does he need to update the changed balance allocation plan on the Bitcoin blockchain, because if they do another transaction (such as A pays 0.2BTC to B), they still only need to agree on the balance allocation plan for off- chain and try to invalidate the previous version of the balance allocation plan.

If A does not plan to trade with B again and wants to use the funds of the channel, she needs to show the balance distribution plan signed by both parties to the Blockchain. If B does not raise an objection within the certain time, the blockchain will terminate the payment channel of both parties and transfer the funds to their respective pre-established withdrawal addresses according to the agreement. If B submits evidence within the specified time to prove that A has submitted a balance distribution plan that both parties have agreed to void, then funds of A will be deducted as punishment and give to B.

In addition, in order to encourage both parties to use the channel for transactions as long as possible, RSMC has sent a small penalty to the initiated closing party: the initiated closing party will receive funds later than the other party, which means that whoever initiates the closing of the channel will suffer the consequences.

What is HTLC?

RSMC guarantees that direct transactions can be completed off-chain between two people , and HTLC (Hashed Timelock Contract , Chinese translates as “hashed contract which has clock”) guarantees that any transfer between two people can be made through a “payment” “Channel to complete. Together, these two mechanisms can achieve that transactions can be completed off-chain between any two persons.

HTLC WORK PROCESS

As above diagram,A wants to send 0.05 BTC to D, but there is no micro payment channel between A and D. However, it does not matter, Lightning network is matching a payment channel for A which needs to pass B,C to reach D, this path is created through the “Relay Race” of A/B, B/C and C/D these three micro payment channels.

D generates a hash value R and sends Hash(R) to A, A does not need to know R. The functions of R and Hash(R) are similar to a key and a lock, and the lock can be unlocked only if they match together.

A and B agree on an HTLC contract: As long as B can show A the correct R within 3 days, A will pay B 0.052 BTC; if B can’t do this, the money will be automatically refunded to A after 3 days.

Similarly, B and C agree on an HTLC contract: As long as C can show B with the correct hash R within 2 days, B will pay C 0.051 BTC; if C cannot do this, the money will be automatically returned to B when it expires.

Finally, C and D agree on an HTLC contract: As long as D can show the correct hash to C within 1 day, C will pay D, 0.05 BTC; if D cannot do this, the money will be automatically returned to C when it expires.

when the plan is settled, D discloses R to C in time and gets 0.05 BTC; now C knows R, she can show the password R to B and get 0.051 BTC (the difference of 0.001BTC becomes C’s commission); Of course, when B knows R will show it to A and get his share of 0.052 BTC, and the difference of 0.001 BTC becomes B’s commission. The final result is that A safely paid 0.05 BTC to D through the Lightning Network, and the price paid was only 0.002 BTC “toll fee” (commission) which is paying to B and C (nodes).

In terms of AITD network, by building a second-tier transaction network on the basis of its public chain, in this network, both transaction parties can establish a payment channel and realize the asset ownership transfer through sending dual-signed transaction information. Real-time transactions between both transaction parties can be realized. through the Lightning Network, high-frequency and small-amount funds can be transferred within the channel without announcing the transaction to the entire AITD networks. When this transaction mechanism can be extended to a large number of user groups, it will finally achieve an unlimited concurrent and legal AITD transaction network.

AITD Blockchain achieve high extensibility through the Lightning Network, which can accommodate millions to billions of transactions per second. It also possess real-time transactions, transaction time is calculated in milliseconds; transaction costs are also extremely low, which is enough to support small amounts Application scenarios of payment. At the same time, because not all transactions are saved on the public blockchain, it will be published to the block only when the transaction channel is finally shut down, so it can ensure the privacy of users to a considerable degree.

Especially in scenarios such as cross-border payments, AITD Blockchain has shown unparalleled advantages, not only improving the cost structure, but also increasing profitability. It realizes all-weather payment and instant payment, saves a lot of handling fees while speeding up the transaction process, and provides more possibilities for third-party payment in the field of cross-border e-commerce export trade.