Lightning Network

Last updated
Example ACFKLQ routing through an idealized mesh network of payment channels. 17 node mesh network.svg
Example ACFKLQ routing through an idealized mesh network of payment channels.

The Lightning Network (LN) is a "layer 2" payment protocol designed to be layered on top of a blockchain-based cryptocurrency such as bitcoin or litecoin. [1] It is intended to enable fast transactions among participating nodes and has been proposed as a solution to the bitcoin scalability problem. [2] [3] It features a peer-to-peer system for making micropayments of cryptocurrency through a network of bidirectional payment channels without delegating custody of funds. [4]

Contents

Normal use of the Lightning Network consists of opening a payment channel by committing a funding transaction to the relevant base blockchain (layer 1), followed by making any number of Lightning Network transactions that update the tentative distribution of the channel's funds without broadcasting those to the blockchain, optionally followed by closing the payment channel by broadcasting the final version of the settlement transaction to distribute the channel's funds. [5]

To settle the payments the channel must be closed. To initiate this process one node broadcasts the most up to date settlement transaction to the network. The next events can broadly be thought of in two ways, a cooperative closure in which both parties confirm a distribution and funds are immediately settled and an uncooperative closure. Uncooperative closes may be legitimate for example if one node is no longer part of the network or fraudulent with one node broadcasting an incorrect distribution (likely an outdated one). In uncooperative closures the funds are not settled instantly but there is a dispute period within which nodes may contest the broadcast distribution. If the second node broadcasts a more up to date distribution then the funds are transferred entirely to them. This punitive act, known as the breach remedy transaction, prevents nodes from attempting to defraud the network by broadcasting out of date transactions.

History

Joseph Poon and Thaddeus Dryja published a draft of the Lightning Network white paper in February 2015. [6]

Lightning Network has been endorsed by mobile payment entrepreneur Jack Dorsey. [7]

2019 bitcoin lightning torch

On January 19, 2019, pseudonymous Twitter user hodlonaut began a game-like promotional test of the Lightning Network by sending 100,000 satoshis (0.001 bitcoin) to a trusted recipient where each recipient added 10,000 satoshis ($0.34 at the time) to send to the next trusted recipient. The "lightning torch" payment reached notable personalities including Twitter CEO Jack Dorsey, Lightning Labs CEO Elizabeth Stark, and Binance CEO "CZ" Changpeng Zhao, among others. [8] [9] The lightning torch was passed 292 times before reaching the formerly hard-coded limit of 4,390,000 satoshis. The final payment of the lightning torch was sent on April 13, 2019 as a donation of 4,290,000 satoshis ($217.78 at the time) to Bitcoin Venezuela, a non-profit that promotes bitcoin in Venezuela.

2021 adoption in El Salvador

In June 2021, the Legislative Assembly of El Salvador voted legislation to make Bitcoin legal tender in El Salvador. [10] [11] [12] The decision was based on the success of the Bitcoin Beach ecosystem in El Zonte that used a LN based wallet. The government has introduced a wallet utilising the Lightning Network protocol while giving the freedom for citizens to use other Bitcoin Lightning wallets. [13]

Design

A Lightning Network overview

Andreas Antonopoulos has referred to the Lightning Network as a second layer routing network. [14] The payment channels allow participants to transfer money to each other without having to make all their transactions public on the blockchain. [15] [16] This is done by penalizing uncooperative participants. When opening a channel, participants must commit an amount (in a funding transaction, which is on the blockchain). [17] Time-based script extensions like CheckSequenceVerify and CheckLockTimeVerify make the penalties possible.

"If we presume a large network of channels on the Bitcoin blockchain, and all Bitcoin users are participating on this graph by having at least one channel open on the Bitcoin blockchain, it is possible to create a near-infinite amount of transactions inside this network. The only transactions that are broadcast on the Bitcoin blockchain prematurely are with uncooperative channel counterparties." [18]

The CheckSequenceVerify (CSV) Bitcoin Improvement Proposal details how Hash Time-Locked Contracts are implemented with CSV and used in Lightning: BIP 0112.

Benefits

There are several claimed future benefits to using the Lightning Network compared to on-chain transactions:

Limitations

The Lightning Network is made up of bidirectional payment channels between two nodes which combined create smart contracts. If at any time either party drops the channel, the channel will close and be settled on the blockchain.

