Lightening Networks in Bitcoin and Litecoin (Solving scalability problem):

Uzair Aleem Ansari
3 min readJun 9, 2018

--

To solve the scalability problem in Bitcoin, Lightening Networks were introduced. Hypothetically, it would maintain the same high security level of the current block chain, while also allowing users to instantaneously send and receive payments. This is possible due to the fact that Lightning Network doesn’t require every individual transaction to be recorded on the main network hence decreasing block-chain usage and improving scalability. Because transactions are kept off the main network, this protocol would also eradicate transaction fees and improves speed. Lightning Network batches transactions locally, and updates the Main Chain periodically.

How can it do that? As explained above, the Lightning Network takes most transactions off the block-chain into “payment channels.” But what are these, and how do they work?

It’s not that simple, but it’s not too complicated either. Here’s how the payment channels work:

· The two users on the payment channel make a ledger entry into the block-chain requiring both participants’ signatures to sign off on fund transfers. Both of them create transactions refunding that entry to the individuals in the proper amounts, but those transactions don’t get broadcasted to the block-chain and stay in the two-person or two-entity channel.

· The two parties can easily update their personal allocations for the entry by creating transactions spending from that output, and as before, these transactions stay away from the block-chain. Using Block-chain Smart Contracts, only the most recent transaction is valid and the others are not.

· If one of the parties decides to close the channel, they can easily broadcast the most recent channel version to the block-chain, requiring no trust between parties.

But what if someone wants to send money to someone who they don’t have a payment channel set up? Additionally, this is going to be a one-time or low-frequency transaction, and they doesn’t want to set up a payment channel with them. How does this work?

  • These two-entity payment channels can be connected together to form an entire graph or network. This means that any node on the network can send money to another node if there is a path through the payment channels to transfer transactions.
  • The nodes along the path aren’t trusted with transactional data utilizing a script ensuring that either the whole payment fails or succeeds.

For Example: A Super Store (let’s say “S”) and a regular customer (let’s say “C”) is a great example of this. At the beginning of their trade they would decide that how much value of trade they wanted to do in future (let’s say 10 BTC). So in this case they would open a payment channel, and since “C” is always buying the goods so the ratio would be 10 for “C” and 0 for “S”.

Each time “C” buys some goods, a signed transaction would be made by “C” with the value of the goods bought (let’s say 3) and sent to “S”. And the payment channel would automatically get updated and the ratio would be 7 for “C” and 3 for “S”. Note that the transaction is not broadcasted on the main network, so there will not be any transaction fees.

Let’s say that the customer or the store don’t want to trade any more. In order to get their final values that they have traded till now, they would broadcast the last transaction. And “C” would get its 7 BTC back and “S” would get its 3 BTC.

The Private Batching is often called State Channels, where State means ‘private’ or ‘authority’ (Non-public consensus making). Keep in mind that lightening network is primarily designed to batch transactions and then interact them with the main network. The security risk is there if the transactions are not properly verified.

Refrence:

--

--