The Bitcoin Lightning Network is a layer-2 solution that operates on top of the Bitcoin blockchain. It enables instant high-frequency Bitcoin transactions to take place without counterparty risk and with minimal fees. Also, Lightning Network transactions enable secure, trustless Bitcoin transactions to take place between as few as two parties, reducing congestion on the Bitcoin blockchain and facilitating high volumes of high-frequency transactions and micropayments. So, if you’re one of the many people wondering, “What is the Lightning Network?”, read on!

In this “What is the Lightning Network?” article, we’re going to dive deep into the Bitcoin Lightning Network. We’ll discuss the concept of bidirectional micropayment channels and Lightning smart contracts. Also, we’ll explore some of the key concepts of the layer-2 scaling solution and how it benefits the broader Bitcoin community.

Moralis Academy is the ultimate Web3 and blockchain education suite available online! If you want to learn about the differences between Bitcoin, Ethereum, and altcoins, check out the Crypto for Beginners course at Moralis Academy. This course teaches students how to buy, sell, and trade crypto using an exchange account. Also, we offer tips on how to recognize and avoid scams. Join our community of over 30,000 students and begin your crypto journey today with Moralis Academy! Also, save our “What is a Hardware Wallet?” and “Corporate Training” articles for further reading!

What is the Lightning Network?

So, what is the Bitcoin Lightning Network? The Lightning Network is a decentralized layer-2 solution that operates on top of the Bitcoin blockchain. It uses bidirectional micropayment channels to scale the Bitcoin blockchain and enable transactions to be processed faster, and with lower fees than transactions that are on the main blockchain. Introduced by Joseph Poon and Thaddeus Dryja in 2015, the Lightning Network uses off-ledger transactions to reduce congestion on the Bitcoin blockchain without intermediaries.

Blog What is the Lightning Network?

Furthermore, the Lightning Network aims to address some of the shortfalls of the most-prominent blockchain network. For example, confirmed transactions can take up to an hour before they are irreversible on Bitcoin. Also, micropayments on the Bitcoin blockchain are restricted because fees are too expensive for transactions of just a few cents. Plus, Bitcoin transactions are immutable, making them unsuitable for retail and point-of-sale transactions that might need to be revocable. Moreover, the Lightning Network is among the first implementations of a multi-party smart contract that uses Bitcoin’s Script programming language. As such, it presents many new opportunities for Bitcoin developers and users.

The Bitcoin Blockchain Scalability Problem

Now that we have considered the question, “What is the Lightning Network?” – let’s take a close look at some of the problems that it aims to address. Although the Bitcoin blockchain enables anyone with an internet connection to make trustless payments without intermediaries or censorship, Bitcoin itself is still not able to accommodate the entirety of the world’s commerce. For example, some reports claim that the Visa network can process up to 65,000 transactions per second (TPS). 

Blog the Bitcoin Lightning Network

Bitcoin, however, can process seven transactions per second with a block limit of one megabyte. Therefore, scaling the Bitcoin network without counterparties is extremely challenging. If every node in the network has to approve every transaction, Bitcoin will not be suitable for payments unless the Bitcoin block size increases. However, this is problematic because larger block sizes could lead to centralization. If Bitcoin becomes centralized, many believe that the absence of the core principles that define the technology will make it redundant.

Furthermore, the Bitcoin blockchain grows exponentially with every transaction added to the public ledger. As such, scaling the blockchain could require an unfeasibly-large bandwidth and storage capacity for node operators and reduce the accuracy of ledger entries. Therefore, the avenues for scaling Bitcoin point towards centralization and perhaps even the collapse of the network.

To remedy this, the Bitcoin Lightning Network uses a network of micropayment channels to enable off-chain value transfer between untrusted parties. If two parties disagree, transaction balances can be settled on-chain. However, most data is taken off-chain and settled back on-chain later. Resultantly, the Lightning Network provides users with the reassurance that if the Bitcoin network achieves mainstream adoption, it can handle high volumes of high-frequency transactions without increasing the block size to the point where it creates centralized custodians or high fees. 

How Does The Bitcoin Lightning Network Work?

When making a transaction on the Lightning Network, funds enter into a multi-signature Bitcoin address known as a “channel”, which appears as an entry on the Bitcoin ledger. For these funds to move, both parties must agree that the new balance is correct. When both parties sign the transaction, this balance is visible on-chain as the most recent transaction. Then, a payment can be made once each party agrees on the new balance and signs a new exit transaction that enables spending from the channel address. Following this, all previous exit transactions become invalid.

Additionally, Lighting Network transactions do not need counterparty cooperation for exiting a payment channel. Rather, both parties can exit a channel at any time. Also, knowledge of a secure cryptographic hash enables users to embed payment conditions so that transactions can take place across a network of payment channels without any one party taking full custody of the assets in between. 

Moreover, the Lightning Network enables the Bitcoin blockchain to carry out dynamic and trustless payments in a way that could disrupt the legacy financial system. Accordingly, the Bitcoin Lightning Network is creating a fair and equitable alternative to centralized payments services that put users and the user experience ahead of profits.

Payments

Payments on the Bitcoin Lightning Network are atomic and instantaneous. Bitcoin transactions are aggregated into blocks that are 10 minutes apart to prevent double-spending. However, Lightning Network transactions do not require block confirmations. This makes it ideal for point-of-sale transactions and everyday payments. Accordingly, the Lightning Network makes Bitcoin a suitable alternative to a broad range of financial applications that it would otherwise be unsuitable for.

