What is Lightning Network? And How to Use It in 2020 – Decrypt
Table of Contents
Because of the way it’s built, Bitcoin suffers from slow transaction speeds and high transaction costs.
The Lightning Network is a “second-layer solution” that speeds up transactions, while reducing costs, by skirting the main Bitcoin blockchain.
It’s made up of a system of channels that allow people to move money without needing to use the Bitcoin blockchain to verify the transactions.
Bitcoin has been hampered by its own popularity. Thanks to the way the blockchain is designed, the speed of transactions is slow and the cost of transactions has gone up.
Researchers, developers, and the Bitcoin community have been trying to come up with a way of allowing Bitcoin—and other cryptocurrencies—to accommodate more transactions. Their best efforts to date have focused around something called the Lightning Network. Can it fix the cryptocurrency’s scaling problems? We find out below.
Bitcoin’s current limitations: speed and cost
There are two limitations we need to explain when it comes to blockchain before we can explore how people are trying to fix it.
The first is speed.
In a blockchain, blocks are essentially groups of transactions collected together. As part of a blockchain’s design, there are only so many transactions that can be included in a block.
If your transaction doesn’t make it into the current block, it joins a queue. That queue can take anywhere from a few minutes to potentially a day or more to process, depending on how many other transactions are queued in the mempool.
That limits the blockchain’s use as a medium to process quick transactions, like buying a cup of coffee. No one wants to wait around for the network to verify you’ve got the cash.
The second limitation is cost.
Bitcoin’s network, and others, are built upon a consensus protocol called proof of work.
This is where miners expend energy trying to solve a difficult puzzle. To help offset the cost of equipment and energy used in that calculation, miners charge transaction fees.
When the system is small, and the number of transactions that need verifying are few and far between, the network works well and transaction costs are low. As the network grows, however, so does the cost of transaction fees, since there is limited space in each newly mined block. As a result, only the highest fee transactions are processed highly during times of high load.
Bitcoin’s scalability challenge became apparent towards the end of 2017 when millions of people jumped on the Bitcoin bandwagon and it struggled to cope with the number of transactions. At its peak in December 2017, the average cost to process one transaction on the Bitcoin blockchain—whether it was for $1 or $1,000—was $37. That makes Bitcoin un-economical as a form of currency, since the transaction fee would be higher than the actual payment for many small transactions. That’s where the Lightning Network comes in.
The Lightning Network is a “second-layer solution” built on top of the Bitcoin network, meaning that it is built separately to the Bitcoin network but interacts with it. It’s made up of a system of channels that allow people or companies to move money between one another without needing to use the blockchain to verify the transaction.
In theory, it could allow thousands or even hundreds of thousands of transactions to take place instantly, making it great for small transactions.
It bears similarities to the current settlement system used by companies like Visa and Mastercard. When you pay for something it’s not instantly settled.
Instead, there’s a quick verification of funds from the buyer and the request from the seller—giving the green light for a transaction to take place.
The settlement of the funds happens later—in some cases days or weeks later.
The Lightning Network is run by a network of nodes that process payments, and transactions are commonly made using QR codes—instead of complex public keys.
The bottom line is that it allows for faster payments, with lower fees.
Who came up with the idea?
The Lightning Network has its origins inmusings by Satoshi Nakamoto, the pseudonymous creator of Bitcoin, but was formalized by researchers Joseph Poon and Thaddeus Dryja who published awhitepaper for the Lightning Network on January 14, 2016.
In it, they argued that a network of micropayment channels could fix the scalability issues of the Bitcoin network, rather than changing the Bitcoin network itself to allow more transactions.
Lightning Labs, a blockchain engineering lab, helped to launch a beta version of the Lightning Network in March, 2018—alongside a host of individuals and other companies including ACINQ and Blockstream. It was funded via a $2.5 million seed investment round, which included notable investor Twitter CEO Jack Dorsey (who has recently been gettingmore involved). The Lightning Network was the first attempt at a second-layer solution, but others followed.
Did you know?
Jack Dorsey, the CEO of Twitter is a big fan of the Lightning Network and has personally invested in the project!
How does the Lightning Network work?
The Lightning Network speeds up transactions, while reducing costs, by skirting the main Bitcoin blockchain. It is an unstructured network set up around it.
Channels are the ad hoc, peer-to-peer connections through which payments are made. Any number of payments can be sent in a channel.
The network is maintained by nodes that route payments. Nodes are run by everyday people—or corporations—running a program on their desktops, laptops, or Raspberry Pis. This keeps the Lightning Network decentralized.
To start using the Lightning Network, any amount of Bitcoin needs to be locked up in a payments channel. Then, it can be spent across the Lightning Network, until the channel is closed.
When someone wants to receive a transaction, they create what’s known as an invoice. These are a long alphanumeric string of digits—which is often represented using QR codes. The person who wants to make the payment simply needs to scan this invoice with their Lightning Wallet and confirm (by providing a digital signature) that they want to make the payment.
When a payment is made, the confirmation is sent across the network to the person who originally made the request. This is known as a peer-to-peer network and means the processing of payments is not reliant on any one party. This typically happens in just a few seconds—hence the name Lightning.
Since payments are not made on the Bitcoin blockchain, they are not subject to long wait times and high fees. This means that much smaller payments, or micropayments, can be made for as little as one satoshi (one hundred millionth of a Bitcoin). This makes it more suitable for everyday transactions—while larger transactions can be made on the Bitcoin network.
Once someone has finished using the Lightning Network, they can close their channel and exit the network. This means they can use their Bitcoin again on the standard Bitcoin network.
For a more complex, technical introduction to the Lightning Network, check out Lightning Labs CEO Elizabeth Stark’s guide on Coincenter.
How do I pay with Bitcoin using the Lightning Network?
Let’s say you want to transact with your local coffee shop. First, you’d need to send some Bitcoin to a wallet that requires more than one signature or key to release the funds.
These are commonly referred to as multisig wallets. These multisig wallets require more than one signature in order to release funds. In the case of the Lightning Network, it allows people to enter into an agreement that ensures they receive the agreed payment. In effect, creating a balance sheet.
Every time you buy a cup of coffee you create a new balance sheet and sign it with your public key to reflect what’s left in your wallet, and what’s in the coffee shop’s wallet.
If you don’t want to buy coffee anymore from that coffee shop, you can close the channel, and the resulting balance sheet is committed to the blockchain as a permanent record.
Payment disputes can also be settled by referring to the last signed balance sheet between the two parties.
What happens if you don’t have a direct channel with the next place you want to buy something from? The network will find the shortest route between you and the shop via others in the network.
The Lightning Network: Not just for Bitcoin
Although it was originally designed for Bitcoin, the technology is currently being adapted and developed for a range of cryptocurrencies which include Litecoin, Stellar, Ether, and Ripple.
When will we see the Lightning Network in action?
It’s already live! The first version was launched on Bitcoin in March 2018 and has started popping up in different places. One of the most recent is Twitter!
How to connect to the Bitcoin Lightning Network
You can connect to the Lightning Network either by running a node or by using a Lightning wallet. Here are our top picks:
Bitcoin Lightning Wallet on Android
If you don’t want the full-node experience, you can download theBitcoin Lightning Wallet app on your Android phone, which sorts everything out in the background and lets you connect to the Lightning Network. With this, you can open a Lightning channel and start making transactions to other users. It’s also “non-custodial,” meaning you look after your own keys—keeping your Bitcoin in your hands. (We tried it out by paying for ataxi ride).
If you want to use the Lightning Network but don’t want to look after your own funds,Blue Wallet is a custodial service that runs a node for you. It allows you to send and receive Lightning payments, but doesn’t let you withdraw your Bitcoin from the Lightning Network.
It also has a “Lapps” marketplace. Lapps is a portmanteau for “Lightning apps” and are apps that use the Lightning Network, the way decentralized applications (or “dapps”) run on regular blockchains. So far, there are only a few Lapps, such as Bitrefill for paying phone bills, and ZigZag for exchanging cryptocurrencies. As Lightning picks up steam, expect the number of Lapps to grow, too.
To get the full Lightning Network experience, you can try running a full node. Sounds complicated? It isn’t, actually. The folks at Casa have put everything you need in one box, so all you have to do is plug theCasa Node into itself,weirdly enough, and you’re up and running.
So what does this mean? Well for a start you’re now supporting the Bitcoin network and the Lightning Network by checking that transactions are legitimate. It also means you can connect it to your computer and make transactions from your own node. This literally makes you your own bank; you are the only person owning and controlling your funds. Scary, huh?
If you’re feeling more ambitious, you could set up a full Lightning Node. This takes a lot more computer know-how to run. It means downloadingEclair onto your computer—or a homemade Raspberry Pi—and running it. You are then routing transactions on the network and can make your own transactions.
Eclair also offers a mobile version for Android users calledEclair Mobile. This is a stripped-down Lightning node, which means you stay in control of your Bitcoin. You can connect it to your own Eclair Lightning Node if you’re running one. There’s only one catch: you can’t receive payments to it. Eclair explains why inthis blog post. TL;DR it’s safer and easier for them.
Once you’ve set up your own node, what next? Are you stuck with using a desktop app?Lightning Joule is a browser extension that lets you connect your Lightning Node to your browser so that you can easily make payments within Chrome, Firefox, Opera and Brave. It’s a convenient hack.
What can you do with the Bitcoin Lightning Network?
For a start, you can make payments to anyone else who has a Lightning wallet set up. But there’s more to the Lightning Network than just that. As it is a digital currency, it is easily integrated into websites without the need for third parties to get involved.
Although the vast majority of crypto companies don’t yet accept Lightning transactions, the number of platforms that do is slowly growing. Nonetheless, a wide range of popular Lightning-capable platforms are currently operating, ranging from cryptocurrency exchanges like Bitfinex and MercuriEX, online retailers and merchants like Bitrefill, as well as a wide range of casinos, and other service providers.
Here are some examples of things you can do with the Lightning Network:
Get some satoshis with a Lightning Faucet
You can get some more Bitcoin. Faucets have long been a way to distribute small amounts of Bitcoin and other cryptocurrencies, and it’s no different with the Lightning Network. This Lightning Faucet lets you test sending and receiving from a Lightning wallet; you can withdraw a maximum of 100 satoshis every 4 hours, which is just over $0.01. Got to start somewhere though.
Buy a Domino’s pizza
Feeling hungry? Before you reach for your debit card, why don’t you try ordering your pizza with the Lightning Network. That’s right,Lightning Pizza will order a Domino’s pizza on your behalf once you’ve paid them in Bitcoin—but only if you’re in the US, though. Of course, it’s not the only way to buy pizza with Bitcoin.
Tip people in Satoshis on Twitter
Do you wish social media was more rewarding? Well now it is. You can tip other people—and they can tip you—in Bitcoin using the Lightning Network. Simply integrateTippin.me and it puts a little lightning symbol on every tweet.
You will need your own wallet to send tips (see above). All the cool kids are doing it, likeJack Dorsey, cofounder of Twitter.
How big is the Bitcoin Lightning Network?
It’s hard to grasp something that involves thousands of little parts, making millions of interactions with each other. It’s a bit like trying to picture everything going on in your brain. So, to make this a bit easier, we have used a number of visual diagrams. This is what the Lightning Network looks like from above.
A great resource for Lightning Network data is 1ML, a search and analysis engine. It provides data on which stores accept Lightning payments and information about current nodes. But it also features a spectacular visualization of the Lightning Network, showing all the nodes and how they are connected to one another. Check it out below.
For the more topologically minded of you, here is a map showing the locations of many of the Lightning Network nodes and how they are connected. You can see that there are three main areas where they are concentrated but that some exist in the far-flung reaches of the world. Expect this map to become much more cluttered as time goes on.
If that wasn’t trippy enough, here’s a 3D view of the Lightning Network that you can explore. And if you want to dive even deeper inside the network, you can don VR glasses to get the full experience.
This visualization makes the Lightning Network look like some kind of futuristic planet. This is the view from one person’s node. The larger the areas, the more Bitcoin in the Lightning channels. Interestingly, the large blue area on the right is called “DeutscheTestnetBank,” whoever that might be.
The current state of the Lightning Network
The Network faced its first major hijack on March 20, 2018 when a distributed denial of service attacktook down around 200 Lightning nodes, about 20% of the network at the time—meaning that the network struggled to process any transactions. After preventative measures were put in place, it grew to reach a total of 7,000 nodes.
Since then, the Lightning Network has continued to grow. As of our most recent update (September 2020), there are just shy of 13,900 Lightning nodes and over 37,000 channels in operation. The total network capacity of the Lightning Network now sits at 1,098 BTC (or around $11.4 million at current values).
Each Lightning node is responsible for interacting with other nodes to help transact money, while the channels are essentially the highways that enable money to be moved between nodes on the network. The more nodes and channels there are, the easier it is for larger transactions to complete successfully.
Overall, the total network capacity has grown by 40.7% in the last year, while the average capacity of each channel has grown 22% to reach $331 over the period. Due to a lack of pathways for some transactions, the Lightning Network still remains of limited use for large transactions in most cases.
A recent episode of The Pomp Podcast does an excellent job of covering the current progress and limitations of the Lightning Network, and features key insights from Jack Mallers, the founder of one of the most commonly used Lightning wallets—Zap.
The future of the Lightning Network
The popularity of cryptocurrencies and transacting on them has, within just a few short years, put increasing stress on the blockchains they’re built on.
While there have been smaller changes—and some cases forks—to help the networks better cope with demand, the Lightning Network, if successful could help open the door to widespread adoption of cryptocurrencies and their applications.
In August 2020, the Lightning Network was updated to include support for the Wumbo function. In the early days of Lightning, the developers limited how much Bitcoin could be kept inside a Lightning payment channel to 0.1677 BTC; Wumbo channels enable nodes to service larger transactions and higher volumes. Crypto exchange Bitfinex is among those who’ve announced support for Wumbo channels.
The Lightning Network is spreading beyond Bitcoin, too. Blockstream has created its own implementation of the Lightning Network calledc-Lightning which is built in the C programming language, familiar to most developers. Litecoin has its own version, too—the Litecoin Lightning Network—which is small compared to the Bitcoin version, but is slowly growing.
For more resources on the Lightning Network, check out Jameson Lopp’s resources page here.