In this guide, I’m going to tell you what the Lightning network is, how it works and what it can be used for. You won’t need to go anywhere else to have the Lightning network explained to you. By the end of this short guide, you’ll know what’s good, what’s bad and what’s important about the Bitcoin Lightning network. I’ll begin with a look at where it all started… Bitcoin was created by ‘Satoshi Nakamoto’ in 2009. By 2011, they were gone, never to be heard from again! No one knows who Nakamoto is or exactly how they wanted the platform to be developed in the future. This is a problem, because Bitcoin is an amazing piece of technology but it isn’t perfect. If it’s going to remain the world’s biggest cryptocurrency then it will need to change and improve. This is where the Bitcoin community comes in… The Bitcoin community is full of talented and enthusiastic developers, engineers and computer scientists. They all have ideas about how to improve the Bitcoin network. Some of these ideas are so small that they are barely noticed and some are so large that new cryptocurrencies are created by them! The development I’m going to tell you about today is one of the most important so far. It’s called the Lightning network and it could change the way we use cryptocurrency forever.
Table of Contents
What is the Lightning Network?
Lightning Network works as a decentralized exchangeThe Lightning network was first proposed by Thaddeus Dryja and Joseph Poon in 2015. The problem it’s designed to solve is one of the biggest that cryptocurrencies face, scalability. Scalability is how well a platform can deal with a huge increase in its number of users. To understand the problem let’s take a quick look at how Bitcoin works…
Bitcoin BasicsBitcoin is a decentralized peer-to-peer payment platform. It’s decentralized because it isn’t run by a company like Visa and it doesn’t have a leader (Satoshi Nakamoto is long gone, remember?). Bitcoin is run by its users on a network of thousands of computers called nodes. Nodes contain a full record of every Bitcoin transaction that has ever been made. This record is called a blockchain. More than half of all the nodes need to agree that each new transaction is valid before it can be added to the blockchain. This is called consensus. One block of new transactions takes around ten minutes to be processed and added to the blockchain. The nodes that do most of the work of processing transactions are called miners and they’re paid fees for the work they do. This means that sending Bitcoin is not only slow, it can also be quite expensive. You might be able to guess the rest from here! Let’s get back to scalability.
The Scalability ProblemAs Bitcoin becomes more popular, its network of nodes grows. The more nodes there are, the longer it takes for them to reach consensus on new transactions. The average transaction speed goes down as the network gets bigger.3-7 transactions per second (Tx/s). Now compare that with two of Bitcoin’s real-world competitors. PayPal can process 150 Tx/s and Visa processes around 2000 Tx/s but can go as high as 56,000 when it’s busy. When Bitcoin is busy, users have waited 6 days for transactions to be processed! Transaction fees also tend to go up during busy periods, so users have to pay more for less. That’s the scalability problem Bitcoin and many other cryptocurrencies are struggling with. What is the Lightning network going to do about it? Let’s find out…
How does the Lightning Network work?You might have heard the Lightning network explained as a 2nd layer solution. This means that the Lightning network is trying to solve the scalability problem by adding an extra layer to the Bitcoin network. Here’s how it works… The Lightning network allows users to set up their own payment channels. This means that thousands of small and medium-sized transactions can take place away from the main blockchain. Imagine Joe works for Thad. Thad pays Joe 1BTC per day for a contract that lasts for 30 days. The pair set up a payment channel on the Bitcoin Lightning network. This information is added to the main blockchain and is called the anchor transaction. Every day, 1BTC is transferred from Thad to Joe in their new payment channel. These transactions are called micropayments and they happen instantly. The pair needs to agree on each transaction inside their payment channel. At the end of 30 days, the contract ends and the pair close the payment channel. The final balance of the channel is sent to the network, processed and added to the main blockchain. This is called the settlement transaction. So, whilst 30 micropayments took place between Thad and Joe in their payment channel, only two transactions needed to be added to the main blockchain.
Payment ChannelsTo set up a payment channel on the Lightning network, Thad and Joe need a multi-signature wallet. This is a bit like a joint bank account. A multi-signature wallet is created by a deposit of funds. In our example, it would be a deposit of 1-30BTC by Thad. This is the anchor transaction that’s added to the main blockchain. A multi-signature wallet requires each user to provide two kinds of information for transactions to take place. They are;
- Public address: This is the digital location of the Bitcoin. You can think of it like an email address, information can be sent to it and received from it.
- Private keys: These act sort of like a password for the public address. Each user has their own private lines of code that they use to “sign” transactions going to and from the public address.
Payment NetworksWhat’s special about Lightning network payment channels is that they can link up to become payment networks of thousands or even millions of users. Joe and Thad don’t need to set up payment channels with every user on the Lightning network in order to make transactions with them. Let’s imagine Joe is married to Lou and they have their own payment channel for household expenses. This payment channel links Thad and Lou through Joe, so Thad and Lou can now send each other Bitcoin without setting up another payment channel.
Lightning Network SecurityMicropayments on the lightning network are guided by smart contracts. Smart contracts are sets of rules that must be followed for transactions to take place. For example, users can attach fees to transactions which are paid to each node it passes through. A smart contract would make sure that fees are only paid after the transaction is completed. This gives all Lightning network users a good reason not to interfere with transactions. A quick note on Lightning network fees Lightning network fees are likely to be very small compared to the fees charged by miners on the main blockchain. The work done by Lightning network nodes is far easier than that done by miners. Any user trying to charge high fees to allow payments to pass through their node would be avoided. However, fees would soon add up to respectable amounts due to the high volume of Lightning network transactions. Two other important features of Lightning network security are timelocks and asymmetric revocation commitments. Here’s what they do;
- Timelocks can be used to set an upper limit on how long a payment channel remains open. This stops one user from disappearing and leaving the balance locked in the wallet. In our example, if Joe only worked for 15 days and then disappeared, Thad could claim back the remaining 15BTC in the wallet using a pre-set timelock.
- Asymmetric revocation commitments are a way to punish users who try to cheat the system and remove their share of a wallet at a time that suits them. Asymmetric revocation commitments allow users to set conditions where the cheated user could claim the full balance of a wallet, leaving the cheater with nothing!
Lightning Network TimelineIt could be argued that the Lightning network release date was December 6 2017 when its protocol was first issued on GitHub. However, the official Lightning network daemon wasn’t released until January 7 2017 so this could also be considered the Lightning network release date!
Time to see where are all these Pokemon fans at! I’m releasing Poketoshi!Visit – https://t.co/uZ2wUNq9Vl
A ‘Twitch plays’ like game, using @lightning network microtransactions.⚡
It’s also using @OpenNodeCo as underlaying tech to process all the payments 💪 — João Almeida (@joaodealmeida94) June 16, 2018
Lightning Network Issues: 2018In January 2018, Lightning Labs co-founder, Elizabeth Stark, criticised Blockstream for allowing its customers to pay for goods using the mainnet Lightning network. Stark accused Blockstream of risking their customers money by using technology that hasn’t been properly tested yet. She tweeted, “Bad move @Blockstream.”warned the community about these kinds of risk. He also explained that attacks like these on the Lightning network could also affect the main Bitcoin blockchain.
Lightning Network: Pros and ConsMy Grandma always tells me to start with the bad news, so here it is!
✗ The Lightning network isn’t ready yet. It’s hard to say how successful it could be until it’s being used by hundreds of thousands of people. Unfortunately, the Lightning network has enough issues to keep the development community busy for quite a long time.
✓ It’s a long-term solution to the scalability problem. Other platforms – like Bitcoin Cash – have made changes to Bitcoin which they think solve the scalability problem. However, their solutions tend to be short term. If the network is ever going to be truly scalable, then it will come in the form of a project like the Lightning network. Few other suggested solutions are big enough to fix the problem completely. ✓ Micropayments mean micro-fees. The Lightning network could solve Bitcoin’s second biggest problem which is high fees. When it was created, Bitcoin promised super-fast transactions and low or no fees. So far, it hasn’t delivered. But with the Lightning network it might be able to in the near future! ✓ The Lightning network gives users more control. The main Bitcoin blockchain is largely controlled by miners. Miners use very powerful and expensive equipment to complete the tasks involved in processing transactions. On the Lightning network, nodes can be run by anyone; on laptops, home PCs and (one day soon) mobile phones. Bitcoin was designed to include everyone and that’s exactly what the Lightning network wants to do.