Lightning Network: The good, the bad and the most talked-about thing in Bitcoin right now

Simon Cowell
Bitstamp Blog
Published in
9 min readJul 14, 2019

If you’ve attended any crypto conferences this year, you have probably noticed how many segments are being devoted to something called the Lightning Network.

The Lightning Network is a potentially significant upgrade to the Bitcoin technology stack that could help scale transaction capacity and improve the utility of the Bitcoin network. In fact, it has already sparked a new wave of Bitcoin application development. Potential feature enhancements include:

  • Instant transactions
  • Micropayments becoming viable
  • Makes it easier for developers to use and build on Bitcoin
  • More functions for programming payments

Lightning is still in the early live testing phase and we will be monitoring progress closely. It is not a fix-all solution for Bitcoin’s limitations to scale as a payments service but it provides enough improvement that new types of Bitcoin applications are now viable.

The Lightning Network is not a separate chain, but a protocol built on top of Bitcoin — a so-called “second-layer” solution. It still uses Bitcoin but is designed to enable additional utility without compromising the security and decentralization of the base layer.

How does the Lightning Network… work?

In order to increase network capacity and save on fees, there has always been the idea of “off-chain” transactions — if there are two parties frequently transacting with each other, they could find a way to trade between each other and just settle the net amount with a final on-chain transaction. In fact, in his original version of Bitcoin, Satoshi created transaction fields called “Sequence” and “Locktime”, which were intended to enable such activities but proved to be too insecure in practice.

There have been prior attempts to improve on this and, if you are interested, you can read this paper for a full history on payment channels.

Joseph Poon and Thaddeus Dryja published their whitepaper on the Lightning Network on January 14, 2016, and later that year it was developed into the BOLT (Basis of Lightning Technology) specifications, which standardized further development.

The core concept of Lightning is: Wouldn’t it be nice if two parties who do not trust each other could make payments back and forth between themselves? But instead of making every single transaction on-chain, incurring the cost of time delays and fees, what if they could just settle the net amount after a certain point in time?

Transactions on a Lightning channel

Lightning makes use of Bitcoin’s limited smart contracting language to delay settlement of payments. Lightning is not a separate network, but a system of contracts that have a claim on real Bitcoin reserves.

For example, if Alice and Bob wish to set up a Lightning channel between each other, they would initially need to credit it with real bitcoin. Lets say 0.1 BTC each for this example. They would create a Bitcoin transaction in which they paid each other their current balances of 0.1 BTC.

This creates a bidirectional channel between two users. Technically, it is a smart contract which promises to pay Alice and Bob the agreed amount.

In the interim, if Bob wants to pay Alice 0.01 BTC, they effectively overwrite the original contract with a new one, but they keep it to themselves and do not yet broadcast it to the network:

  • Alice signs a new contract to pay Bob 0.9 BTC
  • Bob signs to pay Alice 1.1 BTC

They can continue to update the contract balance as they transact between each other, and then only settle the net balance on-chain once the contract expires. All the rest of the world will see on the blockchain is Alice and Bob sending Bitcoin to the initial contract and then the final transaction when they receive the net settled amounts back.

Channels become a network

If enough parties open channels with one another, then a user should be able to pay another user who he does not have a direct channel with. This is achieved by linking payment channels together — the payment then “hops” along these channels to the intended destination.

Lightning users don’t need to be connected directly

The resulting effect is that money then appears to flow like a wave or a form of energy as it travels through connected payment channels.

Why am I taking this seriously?

1. It builds on Bitcoin’s existing network effects

The Lightning Network is not a separate chain — it is just a contract on Bitcoin. You could think of it as holding onto your original bitcoin, trading IOUs and enabling some additional features.

It does not require an ICO or AirDrop to attract new users, it is simply a matter of existing Bitcoin users connecting to the network — or using Bitcoin services that enable this for them.

So far, adoption is progressing ahead of expectations. Since the first mainnet implementation of Lightning went live for testing in January 2018 with 60 nodes connected, the network has grown to 4,398 nodes with 34,545 payment channels (as of the time of writing) according to Lightning Network Explorer.

Source: Lightning Network Explorer

Unfortunately, we can’t measure transaction activity in the same way we can with the Bitcoin base layer. On Lightning, transactions are private and so participants only see their own activity.

2. It makes Bitcoin more useful

Lower fees enable micropayments: Bitcoin fees are paid to miners as an incentive to secure your transaction in the limited space of a block. On the Lightning Network, you pay a fee to nodes providing the liquidity to route your payment. Whereas Bitcoin fees have averaged in a range of $0.1–$5 (spiking to $35 in the December 2017 rally), the average fee on Lightning is just 1 satoshi ($0.000079904). Micropayments above this value then become economically viable.

