Submind YouTube summaries
Thumbnail for Lightning Network: what is it? why should I care? what can I do with it? Enjoy bitcoin like its 2013

Lightning Network: what is it? why should I care? what can I do with it? Enjoy bitcoin like its 2013

Watch on YouTube

Video summary

The Lightning Network is an overlay network built on top of the Bitcoin blockchain, designed specifically to address the limitations of speed and cost inherent in the main chain. It functions as a layer-two solution where transactions occur off-chain through payment channels between peers, yet they remain secured by Bitcoin's underlying security guarantees without requiring users to trust third parties if they run their own non-custodial wallets. The primary purpose of this network is to enable near-instantaneous settlements and drastically reduce fees compared to on-chain transactions. While a standard Bitcoin transaction might take ten minutes for confirmation and cost several dollars in fees during busy periods, Lightning payments typically complete within one second with costs measured in fractions of a cent, making it viable for micro-payments that are economically unfeasible on the main blockchain. The operational mechanics of the network rely heavily on payment channels, which act like open bar tabs allowing participants to exchange value multiple times before settling the final balance on-chain. When sending money across this decentralized web, nodes must construct a route through various peers using advertised channel capacities and fees, similar to how GPS software finds directions via intermediate cities rather than direct highways. A unique feature of this routing system is its ability to preserve privacy; intermediaries in the payment path only see funds entering one side of their node and leaving the other without knowing the original sender or final recipient. Additionally, while Bitcoin's smallest unit is a Satoshi, the Lightning Network can handle even smaller fractions known as milli-Satoshis (msats), enabling payments far below the value of a single cent for applications like anti-spam tokens or pay-per-read articles. Despite its advantages, using the Lightning Network today still feels somewhat experimental and raw compared to modern polished payment systems, reminiscent of Bitcoin's early days in 2013 when users accepted unconfirmed transactions due to limited adoption. Users may encounter issues such as payments failing because there is no available route or insufficient liquidity on specific channels, requiring a few seconds for the network to calculate an alternative path or resulting in errors if none exists within ten seconds. The speaker notes that while user interfaces have improved significantly over recent years, technical hurdles like disk space management and chain synchronization can still cause disruptions for node operators. Consequently, the ecosystem is best suited for small transactions under twenty-five dollars; larger amounts are often better handled on-chain due to routing difficulties, whereas tiny payments benefit most from Lightning's low-cost structure. Ultimately, the Lightning Network represents a frontier that opens up new possibilities for Bitcoin usage by enabling micro-transactions and high-frequency trading scenarios previously impossible with traditional payment methods or the main blockchain alone. It allows users to enjoy the benefits of digital cash—speed, privacy, and decentralization—at a scale comparable to 2013 but with modern security guarantees provided by smart contracts rather than trust in intermediaries. For those interested in exploring this technology further, setting up their own node using open-source software like BTCPay Server offers a non-custodial way to accept these payments directly on websites or shops. By leveraging discount codes for small digital products, users can practically experience the "sweet spot" of Lightning's capabilities firsthand, witnessing how quickly and cheaply value moves across the network without relying on centralized custodians who control their funds.
Read the full video transcript
so the lightning network is a layer to network uh layer to network that means it is a network that runs as an overlay above Bitcoin and it's important to understand that just because it has a different name doesn't mean that this is something that is different from Bitcoin it works differently from Bitcoin but when you are using the lightning Network you are using Bitcoin you are transacting in Bitcoin and the lightning network is uh in many ways uh has the same security guarantees as Bitcoin meaning that in order to transact on the Ling Network you do not necessarily need to trust anyone else um you can run a wallet in which you control the keys uh you don't have to use a custodial system and the lightning network is not uh by default a custodial system although there are custodial systems within lightning that means somebody else controls your money so the lightning network is an over Network that runs on top of Bitcoin where you transact in Bitcoin so what is the point of the lightning Network the point of the lightning network is speed and cost that's the main focus so the lightning network is fast what do we mean by fast it means that uh if you do a lightning payments and we call them payments rather than transactions to differentiate from what happens on the Bitcoin chain on the lightning network if you do a payment um it usually completes in less than one second so um if uh conditions are perfect then in less than one second the payment will complete and this is not something the people who are familiar with Bitcoin are expecting um the speed of the lightning Network it's lightning fast that's where the name comes from um is often a surprise uh there's no waiting 10 minutes for confirmations in the block and when you make a lightning payment and it completes in one second that's not just transmitting the payments that's done it's settled confirmed finalized within less than a second now under certain conditions on the network if there isn't quite enough capacity if the there isn't a clear route between your wallet and the recipient then it might take a few seconds to work out and sometimes the payments fail so you might click and instead of a payment succeeding in a second it might take five six seven seconds um but usually if it hasn't happened in 10 seconds it's not happening at all though you'll get an error message saying there is no route for your payment so first um feature of the lightning network is speed less than a second and here's a funny story that illustrates this um if you go to uh some Bitcoin conferences one of the things you might see at these Bitcoin conferences is uh various lightning enabled vending machines and one of the classic ones is the lightning enabled beer tap so this is basically a um a beer dispensing tap so it's a it's a keg with with a A Beer tap and that um that will dispense beer uh in in return for a lightning payment and so the funny thing about this is when you have a system that takes less than a seconds for the payments to go through um the user interface and user experience design uh of your system has to be considering that aspect and the first time I use the beer vending tap for lightning um what I noticed and then watched happen again and again and again and it was very very funny was that people were anticipating that there would be some slight delay so they're fiddling with their phone right they're scanning the QR codes and they're hitting send but their cup is in their hand they're not ready and so they hit send and the Machine goes Bing and starts pouring beer and they have to rush and stick the cup underneath uh and lose some of the beer uh to the floor because it kept dispensing before people were ready and so literally from send to beer starts coming out of the tap less than a second and um they had to keep reminding people no put put your put your cup put your glass under the tap before you hit send on your wallet because it kept getting people surprised so fast that's one of the features the second feature is cheap so the linning network um has fees but these fees are very different from the transaction fees you have on bitcoin because we're not relying on a limited space blockchain because uh the lightning network is payments routed through peers um on a decentralized network the fees are actually much much lower and when I say much much lower I mean three or four orders of magnitude lower so let's say your um uh your average Bitcoin transaction let's say um the fee is 5,000 satoshis nowadays if you look at transaction fee you're looking at about say um 25 uh or 30 um Satoshi per bite in order to get into a block and you're looking uh the average transaction is about 200 bytes so if you if you do that multiplication you're looking at 4 to 6,000 Satoshi in fee now four to 6,000 Satoshi is three3 to5 worth of transaction fee so to make a transaction on bitcoin you're going to pay three3 to5 doll if you're really lucky and it's a quiet and there's not much happening no chance of that right now because of um the markets being on fire uh you might get in for a fee under $2 uh but I wouldn't count on it now let's compare that to the lightning Network um on average a transaction will cost you um anywhere from about 30 Satoshi to 150 Satoshi so a lightning payment will cost you um a fraction of the cost that's 50 times cheaper than the the Bitcoin transaction so you're looking at a transaction payment fee that is measured in US cents um and and sometimes even less than a cent less than a penny per payment and that means that you can actually do micro payments you can do um a 10 cent payment on the lightning Network and it and it actually works it makes sense um because you're not spending all of your money on fees so those are the two characteristics now on lightning um because we're mostly dealing with smaller amounts uh faster cheaper payments we usually denominate things in satoshis SATs uh Satoshi being the smallest uh unit in the Bitcoin blockchain everything is denominated in Satoshi in the code at a technical level um as the famous saying goes on the Bitcoin blockchain there is no Bitcoin um there's only Satoshi so uh but uh if you don't know the conversion one Bitcoin is 100 million Satoshi so Satoshi is a very small uh unit all right so everything is denominated in satoshis but interestingly enough the lightning Network can do smaller units than Satoshi and it does so by effectively rounding up if you want to settle uh a lightning Channel because you can only transact Satoshi you can't go smaller than Satoshi on the Bitcoin network but you can on the lightning Network because essentially the lightning Network you're exchanging um sign transactions between participants um you can actually go lower and so on the lightning Network one thing you'll see that might appear surprising is you'll see a a new uh unit called msats or mil Satoshi so these are thousand of a Satoshi so you can do a 1,000th of a Satoshi payment uh if you want most wallets don't really show you that because that payment would be so small uh in equivalent Fiat value that you wouldn't see that but uh you certainly can do that on the lightning Network and fees the payment fees are actually calculated in m satoshis uh not in uh Satoshi so the lightning Network um Works through a system called payment channels and payment channels are essentially bilateral smart contracts between two participants so a participant in the lightning network is called a peer if you're running a lightning wallet or lightning node you are a peer in the lightning Network and you uh connect with payment channels to other nodes or peers um in the lightning Network and um essentially you have a channel to another node and if you want to send and receive payments you have to send them through that channel um you may have five six channels or maybe you only have one or two channels and um in order to send the payment across the lightning Network the lightning Network specifically your your client your node your wallet um will need to construct a route and the way it does so is by finding ways to connect from you to the final recipients so when the lightting network is operating normally um all of the different uh clients nodes or peers I'm using those terms interchangeably um all the different lightning nodes are advertising all the channels they have so they advertise channels uh such as okay I have a channel from Andreas to Bob uh Bob has a channel from Bob to Charlie Charlie has a channel from Charlie to Diana etc etc so each note is advertising what channels it has as well as what um payment fee will charge someone to use that channel now let's say I Andreas want to make a payment to Diana uh Diana will send me an invoice or payment request and I want to pay that on the lightning Network when I go to pay that um I will not normally I will not have a direct channel to Diana but I don't need to have a direct channel to Diana as long as there is a path that connects next channels together that can get from me to Diana and this is a bit like um uh drawing a map or getting directions on Google Maps and essentially the the software is solving a similar problem if you want to go from Barcelona to Berlin um obviously it would be very easy if there was the Barcelona to Berlin Highway uh that you basically started driving down until you reached um Berlin and you didn't have to turn or change um paths at all and there was a single connecting path and of course if there is a single directing path then you just use that um but in real life usually there isn't and so what uh Google Maps has to do to find directions or what the lightning network node has to do in order to send a payment from entas to Diana is find a path that gets the two connected and so it will look at this uh database of tens of thousands or hundreds of thousands of channels that have been advertised and it knows what the destination is and it knows what the cender is and now it needs to assemble a path that connects the two so we'll say okay well we need to get to Diana who is Diana connected to Diana is connected to these um five other nodes am I connected to any of these other five nodes no what about what nodes are they connected to and what nodes are they connected to and working backwards all the way to the beginning eventually my node is going to figure out that um because I have a path from Andreas to Bob that's one ch Channel that's the only Channel I could use and then also knows my note also knows that Bob has a channel to Charlie and Charlie has a channel to Diana my note can figure out that okay Andreas the Bob to Charlie to Diana is a route a path that can be used and then it will construct the payment along that route and send that payment across the lightning Network now if all goes well that takes a second um if sometimes the path is long um or complicated and it might take a bit longer longer to calculate that path a lightning path can be up to 20 channels long and interestingly enough because of a trick of encryption that is used um each participant in that path so for example in the Andreas Bob Charlie Diana path the participants in the middle Bob and Charlie have no idea um what the total path is and where the payment is going Bob will only know that they have been given a payment from Andreas and that they must send this payment on their channel to Charlie but they don't know if Charlie is the end recipient or if Andreas is the original sender um Bob only knows that though it came in one channel and is going out the other channel they only see one channel around them their immediate neighbors and so as far as Bob is concerned Andreas might be the sender um or Andreas might just be one more in a long path in fact um maybe uh another 10 uh other nodes might be before entr and and Bob doesn't know if Charlie is the final recipient or if maybe there's another 10 um nodes after Charlie and so this gives us a tremendous amount of privacy which we don't have in the Bitcoin Network another interesting feature of the lightning Network so this is basically the the fundamental uh working concept behind the Bitcoin lightning Network um Lobster messiah in the chat says I always enjoyed the open bar tab that eventually gets settled is a decent explanation of the lightning Network and so um that's another great way to describe it I've used that description myself and so if you think of each of the channels each of the channels is set up as a transaction on the Bitcoin blockchain you can think of that as a almost like a bar tab an open line of credit so when I have a a tab between me and Bob a channel between me and Bob uh it's like opening a bar tab where Bob is the bartender and in in a normal bar scenario you open a bar tab you basically go and say I'm going to have one drink but don't charge me yet here's my credit card or you know authorize uh $20 on this credit card and I I may have two or three drinks and at the end of the night um we're going to settle this um tab in in many cases um in in many cases around the world you'll even see scenarios where uh people keep bar tops open for uh days weeks uh months years even um and they settle periodically by making a a partial payments and then keep the tab open the entire time uh and you can do that in lightening too you can open a channel and you can do transactions back and forth along that channel you don't actually have to ever close that channel unless you want to um and as long as you have that channel you can do transactions across it what's interesting about the lightning network is that uh if you went to a a bar run by Bob and uh Andreas and Charlie were were playing darts and they placed a bet on uh the darts board um and so Andreas now owes Charlie some money um because they lost the bets right so I lost the bats and I owe Charlie $10 rather than paying Charlie directly that's opening a Channel with Charlie I can go to the bartender Bob and I say hey Bob I know I have a a $20 tab with you and I know that Charlie also has a drinks tab with you but since I now owe him some money can you take $10 off my tab and add it to Charlie's Tab and in a nutshell that's exactly how the payment channels are connected together what Bob does says well okay if I take $10 off um andreas' Tab and I add $10 to Charlie's tab my situation hasn't changed at all um instead they've effectively moved money to each other without actually moving money to each other just by changing two B bilateral agreements one between Andreas and B the bartender and one one between Charlie and B the bartender uh so that's effectively what we're doing on the lightning network uh and it's a very effective mechanism um especially since in this particular case everyone has a tab with everyone in terms of the channels and you you don't get to see if the person you're moving from one channel to another is the final recipient or the original sender all right so um it's important to realize the lightning network was uh first launched as a test Network in 2018 it was then launched as a full production Network in 2019 um um I actually have one of the uh early day pictures where um in the test Network there's there's about a 100 nodes on the lightning Network mine is one of them and you can see a picture of the entire lightning Network you can't do that anymore um because the lightning network is is very very big and because there are a number of unadvertised channels um so that we can never see the full extent or size of the lightning Network we only see the part of it that is advertised and um even though it started in 2019 we have to realize that it is still an ongoing experiment it is still an experimental Network and things can and do go wrong in terms of the feel of the lightning Network to me it feels very similar to how Bitcoin felt in 2012 and 2013 in fact Bitcoin was fast and cheap um in those days we um we would accept unconfirmed transactions because people didn't know how to do double spends uh effectively um and we would also get get away with doing transactions with zero fees uh so the Bitcoin Network in those days um was fast and cheap um because not many people were using it but in other ways it's also similar to how Bitcoin was in 2012 or 2013 in that uh things were uh a bit raw uh the user interfaces were not fully developed there was a lot of new terminology that people didn't understand well um there was a kind of a vagueness about how it worked in the background people were using it without understanding how it worked and if you start using um the lightning Network today you will get that same feel you'll notice that the the wallets and user interfaces uh are not as polishable they've gotten a lot better in the last few years um The Experience can sometimes be frustrating where you try to make a payment and it doesn't go through and you have no idea why it's not going through specifically just before we did this uh webinar um in the last couple of days I did notice that I had some uh technical problems in my um shop the anop shop which has a lightning payment uh node that accepts payments uh in lightning and for a completely unrelated reason had nothing to do with lightning but um in fact the the system it was running on had run out of disk space and I had to do some cleaning up um in order to get that running again uh and then of course when I got it running it had to spend uh a few hours sinking the chain because it had fallen behind and so it took a bit of uh housekeeping to uh get it to work um and I have I will admit uh from time to time I've had on my shop uh sometimes lots of channels uh I used to run a very big node I don't anymore uh I used to have lots of channels with lots of inbound liquidity for my shop um now I don't as much it's a it's a much smaller node I've limited it uh function for the shop and uh and so I didn't have enough inbound liquidity and actually getting a payment through was a bit of a pain but it's now working it takes a bit more work um and it's not always uh as easy so who is the lightning Network for I find that it's for a different type of payment than you might use on bitcoin and that's actually expressed in the policies of my shop infrastructure where um if you try to do a payment under $25 um it's not going to let you do that on the Bitcoin blockchain it's not going to let you do that onchain as we say um because under $25 the fees are going to be too expensive and it's going to uh it's going to leave you with an unpleasant user experience once you realize either that you have to pay a lot of fee or you don't pay sufficient fee and then your transaction gets stuck um instead if you try to make any kind of purchase on my shop under $25 it's going to default to being a lightning payment and it won't let you do a non-chain payment for that um conversely um if uh you want to do a payment uh over $25 is going to default to doing it on uh the Bitcoin blockchain uh because um doing large payments on lightning is actually more difficult than doing small payments in order to route a payments on the lightning Network you have to be able to construct a path as we said before but the path has to have sufficient capacity at every link of that path at every link of that chain in order to get the payments through and so the bigger the payment you're trying to make the more difficult it is to Route it across the lightning Network so the lightning Network really works best for small payments uh so under $10 is ideal but any anything under $25 um is where you're going to get the sweet spot right where it's too small to make on the Bitcoin blockchain without incurring a large fee uh and is just right it's perfect for doing on the lining Network all the way down to making payments for micro services or micro payments where you want to um do a one penny payment for example in order to activate a feature in a website and you can use that for anti-spam reasons right where you want to or you want to sell an article or a Blog and you want to do it for one penny per read uh so it's a micro payment uh something that doesn't really exist in other traditional Payment Systems other than if you have a fully custodial payment system uh so the ability to do micro payments is a whole Frontier that's opened up for it um and so finally you might be asking oh this all sounds great but um when and how should I try that and we tried to give you a bit of a preview of that um but if you want to try it one of the things you can do is use it on my shop to do a a very small transaction one that you wouldn't do on the normal uh Bitcoin uh blockchain and let me give you some specific information about that so um first of all we have um a digital product that is the least expensive digital product is the blockchain common smart custody book it's three bucks 50 but that's not uh inexpensive enough uh so in order to uh go even lower we've uh created a um a discount coupon code that you can use to get a 90% discount which will take the price down to 35 and so the experience of seeing a 30 5 Cent payments go through on the lightning Network really gives you a feel for uh the power uh to do this at low cost cheap and fast um and really experience the sweet spots of where the lightning network is um of course $350 is also perfectly within the sweet smot um but uh I I don't want you to think that I'm setting up this experiment in order to um uh profit from your tests I think 35 cents gives you enough enough of an experience without really um uh being a huge fundraising opportunity for us so you start questioning my motives uh so this is a coupon code for patrons only uh please do not share it outside um and that's because I want you to uh know and use it and and the coupon code is and if you put that all one word uh into the shop you get a 90% discount and then you can do a 35 cents transaction as the back end uh for the shop we use an open- Source uh project called BTC pay server and BTC pay server allows us to accept payments in Bitcoin and lightning uh as well as in in my case on my shop I've also enabled Monero uh for that but it's it's really kind of the the pure solution for uh crypto because it's open source it's non-custodial um and it's a great solution it's a bit more on the techie side setting something up like that will require you knowing how to um build um a a Linux server or um run a Docker image um and you can certainly install it um on something like a Rasberry Pi or a Mini PC and uh if you are ever interested in running a shop uh that's one thing you might want to look into uh because it integrates very nicely with platforms like WordPress and others in order to allow you to run a web shop that accepts Bitcoin and lightning payments now you don't need to know anything as the mod is pointing out uh about BTC pay server um in order to use it but if you're wondering well how does this work how is he doing this um that's how I'm doing it and and uh I'm a a sponsor and in the past I've been a contributor of uh funds not code uh I think I sent in a a bug report but uh I've been a contributor of funds to the BTC pay server project because I think it's a very valuable open source project and I agree with their philosophy and attitude hi I'm Andreas antonoplos if you enjoyed that video consider that it takes a lot of work to produce open and free content that can be shared with everyone around the world this isn't sponsored by some company it's not promoting a product or an altcoin or some kind of investment scheme my goal is simply to help explain the technology of Bitcoin and open blockchains to as many people as possible in a neutral way that focuses really on the incredible possibilities that this technology brings us if you'd like to support that mission subscribe to my channel and go on patreon.com aantonop where you can participate and help me build better content for more people thank you