Bitcoin, Crypto currency, Blockchain

What is the Bitcoin Lightning Network?

6fc288e6cab35568aa504e9b41b1cbf6 - What is the Bitcoin Lightning Network?

The aim of the Bitcoin Lightning Network, and scaling of Bitcoin is, so that, instantaneously, can be carried out large amounts of transactions of any size in a decentralized manner. The use of payment channels. To hedge this network of multi-signature can be used Wallets and so-called Hashed Timelock Contracts (HTLC).

If you compare currencies to Bitcoin, with other Crypto, is used as a classic Argument against Bitcoin is the scaling problem. Short, Bitcoin is currently not able to process so many transactions that it could compete with classic payment systems.

To be fair, is not to emphasize that Bitcoin was just the goal to be a payment system like Visa. Not for nothing is the acronym goes back to BYOB – Be your own bank – on the early days of crypto currency. According to Some Bitcoin to see rather than an underlying payment system, which you can use on a global level.

Nevertheless, the Numbers still shock: While Visa can process up to 65,000 transactions per second, in the case of Bitcoin, only a maximum of seven.

Challenges when Scaling a Blockchain

A classic possibility for the scaling of block-chain based crypto-currencies to change limits like the block size or the interval. In other words, how much data can be stored in a Block and how often a new Block is generated.

A calculation shows, however, that one encounters the limits too soon: the Conservative estimate of Visa 500 processed times as many transactions as Bitcoin. This means that the blocks would have to be at least 500 MB in size – if you stay in a Ten-minute interval. Per hour for the Blockchain to 3 GB would grow, per day to 72 GB. And this is extremely appreciated conservative! A faster block time solves this Problem, but only ensures that transactions are not distributed over the entire Node-network.

It exists, for example, in the case of Bitcoin Cash, the approach, payments to trust without confirmation, but firstly, in many of the Wallets used the function “Replace by Fee” in the way. Secondly, one should bear in mind, that the Mempool that are familiar in the case of Zero-Confirmation Transactions, is through the memory of the Nodes is limited. This memory is variable. Bitcoin Core Nodes have, finally, the default behavior is that you after two weeks, the Mempool empty. Accordingly, the question of how useful a trust in payments without confirmation.

However, a payment network such as Visa could be based on Bitcoin. The goal would be to create a payment network so that it is possible, on a decentralised basis. Exactly trying to reach the Lightning Network.

Extremely technically expressed in terms of Lightning Network is an Implementation of the Hashed time lock Contracts with bi-directional Payment Channels, enabling transactions over a network of P2P Payment Channels can be managed. In order to understand this sentence completely, you need to be explains some concepts in more detail.

Payment Channels – the base of The Lightning Network

The core of the Lightning Network of Payment Channels. So anyone who wants to understand the Lightning Network, you should understand in the first step, unidirectional and bi-directional payment channels.

The classical channel or the Payment Channel between two participants or Peers. The multi-signature technology, Bitcoins and a so-called lock time is used. Using multi-signature transactions can be used to generate transactions with more than one Private Key to Sign a transaction. In the case of payment channels to generate a so-called 2-2-Multisig transactions. This means that with this transaction, a related Bitcoin require the consent of both parties for a Send. The lock time ensures that for a certain period of time, the Coins within the Multisig are transferable.

Specifically, the Whole thing looks like this: let’s Say, the parties Alice and Bob want to frequent exchange of very small amounts of money to each other. Alice opened a payment channel by sending a specified amount to the multi signature address, consisting of the Keys of Alice and Bob. For example, this amount is 100.000 Satoshi. This corresponds to almost six euros.

Previously, she creates a second transaction that sends the in a month’s time the 100,000 Satoshi to a controlled address. This is your safety. It should come to problems with Bob and trade with him, can not take place, will be sent in a month, the money to a controlled address. Bob could hold 100,000 Satoshi a maximum for a month as a “hostage” – not forever.

