Lightning network – the payment network of the Internet

This text is a part of my new book The Orange Flash of Freedom: Understanding and using the Bitcoin Lightning network

Although most bitcoin users look primarily at price and earnings, bitcoin has delivered much more than “just” digital gold. Even though altcoiners often criticize Bitcoin for being “slow” because blocks are created every 10 minutes on average, a payment network has been created over the Bitcoin protocol that will put any altcoin to shame.

The Lightning network has payments with instant finality, no need to wait for any confirmation by anyone else (there is no miner, or validator to wait for). The network is also known for its low payment fees – in fact, the network nodes compete with each other on fees specifically, so prices are driven down by long-term competitive pressure.

At the moment Lightning is mainly used for Bitcoin payments between users. However, the potential of Lightning is much greater. I realized this when I came across a payment terminal that didn’t support Lightning payments in a coffee shop. I could have paid with Bitcoin with a high fee or some altcoin, but I don’t own any that was supported. Thanks to the existence of instant non-KYC exchanges and the law of cryptocurrency isomorphism, we can use any cryptocurrency to pay, even if we don’t have it directly.

Lightning is the ideal payment protocol

If we wanted to use another cryptocurrency like Monero or Ethereum in this way, we would have two problems. For Monero, the basic problem would be that we would need to wait for the block to be mined – the exchange needs to wait for at least one confirmation, otherwise it could be a victim of a double-spend attack. The average Monero block is 2 minutes, but it could easily be that the block doesn’t arrive for several minutes. In addition, with a busier network, our transaction may not appear in the next block. If we are standing in a cafe paying a bill, the cafe will not see the Litecoin transaction, for example, until our Monero payment is included in the block. Some exchanges even wait ten blocks (20 minutes) until the Monero is spendable.

Block time is shorter on Ethereum, although sometimes it can take a minute to include a transaction, for example, the fees are usually high.

Lightning has predictably low fees and no need to wait for any blocks.

Searching for the ideal payment protocol of the internet

Lightning can thus be thought of as a basic payment protocol through which we can send value over the Internet. If I have a classic payment card (such as Visa, Mastercard, …) in euros, I pay with it in Paraguay, not only the sending of fiat currency will pass through the payment protocol, but there might be several currency exchanges going on in the background. I pay with the balance in euros, it has to be converted first to dollars so that the recipient will receive the guaraní (because there is no direct PYG/EUR pair).


And here comes another feature of Lightning – it uses Bitcoin, which is extremely liquid. While liquidity is not directly related to market capitalization, we can infer the approximate size of networks from it. Ethereum has a market capitalization of about a third of Bitcoin’s capitalization. Then there is BNB (Binance coin) and Solana, which are around 6%. And then nothing (I don’t count stablecoins, those are dollars, just in a different payment network – and they are liquid enough). So the distribution is as we expect it to be for the networks following network effect laws – it follows the power law.

If Liquidity is important (which it is if there are exchanges going on), there is no better option in cryptocurrency world than Bitcoin – the native currency of the Lightning network.

Absence of dirty coins

Another advantage of Lightning is that coins have no history and thus are fungible. There are no dirty coins in Lightning, they are all the same. This is a key feature for a payment network because it needs to be software-based and should be predictable – we don’t want a payment to stop because someone didn’t like the coins along the way. This is fortunately not a problem with Lightning.


Instant, inexpensive, “clean” payments using a liquid asset as a transported unit of account. What else? Programmability and multi-chain capability. I covered multi-chain capability in this article, so let’s look at programmability. With it, we can, for example, do atomic swaps – that is, a payment between different chains that either occurs in its entirety or not at all.

If we look at the credit card example – a number of things occurred along the way. I used euros from my bank account, euros were exchanged for USD on an exchange, USD was exchanged for PYG on another exchange, and the merchant’s account received exactly the amount of pyg he requested. In addition, no one can lose out on exchange rate differences. Exchange rates usually cost the client from 0% to 1%, receiving payment fees are 1%-5% and paid by the merchant. At least in terms of pricing, we have room to innovate. However, the fees also reflect what can go wrong along the way. If the “payment path” takes too long to create and confirm, it must be more expensive to exchange the currencies from one to another. The longer it takes to confirm, the more the exchange rate can move (and thus someone gets a free exchange rate option).

If the payment is not atomic, it translates to higher the fees for the payment itself (even if there is no exchange of one currency for another). What does it mean for a payment path to be atomic? Let’s look at what it means for the payment to not be atomic: For example, it could be that funds are deducted from the sender’s balance, but don’t arrive to the receiver, or vice versa. What can happen is that the payment is indeed confirmed, but it is eventually discovered that there has been credit card fraud. In this case, the merchant saw the payment confirmation, has given the customer the goods or services in exchange for the card payment, but the payment is later reverted and the merchant will not actually receive the money.