Due to the nature of the Lightning Network's dispute mechanism, which requires all users to watch the blockchain constantly for fraud, the concept of a "watchtower" has been developed, where trust can be outsourced to watchtower nodes to monitor for fraud.

Routing

In the event that a bi-directional payment channel is not open between the transacting parties, the payment must be routed through the network. This is done using an onion routing technique similar to Tor, and it requires that the sender and receiver of the payment have enough established peers in common to find a path for the payment. In effect, a simple route would look like this:

The original whitepaper in reference to routing suggests that "eventually, with optimizations, the network will look a lot like Tier-1 ISPs".

Implementations

BOLT (Basis of Lightning Technology) specifications were drafted in late 2016. [20] Several implementations were made:

Use cases

Cryptocurrency exchanges such as Bitfinex use it to enable deposits and withdrawals. [22] Laszlo Hanyecz, who gained fame in the cryptocurrency community for paying 10,000 BTC for two pizzas in 2010, bought two more pizzas in 2018 using Lightning Network and paid 0.00649 BTC. [23]

Zion, [24] The Bitcoin Social Network, [25] utilizes the Lightning Network running LND [1] to send content peer-to-peer through channels.

Wallets

Related Research Articles

Digital currency Currency stored on electronic systems

Digital currency is any currency, money, or money-like asset that is primarily managed, stored or exchanged on digital computer systems, especially over the internet. Types of digital currencies include cryptocurrency, virtual currency and central bank digital currency. Digital currency may be recorded on a distributed database on the internet, a centralized electronic computer database owned by a company or bank, within digital files or even on a stored-value card.

Bitcoin () is a decentralized digital currency, without a central bank or single administrator, that can be sent from user to user on the peer-to-peer bitcoin network without the need for intermediaries. Transactions are verified by network nodes through cryptography and recorded in a public distributed ledger called a blockchain. The cryptocurrency was invented in 2008 by an unknown person or group of people using the name Satoshi Nakamoto. The currency began use in 2009 when its implementation was released as open-source software.

Cryptocurrency Encrypted medium of digital exchange

A cryptocurrency, crypto-currency, or crypto is a binary data designed to work as a medium of exchange wherein individual coin ownership records are stored in a ledger existing in a form of a computerized database using strong cryptography to secure transaction records, to control the creation of additional coins, and to verify the transfer of coin ownership. Some crypto schemes use validators to maintain the cryptocurrency. In a proof-of-stake model, owners put up their tokens as collateral. In return, they get authority over the token in proportion to the amount they stake. Generally, these token stakers get additional ownership in the token over time via network fees, newly minted tokens or other such reward mechanisms. Cryptocurrency does not exist in physical form and is typically not issued by a central authority. Cryptocurrencies typically use decentralized control as opposed to a central bank digital currency (CBDC). When a cryptocurrency is minted or created prior to issuance or issued by a single issuer, it is generally considered centralized. When implemented with decentralized control, each cryptocurrency works through distributed ledger technology, typically a blockchain, that serves as a public financial transaction database.

Bitcoin network Peer-to-peer network that processes and records bitcoin transactions

The bitcoin network is a peer-to-peer payment network that operates on a cryptographic protocol. Users send and receive bitcoins, the units of currency, by broadcasting digitally signed messages to the network using bitcoin cryptocurrency wallet software. Transactions are recorded into a distributed, replicated public database known as the blockchain, with consensus achieved by a proof-of-work system called mining. Satoshi Nakamoto, the designer of bitcoin, claimed that design and coding of bitcoin began in 2007. The project was released in 2009 as open source software.

History of bitcoin History of Bitcoin, a cryptocurrency

Bitcoin is a cryptocurrency, a digital asset designed to work as a medium of exchange that uses cryptography to control its creation and management, rather than relying on central authorities. The history of bitcoin started with the invention and was implemented by the presumed pseudonymous Satoshi Nakamoto, who integrated many existing ideas from the cypherpunk community. Over the course of bitcoin's history, it has undergone rapid growth to become a significant currency both on- and offline. From the mid 2010s, some businesses began accepting bitcoin in addition to traditional currencies.

