Updated: August 21, 2023

What is the Lightning Network?

Ready to Get Started

Get started building with the Lightning Network Today.

Contents

Key Takeaways

Built on top of the Bitcoin blockchain, the Lightning Network is an off-chain, routed payment channel network. While Bitcoin allows users to “send” transactions, the Lightning network is a “routing network”.

Introduction

The quest for seamless, decentralized, and secure monetary transactions has given birth to Bitcoin. But what makes Bitcoin remarkable also poses challenges, particularly regarding scalability and the ability to process a high number of transactions simultaneously.

In the following sections, we will delve into the intricate details of Bitcoin’s scalability, explore the ingenious concept of off-chain protocols, and unveil the workings of the Lightning Network. From Bitcoin’s inception to the latest advancements in transaction processing, this comprehensive exploration will shed light on the complexity and brilliance of modern digital currency.

Join us as we embark on a journey through the past, present, and future of Bitcoin, and understand how technologies like the Lightning Network are shaping the landscape of internet payments.

Bitcoin and its scalability

Bitcoin is a digital currency that uses a globally replicated public ledger to record transactions. Participation computers, called nodes, receive, validate and store all transactions. Bitcoin aims to be a decentralized digital currency, meaning no single company, country, or person controls it; all the participant nodes work together to keep the ledger accurate and secure. The more participants the Bitcoin network has, the more secure it is.

Therefore, it’s beneficial for the Bitcoin network to maintain the low cost of running a node. As costs decrease, the network becomes more accessible, allowing more participants to join, ultimately enhancing its security. For example, Bitcoin blocks are relatively small compared to other options. The block size determines the number of transactions it can contain. Larger blocks hold more transactions but require more powerful hardware from those operating the node. In contrast, small blocks hold fewer transactions and allow less powerful hardware to participate in the network.

This pursuit of decentralization for Bitcoin doesn’t come without tradeoffs. Its small block size means that Bitcoin can’t process lots of transactions per second in the same way that a centralized alternative like Visa or Mastercard can, for instance. Bitcoin can only process seven transactions per second, while Visa, for instance, can process around 24,000. 

Does this mean that Bitcoin is doomed to fail? Fortunately no. Engineers working on the protocol have been aware of this tradeoff since the early days of the network and have been thinking of clever ways to circumvent this limitation without compromising its decentralization for more than a decade.

Off-Chain Protocols

Curiously enough, the first idea for increasing the throughput of Bitcoin came from its creator itself, Satoshi Nakamoto, and it was introduced in a very early version of the code. The idea was to have a field of the transaction to keep track of its version. The user could update the transaction to a newer version and broadcast it to its peers before it was confirmed. Upon receiving the newer version, those responsible for appending new blocks of transactions to Bitcoin’s blockchain (known as miners) could replace the first version of the transaction they’ve seen with the latest one.

Let’s say that Alice is purchasing a new pair of shoes in Bob’s store. After sending the transaction to pay for the pair of shoes, she decides that she also wants to buy a new jacket, so instead of making another transaction just for the jacket, she updates the version of her transaction to Bob adding more Bitcoin to pay for the jacket and the shoes and broadcasts this updated transaction to the network.

Unfortunately, this is not a sound solution. There was no guarantee that the miner would actually add the newest version to Bitcoin’s blockchain. Even more so, a miner could be bribed by a third party to include the earliest version of a transaction that is more beneficial for them.

But despite the unsoundness of the proposed solution by Satoshi, this was the first conception of an “off-chain” protocol. A method of updating the balances of parties involved in a transaction without the need to confirm every transaction in Bitcoin’s blockchain. This inspired a huge field of research that culminated in the invention of Bitcoin’s first successful off-chain protocol: the Lightning Network.

The Lightning Network

The Lightning Network originated as a whitepaper published by Joseph Poon and Thaddeus Dryja in 2016. The fundamental concept centers around the idea of off-chain protocols. This means updating the balance of parties involved in transactions without recording every change on the blockchain. A blockchain transaction is only used when absolutely necessary.

The Lightning Network consists of payment channels, forming financial relationships between two participants. They initiate by securing funds to the channel with a standard blockchain transaction. Once confirmed, they can quickly transact small amounts, merely updating the state of their channel, without needing a blockchain transaction for every change. The payment channel can be compared to an hourglass. Each party holds the sand (BTC) on their respective side, and with every transaction, the sand moves from one side to the other, representing the exchange of funds.

The secret ingredient is that every channel update is represented by valid and signed Bitcoin transactions called Hash-Time Locked Contracts, or HTLC. Therefore, if one of the parties becomes unresponsive, the other party can unlock the funds from the financial relationship just by publishing their latest HTLC on-chain.

However, this usually doesn’t happen, and the parties unlock the funds from the payment channel with a collaborative transaction.

If the HTLCs can be brought on-chain at any time, there needs to exist a mechanism that incentivizes honest behavior for the participants of the Lightning Network. Otherwise, they’ll be incentivized to publish out-of-date states with more funds on their side of the payment channel. The Lightning Network prevents this by using a penalty mechanism embedded in the HTLC. Essentially, if one peer tries to cheat, the other party can have all the money initially locked in the payment channel to him. Bitcoin’s blockchain acts like a judge, punishing misbehavior and incentivizing honest cooperation amongst payment channel partners.

Finally, the HTLCs enable the trustless operation of the Lightning Network. You don’t have to open a payment channel with everyone you want to send money to. You can route a payment through numerous payment channels to reach the destination. The Lightning Network has many nodes specializing in routing payments, and they can earn fees for this activity. Our blog even has an entire series on how to start routing payments and earn some fees.

There is much more to Lightning than just HTLCs. The protocol’s intricacies are described in a series of technical documents called BOLTs (Basis of Lightning Technology). These are the guiding texts for developers working on Lightning nodes. Currently, there are four major implementations of Lightning Nodes.

  • LND: The most popular implementation, developed by Lightning Labs, focuses on providing user-friendly experiences for developers and end users.
  • CLN: The Blockstream implementation is popular among routing nodes.
  • Eclair: A node implementation by ASINQ, the company behind the popular Lightning Wallet “Phoenix.”
  • LDK: The implementation by Spiral, designed with developers in mind, provides a customizable “Lego kit” approach, allowing developers to assemble it according to their needs.

Amongst end users, the two most popular implementations are LND and CLN. You can read a comparison between them here.

Concluding

The Lightning Network is the first successful second-layer Bitcoin protocol. It’s evolving at a fast pace. Developments deliver yearly upgrades that make the protocol more private, reliable, and usable. You can subscribe to our newsletter to know about these upgrades firsthand.

Using the Lightning Network gives you access to fast, low-fee Bitcoin transactions. If you are a developer or entrepreneur, you should consider exploring the Lightning Network to enhance your product with Lightning fast internet native money. If you’re an end-user, you should consider running a node to be a sovereign participant in the Bitcoin Network.

At Voltage, we offer the fastest way to join the network as a developer or an end-user. Check out our Nodes to participate in the state of the art of internet payments.

Read More

Connect with us on Discord. ⚡


Subscribe To Our Newsletter