Article

The Bankless Guide to Lightning Network

Updated: Dec 2023
Bankless Bankless Dec 15, 20233 min read
4
0
The Bankless Guide to Lightning Network

First proposed in 2015 and initially launched in 2018, The Lightning Network is a Layer 2 (L2) protocol built atop Bitcoin. The project is designed to enable faster and cheaper payments by moving them off the Bitcoin L1. 

This scaling is achieved through the creation of payment channels between users, and these channels are kept open and cache transaction data offchain until they’re intentionally closed, at which point their info gets posted onchain. 

How the Lightning Network works

When two users want to transact on Lightning, they set up a payment channel. This involves creating a transaction on Bitcoin to lock a certain amount of cryptocurrency in a shared wallet. This transaction is like opening a bar tab, one that only hits the blockchain when the users are ready to settle up.

Once this channel is open, the two users can transact with each other as much as they like without involving the L1 for each transaction. These transactions are quick and cheap because they're not being broadcast to the entire network and don't need to be individually verified by miners. Instead, they're just between the two parties in the channel.

When it's time to close the channel, a final transaction is made onchain. This transaction reflects the total balance of what's been transacted in that particular channel. Essentially, it's like settling the tab. The blockchain only records the final balance, not every transaction that led up to it.

The network of these payment channels forms a mesh, allowing users to send payments to each other even if they don't have a direct channel together by routing the payment through intermediaries who have channels with each other. 

This system is underpinned by the security and decentralized nature of Bitcoin while allowing for rapid and efficient transactions. However, it's important to note that the capacity of each individual channel is limited by the amount of BTC that has been escrowed in its underlying wallet, which can impact the maximum transaction size that a given channel can support.

How the Lightning Network compares to rollups

The Lightning Network is tailored specifically for Bitcoin, which doesn't inherently support smart contracts. The solution’s primary function is to facilitate quick and cheap peer-to-peer (P2P) payment transactions, and it achieves this through payment channels, which are like private ledgers between two parties. 

By contrast, rollup-based L2 solutions are primarily used in the Ethereum ecosystem today, and they’re popular because of their smart contract capabilities. A rollup isn’t P2P but has a shared global state among all its users and works by executing transactions outside Ethereum and then “rolling up” batched transaction data onchain. 

This approach allows for much faster and cheaper transactions than would be possible on the Ethereum L1, and because rollups support smart contracts, they can handle a wide variety of transactions, not just payments. This includes complex decentralized finance (DeFi) operations, trading and minting non-fungible tokens (NFTs), and other more advanced activities. 

The pulse of the Lightning Network

While Bitcoin may not have smart contract capabilities, it’s still currently the 3rd-largest non-Ethereum Virtual Machine (non-EVM) chain in DeFi, and that’s largest thanks to the ~$207M USD worth of BTC that’s presently deposited in the Lightning Network. 

Currently, the Lightning Network boasts 14,627 nodes and more than 5,015 BTC worth of capacity. The average node capacity was 0.343 BTC, and each node, on average, maintained about 8.34 channels at the time of this guide’s most recent update. 

Top Lightning Network wallets

There is a range of Lightning Network wallets available to be downloaded, and each one offers unique features and experiences. Some of the most popular today are:

  • Breez Wallet — “The Interface of the Lightning Economy”
  • Electrum — “Improve your Bitcoin experience”
  • Muun — “A self-custodial wallet for Bitcoin and Lightning”
  • Strike — “The global money app for fast, safe payments and Bitcoin”
  • Wallet of Satoshi — “The world’s simplest Lightning wallet”

Zooming out

While the Lightning Network remains the most significant L2 solution built on Bitcoin, offering the cheapest method for native BTC transactions today, it also faces non-trivial obstacles. 

These challenges include a less-than-great UX, limitations in handling advanced transactions, and competition from more flexible Ethereum Virtual Machine (EVM)-based payment solutions like Sablier. Additionally, emerging complex scaling solutions such as validity proofs in the Bitcoin ecosystem could potentially overshadow the Lightning Network in the long term. 

Despite these hurdles, though, the reality for now is that Lightning Network stands as the largest Bitcoin-based L2 solution to date, and it’ll be around for years to come. 

4
0
No Responses