Furthermore, the Bitcoin Lightning Network makes it possible to send as little as 0.00000001 BTC without counterparty risk. Currently, the Bitcoin blockchain requires transactions to be of a minimum size. As such, sending just a few satoshis would incur fees well above the value of the transaction. However, the Lightning Network avoids this issue using machine-to-machine payments that prevent network congestion.

Bidirectional Micropayment Channels

The Bitcoin Lightning Network uses bidirectional micropayment channels to address the issue of scalability. To illustrate the notion of bidirectional micropayment channels, we consider the notion of unobserved events. The question of “When a tree falls in the forest, and nobody hears it, does it make a sound?” infers the inconsequence of a sound if it is unheard. Likewise, not all nodes within blockchain networks need to know about recurring transactions if they only affect two participants. 

Instead, a minimum amount of information can reside on the blockchain, with final settlements of transactional relationships occurring at a later time. Resultantly, more transactions can be settled on-chain without causing congestion. Also, this process avoids counterparty risk and an increase in fees by not using custodians. Plus, it retains the trustless nature of the Bitcoin blockchain using timelocks as part of consensus.

Going back to the question of whether or not a tree makes a sound if nobody hears it, if the network agrees that a tree fell at 9:00 am on a Tuesday, the tree must have fallen at that time. Likewise, if two parties agree on the balance of a payment channel, it is a true balance.

Thanks to these micropayment channels, the Bitcoin network can process billions of transactions in a day using minimal computational power. Furthermore, large Bitcoin transactions can be broken down into multiple smaller transactions in a way that is cost, and time-effective while benefiting from the same decentralization of the Bitcoin blockchain.

Moreover, balances are only broadcast on-chain if two parties disagree. Accordingly, much of the computational requirements of these micropayment channels occur off-chain and settled on-chain at a pre-agreed date.

What is the Lightning Network? – Smart Contracts

Lightning transactions use smart contracts to combine multiple micropayments using multi-signature scripts. Smart contracts are immutable pieces of code that facilitate “programmable money”. Programmers can use Bitcoin Transaction Scripting to create smart contracts that automate financial and data transactions according to specific events.

The first transaction of a Lightning transaction, known as the “funding transaction” is established when two parties open up and fund a payment channel. A typical multi-signature transaction uses two master keys (public and private) in an exchange that enables the spending of funds. 

However, nodes on the Lightning Network do not exchange signatures. Rather, Lightning nodes swap a single key that they use for validating transactions between one another. This prevents the Bitcoin blockchain from recognizing every spend and enables parties to conduct high-frequency transactions without causing congestion. Moreover, it is only when a payment channel closes that the exchange of master keys occurs.

The Lightning Network uses multisig transactions called “Hashed Time-Locked Contracts” (HTLCs) to facilitate instant and low-cost Bitcoin payments. This is achieved by routing payments between multiple trustless parties and paying a small fee to each participant.

What is the Lightning Network Useful For? 

Not only does the Lightning Network assist the Bitcoin blockchain in scaling to achieve a greater throughput without risk to decentralization, but it also makes Bitcoin useful for smaller payments. Without the Lightning Network, using Bitcoin to pay for a cup of coffee would take too long and cost too much in fees. Also, Lightning transactions are revocable. Accordingly, they refundable, unlike Bitcoin-native transactions. Additionally, Lightning micropayments could provide a decentralized option for paying for low-cost services such as per-megabyte internet or per-article newspaper subscriptions.

Current block confirmation times can prevent investors from acting quickly, especially when their funds are held in cold storage. However, the Lightning Network removes much of the need to hold BTC on exchanges to prepare for market moves. As such, the Lightning Network has the potential to reduce asset theft from exchanges and reduce reliance on third-party custodians.

Furthermore, the Bitcoin Lightning Network facilitates time-sensitive financial escrow contracts that reduce computational demands on the main chain by migrating the vast majority of complex transactions off-chain. Moreover, the Lightning Network can facilitate cross-chain payments across multiple blockchain networks providing that they have similar hash-functions. Plus, this is possible without the sender being aware of any other chains.

What is the Lightning Network? Summary 

The Lightning Network is the most-prominent layer-2 scaling solution on the Bitcoin blockchain. Using bidirectional micropayment channels, two parties can engage in high-frequency decentralized transactions without counterparties. Additionally, these transactions are real Bitcoin transactions that defer settlements until a later date that both parties agree on. Resultantly, the Lightning Network enables Bitcoin to scale to process billions of daily transactions without congestion or excessive fees. This opens up several new use cases for Bitcoin that could enable it to achieve mass adoption.

Moreover, many popular payments providers are already developing services that harness the power of the Lightning Network, including Strike and CashApp. In the future, we can expect to see the Lightning Network at the forefront of Bitcoin development. After reading this “What is the Lightning Network?” article, you should be able to confidently discuss the Bitcoin layer-2 scaling solution. There has never been a better time to learn a new skill in an emerging field. If you want to become a Bitcoin developer, check out the Bitcoin Programming 101 course at Moralis Academy! After this, check out the Lightning Network & Lightning App Programming course to learn more about the Bitcoin Lightning Network! This course teaches students how to create exciting payments apps on the Bitcoin blockchain. 

Become blockchain certified with Moralis Academy and start your blockchain journey today! Furthermore, don’t forget to follow us on Twitter @MoralisAcademy! We’d love to hear your thoughts about this “What is the Lightning Network” article! Also, check out our Layer-2 Scaling Solutions” and “How to use the Polygon Bridge” articles to further expand your blockchain and Web3 education!