While parallels between bitcoin and savings accounts have been drawn, Lightning has often been likened to a chequing account. How exactly does this work?
The following is what would ensue if an individual named Alice wanted to use the Lightning network to purchase some bread from a bakery shop.
Alice would first have to set up her lightning node (a user on the network is known as a node) and open a channel with the bakery shop or any other node connected to the bakery shop on the lightning network. Alice does not have to necessarily connect directly to the bakery shop’s node since her payment for a loaf of bread can be relayed by other nodes connected to the bakery shop. The web of interconnected nodes makes it possible for a payment to hop from channel to channel before reaching its destination. Hence, Alice does not have to concern herself with how her payment gets to the bakery shop.
The two nodes that create the said payment channel do so by creating a multi-signature transaction on the blockchain and deposit some bitcoin into it. For instance, Alice deposits 0.3 BTC whiles the bakery shop deposits 0.1 BTC for possible refunds. A record of these amounts is created and broadcasted on the bitcoin network as soon as the payment channel between Alice and the bakery shop is opened.
Both Alice and bakery shop can now transact endlessly between each other with funds going back and forth instantly each time bread is bought or a refund is made. For example, to buy the first loaf of bread for 0.05BTC, Alice will change the record/balance sheet of the channel to indicate that she now has 0.05 less bitcoin and the coffee shop’s balance will have 0.05 BTC added to it. Both parties will then sign the updated balance sheet with their private keys and keep them without having them broadcasted on the main bitcoin blockchain. The balance sheet would be updated and signed each time a transaction takes place between the two parties.
To close the payment channel, either Alice or the bakery shop will simply have to broadcast the most current balance sheet signed by both parties on the bitcoin blockchain. Following this, both parties would receive their balance after miners have validated their transaction.
Like it is in the example above, only two transactions (the one used to open the channel and the other to close it) are recorded on the bitcoin blockchain. The thousands or millions of transactions in between did not have to be recorded on the public bitcoin ledger. This is precisely how congestion is reduced on the bitcoin blockchain with the Lightning network.
The Lightning network has been growing considerably since its mainnet launch on 15th March 2018. The network had 3695 nodes, 12387 channels and a capacity of 115.78 BTC
at the time of writing. Its proponents are also excited to see the technology gain more adoption from different merchants.
Based on the statistics and potential adoption, most experts see Lightning as a positive game changer and expect it to improve the bitcoin user experience. The technology allows the store of value and medium of exchange property of bitcoin to be fulfilled - the Lightning network serves as the medium of exchange whiles bitcoin is used as a store of value. This leaves out only the unit of account property which should be solved when bitcoin becomes more stable in terms of price.