What is Lightning Network? How does it work?

As executive director at CRYPSA (The Cryptocurrency Standards Association), I enjoy the privilege of awarding any one article, seminar or course our highest editorial award without requiring nomination or a committee vote.

An anonymous contributor to Cointelegraph wins our first ever Flying Duck Award in the category of Guide, Tutorial, Course or Academic Unit.  [continue below image]

A tutorial at Cointelegraph remains the most most clear and simple explanation of Lightning Network we have seen. It astounds me that this 2300 word article is both undated and apparently uncredited. We don’t know if it was written by an editor, a regular columnist or an outside contributor.

The Lightning Network addresses a serious scaling issue in Bitcoin that was predicted from the very first discussions in the same crypto Newsgroup that Satoshi described his electronic cash payment system. It is a protocol that improves bitcoin’s scalability and speed without sacrificing trustless operation. It is a major step in overcoming the scaling problem.

If you want an introduction to the Lightning Network that you will readily understand and be able to convey to your friends and colleagues, look no further. Although breezy and geared toward a layperson, this piece covers the gamut of a serious academic treatise:

• What is Lightning Network?
• How does it work?        • Who developed it?
• Where, when and why will it be used?
• Pros                              • Cons
• Should I use Lightning Network?


2020 CRYPSA Award for Best Article or Editorial
Classification: Guide, Tutorial, Course or Unit

* Disclaimer

It’s humbling to give this award to Cointelegraph, a competitor in the area of Bitcoin news, education and courseware. I have written more than 1200 articles this year on Bitcoin, blockchain, ICOs and all manner of cryptocurrency issues. But this one article is best-in-class.

We are not affiliated with Cointelegraph. No one at A Wild Duck has written for that organization nor been compensated by them—ever. This blog post will be their first knowledge of an award which, was simultaneously announced by CRYPSA (The Cryptocurrency Standards Association) and LinkedIn Bitcoin, a group with 55,000 active subscribers.

Spending Bitcoin in Person is Easy (What happens in background is elegant)

Today, I was co-host of an online cryptocurrency symposium-taking questions from hundreds of visitors. A common question goes something like this:

Can Bitcoin be used in person-or is it just for internet commerce?

Well, most cryptocurrency transactions are used through trading. If you want to find out how to trade Bitcoin then take a look at this review on Bitcoin System to learn more. However, not all transactions are down to trading and a growing number of transactions are done for the exchange of goods.

Our panel had a moderator, and also an off-screen video director. As I cleared my throat in preparation to offer a response, a voice in my ear reminded me that it was not my turn. The director explained that another panelist would reply. It was a highly regarded analyst and educator in Australia. Realizing that she was calling the shots, I deferred.

I was shocked as I listened to this far off colleague suggest that Bitcoin is not useful for in-person payments. I wonder how he explains this to the grocers, tailors, lawyers, theme parks and thousands of retailers who save millions of dollars each year by accepting bitcoin-all without risk of volatility and even if they demand to instantly convert sales revenue into Fiat currency.*

Of course it can be used in person, Numb-nut! Yes, even the stuff you get off of Zipmex and other platforms.
(I kept this thought to myself. I know better than
to criticize another panelist).

An in-person transaction, such as paying for a meal after consumption, is an ideal use scenario. It benefits everyone: The seller captures greater value and the buyer is unlikely to need bank-brokered arbitration. He only needs a receipt. He will never demand a 90-day return warranty, claim that he was shipped an empty box, nor complain about the amount charged.†

