{"id":8010,"date":"2022-09-26T18:44:16","date_gmt":"2022-09-26T18:44:16","guid":{"rendered":"https:\/\/mdr.foobrdigital.com\/?p=8010"},"modified":"2022-09-26T18:44:16","modified_gmt":"2022-09-26T18:44:16","slug":"illustrating-lightning-by-example","status":"publish","type":"post","link":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/2022\/09\/26\/illustrating-lightning-by-example\/","title":{"rendered":"Illustrating Lightning By Example"},"content":{"rendered":"\n<p>We can illustrate the Lightning Network through a simple example. Bob wants to buy a coffee from a cafe. Bob opens a payment channel with the Cafe and deposits some BTC to create a balance sheet between them.&nbsp;<\/p>\n\n\n\n<p>When Bob buys a coffee the Cafe issues an Invoice via QR code which Bob pay through this Lightning Wallet on his phone.<br><br>The balance sheet between Bob\/The Cafe gets updated; with every coffee Bob buys the relevant amount of BTC gets subtracted from Bob&#8217;s balance, added to the coffee shop&#8217;s balance.&nbsp;<\/p>\n\n\n\n<p>Both parties sign each updated balance sheet with their unique signature key. All this happens instantly, solving the issue of slow on-chain confirmations.<\/p>\n\n\n\n<p>To close the payment channel and release the funds, either party can broadcast the latest agreed balance sheet to the Bitcoin main-chain network and get the transactions verified by Bitcoin&#8217;s consensus mechanism.&nbsp;<\/p>\n\n\n\n<ul><li>The Cafe will then receive the proceeds of Bob&#8217;s coffee purchases<\/li><li>Bob will retain any unspent balance<\/li><\/ul>\n\n\n\n<p>Thus we can see how the Lightning Network significantly reduces the transactional load on the bitcoin blockchain. Thousands of transactions can occur within the micropayment channels between two parties.&nbsp;<\/p>\n\n\n\n<p>Only two transactions have to be processed by the blockchain &#8211; the micropayment channel&#8217;s (balance sheet) opening and closing.&nbsp;<\/p>\n\n\n\n<p>The Lightning Network structure is designed to connect individual users through micropayment channels in the most efficient way possible. Therefore, it isn\u2019t unnecessary to open a payment channel with every individual actor you want to use.&nbsp;<\/p>\n\n\n\n<p>A may only know B, but if B knows C, then A can connect to C via B acting as a kind of router or hub.<\/p>\n\n\n\n<p>All of this not only means faster transactions &#8211; some estimates put the upper limits of lightning network capability at nearly 1 million transactions per second &#8211; it also means lower transaction costs. The fewer transactions that have to be processed by bitcoin&#8217;s consensus mechanisms, the fewer fees have to be paid.&nbsp;<\/p>\n\n\n\n<p>The hope is that as the Lightning Network expands and the UX of wallets improves, you\u2019ll be able to use just a few taps to buy a coffee by opening a channel with a coffee shop and scanning a QR code.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We can illustrate the Lightning Network through a simple example. Bob wants to buy a coffee from a cafe. Bob opens a payment channel with the Cafe and deposits some BTC to create a balance sheet between them.&nbsp; When Bob buys a coffee the Cafe issues an Invoice via QR code which Bob pay through [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[545],"tags":[],"_links":{"self":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/8010"}],"collection":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/comments?post=8010"}],"version-history":[{"count":0,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/8010\/revisions"}],"wp:attachment":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/media?parent=8010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/categories?post=8010"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/tags?post=8010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}