DEFINITION of Lightning Network
Lightning Network is a second layer technology for bitcoin that uses micropayment channels to scale its blockchain’s capability to conduct transactions.
By taking transactions away from the main blockchain, lightning network is expected to decongest bitcoin and reduce associated transaction fees. Transactions conducted on lightning network are instant and will significantly enhance bitcoin’s utility as a medium for daily use.
Lightning Network can also be used to conduct off chain transactions involving exchanges between cryptocurrencies. For example, it is necessary for atomic swaps, which will enable one cryptocurrency to be exchanged for another without the involvement of an intermediary, such as cryptocurrency exchanges.
BREAKING DOWN Lightning Network
Lightning Network was first proposed by Joseph Poon and Thaddeus Dryja in 2016 and is currently under development.
If it is to achieve its potential of becoming a medium for daily transactions, bitcoin will need to process millions of transactions per day. But the nature of its decentralized technology, which requires consensus from all nodes within its network, presents problems.
For example, approving and storing transactions will become expensive and time-consuming if their numbers on bitcoin’s network multiply. An increase in transaction numbers also requires orders of magnitude improvement in the processing power of computers, whether they are situated at home or work, that are required to execute transactions involving bitcoin.
Lightning Network solves the scaling problem by creating a second layer on bitcoin’s main blockchain. That second layer consists of multiple payment channels between parties or bitcoin users. A lightning network channel is a transaction mechanism between two parties. Using channels, the parties can make or receive payments from each other. (See more: Lightning Network: Can It Solve Bitcoin's Scaling Problem?)
But they are processed differently as compared to standard transactions occurring on bitcoin’s blockchain. They are only updated on the main blockchain when two parties open and close a channel.
Between those two acts, the parties can shift funds between themselves endlessly without informing the main blockchain about their activities. This approach dramatically speeds up a transaction’s speed because all transactions are not required to be approved by all nodes within a blockchain.
Individual payment channels between various parties combine to form a network of lightning nodes that can route transactions among themselves. The resulting interconnections between various payment channels is the Lightning Network.
How Does Lightning Network Work?
Much like blockchain, the lightning network disintermediates central institutions, such as banks, which are responsible for routing transactions today.
Here’s a practical example of how a lightning network transaction functions.
Alice opens a channel with her favorite coffee shop and deposits $100 worth of bitcoin in it. Her transactions with the coffee shop are instant because she has a direct channel with it.
Bob, who has a channel open with the grocery store he visits most frequently, also buys coffee from Alice’s shop. The connection between Alice, the coffee shop, and Bob ensures that Alice can use funds from her balance with the coffee shop to buy groceries from Bob’s store. Similarly, Bob can use his grocery store balance to conduct transactions with businesses in Alice’s network.
If Bob closes his channel with the grocery store (and there are no other customers in common between the coffee shop and grocery store), then Alice will have to open another channel with the grocery store to make purchases there. In this way, a web of transactions is created and routed between multiple lightning nodes in a decentralized fashion.
An initial transaction, called the Funding Transaction, is created when one or both parties fund a channel. In a typical multisignature environment, two master keys (one public and another private) are initially exchanged. The exchange facilitates access and spending of funds.
In the case of a lightning node, however, the signatures are not exchanged. This is done to prevent the Funding Transactions’ spend from being recognized by the main blockchain. Instead, the two parties exchange a single key that is used to validate spending transactions (also called Commitment Transactions) between themselves.
The two parties can conduct endless Commitment Transactions between themselves and other nodes on a lightning network. They exchange their master keys only when the channel between them is closed.
Are There Fees For Using Lightning Network?
Yes, there are fees for using Lightning Network. They are a combination of routing charges for routing payment information between lightning nodes and bitcoin’s transaction fees to open and close channels.
As of this writing, the interconnection charges are set to zero because there are very few lightning nodes within the system. In the future, they are expected to increase but not substantially. If the fees associated with the lightning network become too expensive, bitcoin’s users always have the option of moving their transactions to the underlying blockchain.
What Are Some Problems In Lightning Network?
Lightning Network is a relatively nascent technology and is still under development. As such, several problems associated with it are still being solved. Here are some of them.
The most obvious problem pertaining to lightning networks, which are meant to be decentralized, is that they could lead to a replication of the hub-and-spoke model, that characterizes today’s financial systems. In the current model, banks and financial institutions are the main intermediaries through which all transactions take place.
By virtue of having more open connections with others, lightning nodes for prominent businesses may become similar hubs or centralized nodes in the network. A failure at one such hub could easily crash a significant portion of (or the entire) network.
The second problem that is being investigated in lightning networks is the possibility of an increase in bitcoin transaction fees. They are an important constituent of the network’s overall fees. If bitcoin’s transaction fees rise, then a second layer could become redundant since it would become cheaper to conduct transactions on bitcoin’s blockchain.
Lightning networks are also believed to be vulnerable to hacks and thefts because they are required to be online at all times. As such, cold storage of coins is not possible. (See more: Bitcoin's Lightning Network: Three Possible Problems.)