But this isn’t about my clueless colleague. It is about the ease of using Bitcoin in person and the interesting stuff that happens in the background. Let’s look at a simple purchase scenario – and then we’ll dig in to marvel at the settlement process. This is a true story, told in 7 bullets. It occurred in the summer of 2015-just 5 years after the very first use of bitcoin to purchase anything (Bitcoin Pizza Day was May 22, 2010).

  • It’s 2 AM on a moonlit Sunday morning. Driving from Boston to New York, I rehearse the Bitcoin presentation that I will deliver at a startup clinic hosted by LaGuardia Community College and the Cryptocurrency Standards Association. Wracked by hunger, I pull off the last exit in Connecticut and find the Darien Diner. Great food! My meal costs $12.
  • As I take one last bite of midnight quiche, I realize that I forgot my wallet! No cash; no driver’s license. Although I have a smartphone, it is brand new. I have not yet loaded it with credit cards. But I can access to my passwords and accounts.
  • I scope my surroundings. The waiter is the only one on the main floor. He is also the cashier. Seeing no other customers or staff, I figure that the owner or cook is in the kitchen; probably the only other person on site. I approach the cash register, hoping that the waiter will accept my apology-and trust that I will pay on my return trip in a few days. Before I launch into a poor-man’s excuse, I spot a placard shown below. Bitcoin is among the diner’s accepted payment methods. Pretty neat for 2015!
  • Bitcoin accepted hereI ask the cashier how I can pay with Bitcoin. His response catches me off-guard: “I have no ideaThey told me that you would know.” What?! Does this guy recognize me? Does he know that I am on my way to give a Bitcoin lecture? This seems very unlikely. Gradually, I understand what he means, and I know what to do…
  • I point my smartphone at the QR code (It’s taped to the cash register next to the words: “We accept Bitcoin“). In fact, this restaurant is fully on board. I am amazed to see that a display on the register offers a custom code that is encoded with the exact meal cost. That’s really cool! So, I shift my camera to that code.
  • Immediately, my wallet asks if I would like to add a tip. (It’s hosted by an online exchange, but an application wallet will also work). I add $3 and press SEND.
  • A thermal printer next to the till spits out a narrow receipt. At the very bottom, where it would typically say “Paid with MasterCard ending in ?3862”, it says “Paid with Bitcoin“. The buzzing sound of that receipt printer tells the cashier that I am good to go. Good food in the tummy and a bill has been paid. Case closed; Return to car; Drive to New York. Note to self: Find other Bitcoin vendors on trip.

What Really Happened?

In the seconds between authorization and a printed receipt, fascinating things occurred around the world. Seriously Fascinating-just like magic! It is transforming the way payments work and-eventually-the way we view, understand and manage cash. ‡

  • When I clicked SEND, a limited subset of Bitcoin credentials was presented to a massively distributed, worldwide network of miners. In effect, I informed the bookkeepers that I wish to have $15 transferred to the restaurant’s public address.
  • Seconds later, my original credentials are voided (this solves the ‘double spend problem‘) and a transaction is added to a public ledger called the blockchain. My stake in that ledger now reflects slightly reduced wealth-all without a bank, government, repository, treasurer or monetary policy. In fact, there is no authority at all, except fair and transparent rules of math; something we all agree upon.

But wait! It gets even more fascinating…

The “miners” that settled the transaction and provided the new Bitcoin credentials needn’t have any awareness that they just facilitated payment for a meal at a diner in Connecticut. From their perspective, these individuals and large server farms in Iceland, China, Israel, and South Africa-and in college dorms spread across the world-are engaged in a massively distributed gaming competition. They are competing for rewards based on solving a math problem.

As you review that last paragraph, imagine the elegance of the global network. Imagine the power, robust nature, and benefit that comes from it’s redundant and decentralized architecture. Imagine the brilliance of an anonymous genius who goes by the name “Satoshi”. Imagine the incentive for disparate bookkeepers to play a critical role in balancing a world-wide ledger. Imagine that authorities cannot shut down the network or even slow down adoption or the pace of transactions. Imagine the trust that individuals, businesses, NGOs, banks and governments no longer need to can put in a monetary supply and mechanisms of accounting. (Never again must we trust institutions to record our transactions or protect our wealth). Imagine a world where this trust benefits everyone uniformly, fairly, and without a path to graft or inflation.

Bitcoin and the blockchain-introduced together-are not minor, incremental contributions to economics, bookkeeping, trust or commerce. They are overwhelmingly significant to the future of human society and every institution and inhabitant.


Notes / Caveats / Clarifications

† You may have heard that bitcoin transactions are immutable. This is a simplification. The public ledger is immutable, but transactions are reversible, if terms are clear to both parties. Just as with Ethereum, smart contracts are built into the technology. So are hooks to centralized mediation, if that’s what the agreement calls for. Charge-backs, refunds, warranty demands and other arbitration are all possible. These features are built into Bitcoin, but rarely used in this early era.

Most Bitcoin transactions today are payments; they are not charges. Although they do not typically accommodate bank-brokered returns, rescission and charge-backs, these are all possible, and often without requiring an authority to broker the dispute. But these traditional safeties or mitigation must be agreed upon in advance. No longer does the seller have all the power, or the buyer need to run to a credit card processor to complain. Sales are either immutable or brokered by a 2-party contract.

