What is the Bitcoin Lightning Network?

The Lightning Network is a payment network built on top of bitcoin. More specifically, it is a protocol, or set of rules, that can be used to send and receive bitcoin nearly instantly and with extremely low fees. The Lightning Network involves some trade-offs compared to bitcoin, such as security and ease of use. However, for small everyday payments, the Lightning Network provides an excellent user experience. This article will teach you why the Lightning Network is needed, how it works, and how you can get started using it in under 5 minutes.

Why Do We Need the Lightning Network?

There are inherent limitations in a decentralized system such as bitcoin. One of these limitations is scalability. Every bitcoin transaction must be received and validated by every node (computer) on the network to make sure all transactions are following bitcoin’s rules. This is because bitcoin imposes a limit of around 5 transactions per second. This is part of what makes bitcoin decentralized – the fact that anyone can use a regular computer to enforce bitcoin’s rules and ensure that everyone else is playing by those rules too.

When we compare bitcoin’s transaction limits to those of Visa, we see that bitcoin has a long way to go before being able to handle those kinds of transaction volumes. Visa processes over 10,000 transactions per second, thousands of times more than bitcoin is capable of. Bitcoin will need to scale up significantly to be able to process Visa’s scale of transactions.

Bigger Blocks vs. Off-Chain Scaling

There are two scaling solutions that are often mentioned with regards to bitcoin – bigger blocks and off-chain solutions. The “big block” argument states that to increase transaction limits, we should allow blocks in the blockchain to contain more data, thus allowing more transactions to be stored in each block. The problem with big blocks is that we would need 32 GB blocks to reach Visa’s scale of transactions. This would mean that every 10 minutes, 32 GB of data would be broadcast to every bitcoin node who would each have to validate all 32 GB worth of transactions. For anyone wanting to store the blockchain, it would require 400 TB of storage per year. Instead of running their own “full nodes”, bitcoin users would be forced to trust others to validate their transactions. This defeats the whole purpose of bitcoin, which is to send and receive payments without needing to trust anyone else.

Off-chain solutions, on the other hand, get around bitcoin’s transaction limit by conducting payments without recording each individual payment on the blockchain. Individual payments are kept track of separately (off-chain), and at a later time only the final balance is recorded on the blockchain. For example, you could make five payments of $10 to a store each month by only recording a single $50 bitcoin transaction at the start of the month.

Payment Channels 

A popular type of off-chain scaling solution is called a payment channel. In a payment channel, two nodes exchange payments back and forth within the “channel” between them. These nodes only record their balance in an on-chain bitcoin transaction once they decide to stop using the channel.

You can think of payment channels like credit card tabs at a bar: you “open the channel” by giving the bartender your credit card, you “update the channel balance” when you buy another drink, and you “close the channel” once you settle the tab.

The Lightning Network

The Lightning Network is a large network of payment channels. These payment channels do not rely on trust to work, as each user always has access to their own funds.

Lightning Network payments can be “routed” through the network. Imagine Alice has two channels open, one with Bob and one with Carol. Even though there isn’t a channel between Bob and Carol, Bob can still pay Carol by routing the payment through Alice’s node. This works because Alice has channels with both Bob and Carol.

Payment routing also provides a layer of privacy for users of the Lightning Network. A payment might be routed through many nodes, but each node along the way does not know where the payment originated or where its final destination is.

Lightning Network Channel Balances

Typically, payment channels are initiated by only one of the people involved, such as Alice opening a channel with Bob. In this case, only Alice controls funds in the channel’s initial state. Alice can choose to send some of her channel balance to Bob as a payment. Once Bob has received this payment, he controls some funds in the channel and can now send payments back to Alice.

The funds within the channel that you control are referred to as your “outbound” or “local” capacity, since they are on “your side” of the channel. Funds on the other side of the channel are called the “inbound” or “remote” capacity, since this is the amount that you can receive as incoming payments. The highest payment you can send is controlled by your outbound capacity and the highest payment you can receive is controlled by your inbound capacity.

How Do Lightning Network Payments Work?

The Lightning Network uses an invoice-based payment system. If you want to send a Lightning Network payment, you first must receive an invoice from whoever you are paying. Payment invoices will sometimes have an amount defined, so you’ll have to pay the exact amount. Other times, invoices will be left blank and you can choose the amount to send. If you want to receive a Lightning Network payment, you will need to create an invoice to request the payment and provide the invoice to whoever is paying you.

Payment invoices are a long string of characters that contain all the information needed to complete the payment. Sometimes payment invoices are displayed as QR codes, and other times they are displayed as a long string of characters such as:

lnbc50u1pwsyhx9pp57ppqvzwex3qapu0wn63v06jzxqdtt46qypks4pnexwrr2ansz9msdqcgejhxctzd
9kxjare23jhxap3cqzysxqy2ljqd47a9cdlnj84cy0a0zg7frd8jnera8fen2du6d2g500wzs7mpsmpqe0c
3ddhrrxpehyhj4c9fwj3cfr5mvyxcyaaq98fw39jketl89cq0j9hy2

Wallet Recommendation

Before recommending a wallet, it is important to note that the Lightning Network is still early in its development. Be sure to use it only for small amounts that you are comfortable potentially losing. This is especially true while you are first learning to use the Lightning Network.

Our recommended Lightning Network wallet for beginners is the Phoenix wallet by ACINQ. ACINQ is a company that has been helping develop the Lightning Network protocol since its beginning. They have designed Phoenix to be extremely easy for users of all levels. It is currently only available on Android, but ACINQ plans to release an iOS version later in 2020.

The ease-of-use of Phoenix does come with a couple of trade-offs. One such trade-off is the fact that Phoenix will only connect with Lightning Network nodes that belong to ACINQ. This means that ACINQ’s nodes must stay online for you to be able to send and receive payments. Even so, ACINQ never controls your funds, and even if their nodes were offline permanently, you could still recover the funds from your phone. Another trade-off is the fact that ACINQ will have knowledge of all your payment activity through Phoenix because it all goes through their nodes.

Using Phoenix is a great way to get started on the Lightning Network, since it removes the need to manage channels or worry about connecting to your remote Lightning Network node. You simply install the app on your mobile device, record a backup of your 24 word seed phrase, and you can start using the Lightning Network right away!

About the Author

CryptoVantage Author Billy Garrison

Billy Garrison

Billy Garrison focuses his research and writing on Bitcoin and the Lightning Network. He is interested in the technical details that allow these technologies to survive and grow without the need for a central authority. Billy also loves helping people learn about Bitcoin which led him to start the Halifax Bitcoin Meetup.