Atomic payment means that everything happens as a whole – no part of the transaction can happen on its own, but either the whole transaction happens or no part of the transaction happens.

Lightning itself is atomic, but thanks to programmability, Bitcoin exchanges over Lightning for another cryptocurrency can also be atomic. With some “plumbing”, so can hedges to other (fiat) currencies of the world be atomic. If Bitcoins left my Lightning wallet, Litecoins will surely arrive to the recipient.

Even better programmability

The programmability in Lightning goes much further, however. Rene Pickhardt and I wrote a paper in June 2019 about Lightning Discreet Log Contracts. With this technology, it is possible to essentially store a “smart contract” in the Lightning channel, whereby we can, for example, hedge the exchange rate of Bitcoin against the dollar and effectively hold a dollar balance in the Lightning channel – even with interest.

This idea was implemented by the 10101 project, which allowed you to have a Lightning wallet with both a dollar and a bitcoin balance at the same time, and you could pay with the dollar balance. This dollar balance was not represented by a stablecoin though – it was sats and a short position, which together create a stable dollar value. There was no Tether or any other third party token involved in this process.

While the project did switch from direct Lightning channels to simplified DLC channels that can’t route payments, paying from them using HTLC and atomic swaps is technically feasible and relatively easy to implement in the future. Either atomic swap technology or Lightning DLC will allow us to implement what card-based payment networks do – the payee wants a balance in guarani, I have some euros in Lightning channels. The payee thus creates a Lightning invoice that includes an atomic change of satoshi to guarani as part of the payment, I retrieve it and pay the necessary amount of satoshi, but I do so by stepping out of the position that fixed their euro value for me. I paid in “euros”, the “guaraní” came in, but only sats went through the network, because nothing else can natively go through the Lightning network.

Bitcoin as a universal currency (money, digital scarcity) is an instant universal means of payment, but we don’t have to come into contact with it if we don’t want to – and we can still take advantage of its unique properties.

Of course I think people should come into contact with it – anything else than Bitcoin is a huge risk these days, especially fiat. But people can still benefit from the Lightning payment network, even if they have not swallowed the orange pill yet.

Second generation backend software

Following the first-generation Lightning wallets came second-generation wallets like Phoenix and Breez, which unify Lightning and on-chain balance, automatically open channels, provide swap services, and simplify Lightning usage to two buttons: “Send” and “Receive”.

The same thing is starting to happen with backend software. For example, Blockstream’s Greenlight service allows you to leave most of the complex operations like blockchain synchronization, payment routing, and the like to the cloud service (built on a “core lightning” node), but leave all the operations with private keys to the end device. This service is used by the Breez SDK project, which makes it possible to build Lightning applications without having to run the entire Lightning node on the end device, but keeping the user sovereignty and ownership of private keys with the end user, in trustless way.

Another interesting project is phoenixd, which is a relatively tiny Lightning node that works much like the Phoenix wallet – you receive and send from a unified balance, and phoenixd opens channels for you if needed (for a fee). So accepting a Lightning payment into your app is one simple API call, and phoenixd handles everything for you.

In the event that the 10101 service or similar gets this level of programmable backend access, we would get the ability to own any form of value in a Lightning channel – or another technology that is atomic-swappable over lightning. We can also send this balance anywhere, even if there is nothing else but sats sent over the lightning network itself.


Thanks to the aforementioned features of Lightning, I think that Lightning will be the protocol for settling (clearing) payments even in cases where individual users will not want to use Bitcoin for the payment itself – either as recipients or senders. For many use cases, the protocol will even be invisible to users. A player of an online RPG game buys a new orange spacesuit for his character, pays for it with his credit card, the fiat currency gets atomically converted into Bitcoin, sent via Lightning to the seller of that orange spacesuit, who uses a service to accept payments with the payout to an Indian bank account in rupees. Most of the way, the payment goes through the payment channel in the form of Bitcoins (or sats), atomically, but the input and output can be a completely different currency and payment network.

Lightning will thus become a universal transport system for transferring value anywhere on the planet. Of course, Bitcoiners would prefer that all transactions begin and end in Bitcoins. But there is no technical or philosophical reason for such an ideological constraint on the Lightning protocol – people choose the money they want and are ready for – and sort of also what they deserve.

The Orange Flash of Freedom: Understanding and using the Bitcoin Lightning network

New book: The Orange Flash of Freedom: Understanding and using the Bitcoin Lightning network

This text is part of my new book about Lightning network: The Orange Flash of Freedom.

Bitcoin has created digital gold – empowering many people to freely transact using a non-inflationary, non-manipulable hard form of money. The Lightning network builds upon this innovation, offering a fast, scalable payment network, that can be used to instantly send and receive money over the internet. It is a basic protocol of the internet, similar to e-mail for communication, or web for accessing information or apps. Lightning network can be as complex as you need it to be.

Learn more about it in my e-shop or on Amazon