This is not your grand-daddy’s payment mechanism. It is so much more evolved!

‡ In 2017, Bitcoin went through a period of intense growing pain. Transactions became so slow and costly, that in person transactions became impossible, especially for any amount less than $500. If you needed a transaction to complete in less than an hour, you would need to enlist in a bidding contest. A quick confirmation could cost upwards of $30 US.

The restaurant payment related above was an on-chain transaction. Today, transactions that use the Lightning Network overlay may occur within a private channel apart from the blockchain. But ultimately, every change in bitcoin ownership results in an individual or aggregated entry onto the blockchain.

* Crisis in late 2017 and 2018

Sadly, in researching this article, I learned that the Darien Diner no longer accepts Bitcoin. Problems with transaction cost and delays in late 2017 and early 2018 discouraged a great many retailers. No one purchasing a $12 meal will pay $30 in fees, and a cashier is not going to wait 2 hours to validate payment from a customer who has already eaten a meal and wants to hit the road.

That glitch sparked a terrible flight from retail adoption. Even now (Q3 of 2019), retail penetration is sharply off its peak. We are barely clawing our way back to the early adoption rate. Vendors lost faith, and many don’t yet realize that their POS investment can now be safely be reactivated. Lightning Network to the rescue!

The Next Crisis

Another crisis is looming, but it too will be solved.

Although the Bitcoin network is fast and inexpensive, the proof-of-work method used by miners to arrive at a distributed consensus consumes far too much power to scale. Mass adoption would consume more power than the world currently generates.

And here’s the kicker: The mining incentive ensures that any new, inexpensive energy that might be discovered in the future would be gobbled up by miners with no additional benefits to society (or even to the Bitcoin network). All the new, free (or cheap) power would be diverted away from homes, businesses, manufacturing and public works. The incentive for grabbing every cheap watt is very much like a cancerous growth.

Clearly, this is not sustainable. Bitcoin mining already uses more power than all of Argentina. But great minds are working on the problem and alternative methods of guaranteeing a fair, crowd-sourced accounting consensus are being tested, analyzed and debated. We will get through this complex problem, and hopefully-this time-without demoralizing a key factor in the tetrad: Consumers, developers, vendors & miners.

Have there been successful Transaction Malleability attacks?

First, let’s get some basics out of the way…

What is Transaction Malleability?

Here are 2 explanations of transaction malleability: [Coindesk] [TechTalk]

In a nutshell, Transaction Malleability is a weakness in the original Bitcoin implementation that enables a bad actor to change the unique ID of a bitcoin transaction before it is confirmed on the Blockchain. Such a change makes it possible for someone to pretend that a transaction didn’t happen, if all necessary conditions are in place.

As the Coindesk article points out, a successful attack requires certain conditions that make a successful attack difficult or even unlikely. Many analysts referred to it as a bug that should eventually be fixed, rather than an urgent issue.

Was This Flaw Addressed

Transaction malleability was addressed (for Bitcoin) with the introduction of Segregated Witness (SegWit) in August 2017. 1, 2

But Was There a Successful Attack?
Attack? Yes. Successful? It’s doubtful…

In March 2017, five months before SegWit was implemented, a mining pool that administers 2% of worldwide activity launched a malleability attack. No one lost money – and some individuals believe that they did this to emphasize urgency and hasten the adoption of SegWit.

What About Lightning Network?

The Lightning Network is a ‘Level 2’ network overlay, currently being adopted by miners (depending on the service or exchange, it is being incrementally activated in the first months of 2018). To function properly, it requires that transaction malleability be solved. But, in the event that a miner is not SegWit compliant, it can resolve the malleability problem in other ways.

1 SegWit should not be confused with SegWit2x, an upgrade process that was cancelled a few months later in November. 2017

2 In the TechTalk article linked above, the author concludes:

“Transaction Malleability is fixed with Segregated Witness by no longer taking into account signatures when calculating the transaction’s fingerprint. Fixing Transaction Malleability means that the Lightning Network can work smoothly.”


Ellery Davies co-chairs CRYPSA, hosts the Bitcoin Event and presents at Crypto Conferences around the world. Book a presentation or consulting engagement.