Blockchain.com is a cryptocurrency financial services company. The company began as the first Bitcoin blockchain explorer in 2011 and later created a cryptocurrency wallet that accounted for 28% of bitcoin transactions between 2012 and 2020. It also operates a cryptocurrency exchange and provides institutional markets lending business and data, charts, and analytics.

Blockchain Distributed data store for digital transactions

A blockchain is a growing list of records, called blocks, that are linked together using cryptography. It's also described as a "trustless and fully decentralized peer-to-peer immutable data storage" that is spread over a network of participants often referred to as nodes. Each block contains a cryptographic hash of the previous block, a timestamp, and transaction data. The timestamp proves that the transaction data existed when the block was published in order to get into its hash. As blocks each contain information about the block previous to it, they form a chain, with each additional block reinforcing the ones before it. Therefore, blockchains are resistant to modification of their data because once recorded, the data in any given block cannot be altered retroactively without altering all subsequent blocks.

Monero is a decentralized cryptocurrency. It uses a public distributed ledger with privacy-enhancing technologies that obfuscate transactions to achieve anonymity and fungibility. Observers cannot decipher addresses trading monero, transaction amounts, address balances, or transaction histories.

Blockstream

Blockstream is a blockchain technology company led by co-founder Adam Back, headquartered in Victoria, Canada, with offices and staff worldwide. The company develops a range of products and services for the storage and transfer of Bitcoin and other digital assets.

Ethereum Classic Open source blockchain computing platform

Ethereum Classic is an open source, blockchain-based distributed computing platform featuring smart contract (scripting) functionality. It supports a modified version of Nakamoto consensus via transaction-based state transitions executed on a public Ethereum Virtual Machine (EVM).

Firo (cryptocurrency) Cryptocurrency

Firo, formerly known as Zcoin, is a cryptocurrency aimed at using cryptography to provide better privacy for its users compared to other cryptocurrencies such as Bitcoin.

Bitcoin scalability problem Scaling problem in bitcoin processing

The Bitcoin scalability problem refers to the limited capability of the Bitcoin network to handle large amounts of transaction data on its platform in a short span of time. It is related to the fact that records in the Bitcoin blockchain are limited in size and frequency.

Bitcoin Cash Cryptocurrency that is a fork of Bitcoin

Bitcoin Cash is a cryptocurrency that is a fork of Bitcoin. Bitcoin Cash is a spin-off or altcoin that was created in 2017.

A cryptocurrency wallet is a device, physical medium, program or a service which stores the public and/or private keys for cryptocurrency transactions. In addition to this basic function of storing the keys, a cryptocurrency wallet more often also offers the functionality of encrypting and/or signing information. Signing can for example result in executing a smart contract, a cryptocurrency transaction, identification or legally signing a 'document'.

In blockchain, a fork is defined variously as:

Cryptocurrency and crime describes notable examples of cybercrime related to theft of cryptocurrencies and some of the methods or security vulnerabilities commonly exploited. Some of the these tactics include phishing, scamming, supply chain attacks, and general computer hacking. In extreme cases even a computer which is not connected to any network can be hacked.

IOTA (technology) Open-source distributed ledger and cryptocurrency

IOTA is an open-source distributed ledger and cryptocurrency designed for the Internet of things (IoT). It uses a directed acyclic graph to store transactions on its ledger, motivated by a potentially higher scalability over blockchain based distributed ledgers. IOTA does not use miners to validate transactions, instead, nodes that issue a new transaction on the network must approve two previous transactions. Transactions can therefore be issued without fees, facilitating microtransactions. The network currently achieves consensus through a coordinator node, operated by the IOTA Foundation. As the coordinator is a single point of failure, the network is currently centralized.

A blockchain is a shared database that records transactions between two parties in an immutable ledger. Blockchains document and confirm pseudonymous ownership of all existing coins within a cryptocurrency ecosystem at any given time through cryptography. After a transaction is validated and cryptographically verified by other participants or nodes in the network, it is made into a "block" on the blockchain. A block contains information about the time the transaction occurred, previous transactions, and details about the transaction. Once recorded as a block, transactions are ordered chronologically and cannot be altered. This technology rose to popularity after the creation of Bitcoin, the first application of blockchain technology, which has since catalyzed other cryptocurrencies and applications.

Nano (NANO) is a peer-to-peer digital currency. It is a decentralized, open-source cryptocurrency based on directed acyclic graph (DAG) architecture with an Open Representative Voting (ORV) consensus mechanism. It operates without intermediaries by using a distributed ledger with a block-lattice data structure.

