This article takes a comprehensive look at what is Lightning Network, a widely discussed solution to Bitcoin's scalability problems.
What Is Lightning Network?
Lightning Network is a scaling solution for Bitcoin that will enable faster and much cheaper transactions. It is a second-layer scaling solution that incorporates smart contract functionalities on top of Bitcoin’s blockchain, allowing for the creation of private, off-chain channels to facilitate instantaneous transactions with minimal fees. The white paper was first proposed by Joseph Poon and Thaddeus Dryja back in 2015. While Bitcoin is often hailed as the first digital currency that enabled the concept of open-source ‘decentralization’, a huge drawback of a distributed system is scalability.
The scalability problem in blockchain refers to its inability to grow and process more transactions with greater network usage and activity.
The goal of scaling solutions such as Lightning Network is to increase the speed of payments to milliseconds or seconds. A core issue facing Blockchain is that every single transaction and data associated with it is recorded publicly on the blockchain (or ‘on-chain’), thereby creating great bottlenecks and pressure if the network is congested. The negative effects of a bloated network are expensive transaction fees (paid to miners) and longer waiting times.
Lightning Network tries to solve the issue by moving the transactions off the main chain (also called ‘off-chain’), and thus reducing the congestion on the blockchain itself.
The general idea behind Lightning Network is that not all transactions are required to be recorded on the Blockchain. Small and everyday transactions (also called microtransactions) don’t have to be stored on the main, public Blockchain.
The direction of payment channels inside Lightning Network is bidirectional (funds are stored into two parties). Since the transactions inside payment channels are just between two parties, the transaction won’t need to be broadcasted to the public blockchain network until the parties decide to close the channel. This means that users will not incur mining fees (paid to miners to validate the transactions) and there will be no block confirmation time. This allows transactions executed within the channel to be instant with very low fees.
Lightning Network was first proposed as a scaling solution for Bitcoin, but different cryptocurrencies – such as Stellar, Litecoin, Zcash, and Ripple – have been working on and developing the technology further.
What is a Payment Channel?
Payment channels refer to an off-chain medium which runs in parallel to the main blockchain. Through the use of smart contracts, two connected parties can perform an unlimited amount of transactions within the private channel without broadcasting these micro-transactions to the main blockchain. The final, settled balance will be broadcasted to the blockchain once users agree to close the channel. Payment channels are called ‘bi-directional’ since it allows exchanges between both parties.
How Lightning Network Works
Here is a look at how Lightning Network works:
Step 1: Channel Creation
In order to open a Lightning Network channel, both users must deposit funds into a multi-signature (multi-sig) wallet. This transaction will be in the form of a regular transaction, where the multi-sig wallet address will be broadcasted to the main blockchain and the payment channel will be officially open. The funds that have been deposited to the multi-sig wallet will be locked up for the entire duration that the channel remains open. Here is an illustration of what happens when Frodo wants to a channel with his favorite coffee house:
A Multi-Signature (Multi-Sig) Wallet is an escrow wallet that requires additional users to sign a transaction before the funds can be accessed and broadcasted to the public blockchain. Multi-sig adds an additional layer of security. An analogy to multi-sig wallet is a safe-deposit box with 2 or more keys, with each party holding on to one key. In order to open the box, all keys (or majority of keys) are required to validate the transaction.
Each party holds a private key of the multi-sig wallet, which is needed to verify and sign-off all transactions. Therefore, funds can only be spent if both parties initiate the transaction using their private keys.
(See more: Coins, Tokens & Altcoins: What’s the Difference?)
Step 2: Begin Payment Transactions
Both parties can now conduct an unlimited amount of transfers and exchange between each other. Each transaction that happens on the payment channel requires the digital signature of both parties via each of their private keys from the multi-sig wallet. Both parties will then sign-off an updated balance sheet after each transaction in order to reflect the balance due to each other in the multi-sig wallet. A copy of the balance sheet is kept by both parties as proof of the transactions and balance due for each party. The channel can stay open as long as both parties do not agree to close it.
Step 3: Closing the Channel
Whenever both parties are done transacting or want to realize their balance, they can close the payment channel. A final payout transaction will be agreed upon by both parties and the final balance will be broadcasted to the main blockchain. In the event of a dispute, both parties can use the most recent balance sheet to prove the final balance and recover their fair share of the balance.
(Read more: Evolution of Cryptocurrency: What is Cryptocurrency?)
What Does it Take to Use LN?
It is important to note that in order for someone to use LN, they must be a node. Being a node requires one to have a significant amount of free disk space (upwards of 125 GB) to download Bitcoin’s entire transaction history. Anyone wanting to set up a node requires a great amount of computing and electrical resources.
Because of this, it will not be hard to imagine that the majority of people would not use LN since it requires hefty resources. Here are other considerations for using LN:
- Technical Expertise: Users need to possess the technical know-how of operating not only a node, but an LN node with more configurations.
- Channel Fees: Fees are required to open fresh LN channels. This means that if you’re planning to transact off-chain with 100 people, you need to open 100 separate LN channels with each party. This could be expensive.
- Locked-Up Funds: In order to open up and maintain a channel, users have to lock-up funds. This takes away a portion of the user’s liquidity.
Must Users Open a New Channel with Every Transacting Party?
An advantage of Lightning Network is that users have the ability to transact with anyone connected to their network of payment channels without having to open new LN channels. This means that if Frodo is keen on transacting with Bob but does not have an open channel with Bob, he can utilize one of his network’s channel, Sam, who has an open channel with Bob.
This means that Frodo can use an intermediary (Sam) to forward his transaction to Bob. Theoretically, everyone should be connected to each other in the Bitcoin network.
With all the possibilities, many small transactions can be done off-chain (with different payment channels building a web of network), and thus reducing a huge load on the blockchain itself. And remember, nobody needs to pay anything to the miners since these transactions happen inside payment channels. Transaction fees will dramatically decrease or even become non-existent.
Benefits of Lightning Network
Here are the beneficial features of Lightning Network:
- Instant Transactions: With transactions executed off-chain, it would dramatically reduce heavy loads on the network. This will allow instant transactions without worrying about block confirmation times.
- Low Transaction Fees: Lightning Network facilitates significantly lower transaction fees since transactions are executed and settled off-chain. Micro-payments would then be a real possibility in using Bitcoin. In other words, you can buy a coffee with Bitcoin without excessive transaction fees as before.
- Scalability: Lightning Network allows the blockchain to scale and support millions or billions of transactions on the network. With that capacity, Bitcoin would serve as a real, viable alternative to traditional payment processors like Paypal and VISA.
- Blockchain – Interoperability: Perhaps an exciting development in the industry is the concept of cross-chain atomic swaps, which allows for transactions to be executed across different blockchain platforms without any 3rd party custodians. An example of this is using BTC to transact on the Ethereum blockchain. As an off-chain scaling solution, Lightning Network would create the base needed to facilitate interoperability across blockchains.
Limitations of Lightning Network
There are also several limitations and issue that has been raised on Lightning Network.
- Centralization of System Through Lightning Hubs: The biggest issue with Lightning Network is that its architecture will naturally transit towards a centralized structure controlled by ‘Lightning Hubs’. Lightning hubs are nodes with many open channels and financial resources to allow users to use their off-chain channels instead of users’ forking their own funds to create their own channels. Hubs would streamline the process since it would solve the following pain points:
1. Users will not need to personally open as many channels for transacting with multiple other parties, which requires fees for each channel that is open
2. Users do not need to worry about having enough balance in their open channels
3. Users can reduce the amount of ‘hops’ and the associated fees required to make transactions
This would open up scrutiny for hubs to be subjected to heavy financial regulations and laws such as Know Your Customers (KYC) and Anti-Money Laundering (AML) laws. Additionally, there is a risk of theft in the system. This entire structure is similar to the banking system, which is ironic considering Bitcoin was created to provide an alternative to the banking system.
- Low Success Rate for Large Payments: A current limitation of Lightning Network (in beta mode) is the low successful rate (1%) for transactions above $200. These findings seem to indicate that LN is currently focused towards micro-transactions and it is not yet ideal for sending large payments.
- Less Transparency: A core benefit that blockchain has enabled is full transparency, which means all transactions can be verified and accessed by anyone on a trustless network. However, off-chain payment channels compromise the trait of transparency since only the final balances will be broadcasted into the blockchain network itself. All other transactions executed off-chain – which will undoubtedly form the vast majority of total transactions – will not be broadcasted on-chain.
Here is a simplified explanation of Lightning Network and its potential pitfalls:
Progress of Lightning Network
While it was originally introduced as a solution to Bitcoin’s scalability problem, many other coins are also looking to implement Lightning Network. Litecoin, Zcash, Stellar and Decreed has already announced their intentions to adopt LN. This is a positive step towards adoption of an off-chain solution in enhancing the capacities of blockchain technology.
Tests and beta implementations of LN at the end of 2017 has been positive, with implementations and developments led by blockchain entities that include Lightning Labs, Blockstream, and ACINQ. However, it could be a long time before the actual implementation of LN is released on the mainnet. Many LN developers believe it’s still risky to use LN directly on the network. There is no specific roadmap on the release of LN, but it could probably be months away.
As of now, LN is still in its early days and the beta version from Lightning Labs (released in March 2018) is still only aimed at other developers and not at regular users.
(You might also be interested in: Crypto Beginners Guide: 5 Things Crypto Newbies Should Know)
Beneficial Resources To Get You Started
If you're starting your journey into the complex world of cryptocurrencies, here's a list of useful resources and guides that will get you on your way:
- Crypto Guide 101: Choosing The Best Cryptocurrency Exchange
- Guide to Bittrex Exchange: How to Trade on Bittrex
- Guide to Binance Exchange: How to Open Binance Account and What You Should Know
- Guide to Etherdelta Exchange: How to Trade on Etherdelta
- Guide To Cryptocurrency Trading Basics: Introduction to Crypto Technical Analysis
- Cryptocurrency Trading: Understanding Cryptocurrency Trading Pairs & How it Works
- Crypto Trading Guide: 4 Common Pitfalls Every Crypto Trader Will Experience
- Guide to Cryptocurrency Wallets: Why Do You Need Wallets?
- Guide to Cryptocurrency Wallets: Opening a Bitcoin Wallet
- Guide to Cryptocurrency Wallets: Opening a MyEtherWallet (MEW)
Get our exclusive e-book which will guide you on the step-by-step process to get started with making money via Cryptocurrency investments!
You can also join our Facebook group at Master The Crypto: Advanced Cryptocurrency Knowledge to ask any questions regarding cryptos!
I'm Aziz, a seasoned cryptocurrency trader who's really passionate about 2 things; #1) the awesome-revolutionary blockchain technology underlying crypto and #2) helping make bitcoin great ‘again'!