Now, on the one hand is established between Alice and Bob, a framework, on the other hand, Alice has taken a hedge. Within the Multisig transaction can now take place in micro-transactions. For this purpose it is updated within the MultiSig address, the Balance continuously. Wants to pay Alice 100 Satoshi to Bob and updates the ownership in the Multisig address to Alice then 99.900 Satoshi and 100 Satoshi to Bob. This incremental update can be continued so long, until the lock time has expired – no fees and instantaneously.

With all the top of the steps, only Alice signs the Multisig transaction. Bob is free until the end of the lock time, to send the transaction by Signing his page in the network as a whole, and thus to close the Payment Channel. Profit-oriented Bob waits until either the lock time nearly expired or the available framework of Alice is exhausted.

Commitments – When there are channels to go in both directions

The mechanism described above is called a one-way channel, since only Alice to Bob money can pay for. Want to Alice and Bob payments, would a bi-directional channel to talk. The Whole thing leads to a Dilemma: Why is Bob, as in the example above, it should wait the time until the lock time? He could claim the entire Stake immediately.

To prevent this, the Lightning Network uses the approach of mutual protection. Alice and Bob think in terms of Placing the Channel in each case a number, and send each other a Hash of the same. As in the case of a one-way Payment Channel, the payment partner, generate a Multisig address. Before sending this to the Rest of the world, generate Alice and Bob each have a Commitment Transaction. In this Commitment Transaction, the Funds: One part goes to the producer of the Commitment Transaction itself, a second part in a Time-Locked address to which the opposite party according to a specified time access. Both contracts have created, to prevent fraud.

Lightning: From the channel to a network

So far, So good, but really far a, such a Channel does not bring. Previously, these would have to build for each payment activity a new Channel. So Alice and Carol should want to do business, would need to build both a business partner a payment channel, regardless of whether Carol and Bob have already exchanged Bitcoins to each other or not. Peer-to-Peer would be distorted in the Extreme, and absolutely not efficient. One approach would be that participants in different payment channels enter transactions. Alice would be able to send money to Carol about Bob. The question is whether you can trust Bob. For one thing, he could claim the money for themselves and simply do not give, on the other, the Lightning Node of Bob could be.

The solution in the Lightning Network Hashed Timelock Contracts or short-HTLCs are: guarantee that something can’t happen. While Carol thinks of a secret, a random number. The Hash of Carol to Alice. This Hash is now for the pledge: Bob receives a payment, if he knows the secret. This can check Alice by using the Hashes. Bob passes the Hash to pay again with the promise that, if the receiver reveals the secret. In principle, the path between Alice and Carol may include additional participants, the use of all of the Hash as pledge, in the picture it has formed only a simple network of three parties.

Using the HTLCs Payment Channels can be between various parties connected to each other. You see: participants in the network, as Nodes, a bridge between Alice and Carol, are the backbone of the Lightning Networks. Their importance can be compared with that of the Miner to the regular Blockchain.

The Blockchain continues to play a Central role for the final Settlement of payments, and thus for the global consensus. It is secondary, whether it is, in fact, the Bitcoin Blockchain: The Lightning Network can also currencies with other Crypto like Litecoin interact. As you can realize, finally, the Atomic Swaps. Here, a Channel is opened, the final one Settlement on different block chains stores.

Lightning Network know in their own Wallet

The Lightning Network is not ready yet. Although more than 2,000 Lightning Nodes exist in the meantime. Nevertheless, there is no guarantee that two users can actually build up a payment channel. It is so a lot to do. True to the Motto “Be your own Bank” can help here, everyone: Particularly ambitious can set up your own Lightning Node.

But even without Downloading the entire Blockchain, you can benefit from the Lightning Network. If you want to experiment, can be used as a Web Wallet With Zap and the Lightning App two Desktop Wallets. Finally, there is with Eclair, even a Mobile Wallet for Android users. As described elsewhere, with Coingate, a Service with which you can quickly allow transactions over the Lightning Network in the own Webstore.

You can see that much is in motion. We are BTC-ECHO will continue to report on the Lightning Network.

Leave a Comment