Instant payments enable commerce: Payment confirmations on Bitcoin take a minimum of 10 mins because that is the average time for each new block of transactions to be created by miners. 6 blocks (i.e. 60 mins) are preferable. Payments over the Lightning Network can route in seconds. So theoretically, you can now pay for your coffee with bitcoin, if that’s how you want to spend it…

Buying coffee with bitcoin becomes viable with a dose of Lightning

Together, micropayments and instant confirmations allow for a unique property of Lightning on Bitcoin: money can now flow almost like energy to power new types of applications.

For example, Andreas Antonopoulos in his Mastering Bitcoin gives a great example of a video streaming service. Instead of paying a monthly subscription or watching ads to view content, it would be possible to pay for exactly as much content as you consume while you are streaming it.

Money as data flows from you to the service provider and video content data flows back to the user:

Concept from: Mastering Bitcoin by Andreas Antonopoulos

Enhanced privacy: Bitcoin is described in the whitepaper as peer-to-peer digital cash, but in reality it lacks the fungibility of cash. The Bitcoin nets completely transparent because every single transaction is broadcast to the global network. Lightning re-enables the privacy and fungibility of cash because transaction data is only known to the parties involved.

Additional programmability: Bitcoin’s programming language is intentionally limited to ensure the robustness and security of the network. The limited script language of Bitcoin is used to enable the Lightning Network, which can then enable additional features on the second layer without burdening the main chain with the extra data and expanded attack surface that would otherwise result.

A great example of this are “hold invoices” which enable payment recipients to cancel a transaction. This enables a number of functions which can be based on conditional payments:

  • Transaction reversibility: Allows merchants to easily refund payments if a product is not in stock, or until the delivery of product/service.
  • Block payments from unwanted senders: For example, an entity which must comply with financial regulations can block payments from a sender until it can verify they have passed KYC checks.

Read more on “hold invoices” and their use cases here.

Self custody user experience improvements: Too often when using crypto services, users are required to deposit their crypto with a third party and trust them to custody it. By opening a Lightning channel, you could pay for the service without actually depositing Bitcoin upfront. For example, imagine your favorite internet video calling app required you to pre-fund credits in Bitcoin. Instead of keeping your Bitcoin in custody on the app, you could simply fund in Lightning and settle the net amount with actual Bitcoin when finished.

It just makes Bitcoin sooo much easier to use: When only interacting at the abstracted layer of the Lightning Network, users don’t need to deal with the rather complex language of Bitcoin. REST APIs for JavaScript now open up Lightning payments to web developers. We are already seeing this create a renaissance in Bitcoin application development and my hunch is this will continue to grow.

Health warning! #RECKLESS

Lightning is very much still an early-stage technology for those of us who are enthusiastic and knowledgeable about digital, peer-to-peer payments. Please only use if you understand the risks and only commit small amounts of bitcoin to the Lightning Network that wouldn’t hurt too much if lost. I will certainly report more observations in the future as the robustness and security of the network develops.

Some of the limitations of the network include:

  • Security: Lightning is not as secure as the main chain because it deals with signed but not broadcast transactions. There is an element of trusting your counterparty on the payment channel not to make life difficult for you.
  • Working capital intensive: In order to send or receive transactions on the Lightning Network, a user (and any channels used for routing) must already have Bitcoin locked up.
  • Participants must be online all the time: Specific nodes route transactions related to them, not the network as a whole, and nodes must be online all the time to participate. This currently makes it burdensome for non-technical users, but custodial services have sprung up to make things easier.
  • Reliable transaction routing: Lightning Network payment channels work really well when it’s only two parties transacting back and forth between each other. If you want to transact with someone you are not directly connected to, routing the payment along many hops might be inefficient in terms of channel capacity and reliability. We may end up with a need for dedicated routing nodes that users connect to in order to provide this service.
  • Reliance on HTLCS: The fundamental building blocks of the Lightning Network are Hashed Time Lock Contracts, but this is beyond the technical scope of this article. In short, the Lightning Network is not perfect. While it solves some of the engineering problems Bitcoin is facing, it also creates some of its own. It’s all part of the development process. (If you want to know more about HTLCs I recommend this critique by Daniel Robinson of Paradigm.)

Conclusion

The Lightning Network has the potential to add more functional value to your bitcoin and spark a new wave of Bitcoin application development enabled by peer-to-peer digital cash. Early adopters (including myself) are currently experimenting on the network with real bitcoin, and I will be monitoring developments closely.

I’m keeping my personal node somewhat private for now but we’ve set up a Lightning node at Bitstamp with the intention of opening up new channels to improve routing on the network and add to its total capacity. If you’ve got a Lightning node of your own, I encourage you to connect it to ours.

--

--

Simon Cowell
Bitstamp Blog

Philosophy. Institutional investor. Open source. Cryptocurrency. Cryptography.