References

  1. 1 2 "lightningnetwork/lnd". GitHub. Retrieved 2021-05-04.
  2. Russo, Camila (March 15, 2018). "Technology Meant to Make Bitcoin Money Again Is Now Live". www.bloomberg.com. Retrieved 2019-12-12.
  3. "MIT and Stanford Professors Are Designing a Cryptocurrency to Top Bitcoin: Unit-e". fortune.com. January 17, 2019. Retrieved 2019-12-12.
  4. Popper, Nathaniel (August 15, 2017). "Bitcoin price surges after deal on software updates". The Boston Globe. Retrieved December 12, 2019.
  5. Lee, Timothy B. (2018-02-04). "Bitcoin has a huge scaling problem—Lightning could be the solution". Ars Technica. Retrieved 2019-12-12.
  6. "Lightning Network whitepaper 0.5 by Joseph Poon and Thaddeus Dryja". 28 February 2015. Archived from the original on 2015-02-28.
  7. "Bitcoin price: What is Bitcoin lightning network - how could it cause CHAOS with BTC price". Express. 2018-07-06.
  8. Browne, Ryan (6 February 2019). "Jack Dorsey says the 'only' cryptocurrency he owns is bitcoin". CNBC. Retrieved 17 December 2019.
  9. Hackett, Robert; Roberts, Jeff John; Wieczner, Jen. "The Ledger: Cryptocurrency Custody, QuadrigaCX Quagmire, CEOs Pass Bitcoin 'Torch'". Fortune. Fortune Magazine. Retrieved 17 December 2019.
  10. Aleman, Marcos (9 June 2021). "El Salvador makes Bitcoin legal tender". Associated Press. Retrieved 16 June 2021.
  11. "El Salvador aprueba el uso de Bitcoin como moneda de intercambio". Agencia EFE (in Spanish). 9 June 2021. Retrieved 16 June 2021.
  12. "El Salvador first country to approve bitcoin as legal tender". Agence France Presse. 9 June 2021. Retrieved 16 June 2021.
  13. @nayibbukele (28 June 2021). "Aclarando la desinformación que están..." (Tweet) via Twitter.
  14. 1 2 3 4 5 Antonopoulos, Andreas (2017-07-21). Mastering Bitcoin (2nd ed.). O'Reilly. pp. 297–304. ISBN   978-1491954386.
  15. "The Lightning Network Could Make Bitcoin Faster—and Cheaper". Wired. ISSN   1059-1028 . Retrieved 2019-12-12.
  16. "MIT, Stanford Academics Design Cryptocurrency to Better Bitcoin". Bloomberg. Retrieved 2019-12-12.
  17. Burchert, Conrad; Decker, Christian; Wattenhofer, Roger (August 29, 2018). "Scalable Funding of Bitcoin Micropayment Channel Networks" (PDF). Royal Society Open Science. 5 (8): 180089. Bibcode:2018RSOS....580089B. doi:10.1098/rsos.180089. PMC   6124062 . PMID   30225004 . Retrieved 17 December 2019.
  18. "The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments" (PDF). lightning.network. January 14, 2016.
  19. Ajiboye, Timi; Buenaventura, Luis; Gladstein, Alex; Liu, Lily; Lloyd, Alexander; Machado, Alejandro; Song, Jimmy; Vranova, Alena (2019-08-14). The little bitcoin book : why bitcoin matters for your freedom, finances, and future. Redwood City, CA: 21 Million Books. ISBN   978-1-64199-050-9.
  20. GitHub - lightningnetwork/lightning-rfc: Lightning Network Specifications., lightningnetwork, 2019-08-11, retrieved 2019-08-11
  21. WhitepaperXSN (PDF), 2019-06-01
  22. "Why Bitfinex supports the Lightning Network". Bitfinex.com.
  23. Russo, Camila (February 27, 2018). "Crypto Legend Who Bought Pizza With 10,000 Bitcoin Is Back At It". Bloomberg. Retrieved 2019-12-12.
  24. "Zion". GitHub. Retrieved 2021-09-09.
  25. "Zion". getzion.com. Retrieved 2021-09-09.
  26. "Self-custodial wallet for bitcoin and lightning".