Lightning Network: Difference between revisions
Jestopher1 (talk | contribs) m →History: added citation needed flag for atomic swaps. |
Jestopher1 (talk | contribs) →Design: Added Benefits section |
||
Line 74: | Line 74: | ||
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. |
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. |
||
===Lightning Network Benefits=== |
|||
There are several benefits to using the Lightning Network compared to on-chain transactions. |
|||
*[[Privacy]]: Individual Lightning network payments are not public and may be routed through many sequential channels. Each node operator will be able to see payments across their channels, but they will not be able to see the source or destination of those funds<ref name="MasteringBitcoin">{{cite book |last1=Antonopoulos |first1=Andreas |title=Mastering Bitcoin |date=2017-07-21 |publisher=O'Reilly |isbn=971-1-491-95438-6 |pages=297-304 |edition=2nd |accessdate=14 December 2019}}</ref>. |
|||
*[[Granularity]]: Transactions on the Lightning network allow for payments that are smaller than a satoshi, the smallest unit on the base layer of bitcoin. Routing fees on the Lightning Network are frequently denominated in millisatoshis or msat. |
|||
=== Routing === |
=== Routing === |
Revision as of 05:10, 14 December 2019
An editor has nominated this article for deletion. You are welcome to participate in the deletion discussion, which will decide whether or not to retain it. |
The Lightning Network is a "Layer 2" payment protocol that operates on top of a blockchain-based cryptocurrency (like Bitcoin). It enables fast transactions among participating nodes and has been touted as a possible solution to the Bitcoin scalability problem.[1][2] It features a peer-to-peer system for making micropayments of cryptocurrency through a network of bidirectional payment channels without delegating custody of funds.[3] Lightning Network implementation also simplifies atomic swaps[citation needed].
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 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.[4]
To perform as intended, Lightning Network required a transaction malleability fix in the Layer 1 blockchain, such as Segregated Witness (SegWit) in Bitcoin.[5][3]
The lightning network has been described as Bilateral netting by FT Alphaville.[6]
History
Initial concepts of the Lightning Network appeared in bitcoin source code released by Satoshi Nakamoto. Nakamoto included a mechanism to replace a previous transaction as an update, called nSequence[7]. The update mechanism allowed transactions to be replaced with a different transaction, but lacked incentives for miners to include an updated transaction in their mined block[8].
A solution was proposed by user "hashcoin" on a Bitcointalk forum where a series of multisignature transactions were made interdependent in a one-way payment channel. A similar concept was described and coded by Jeremy Spilman. After some design changes by Mike Hearn, Blockstream co-founder Matt Corallo coded the design into bitcoinj[8].
Joseph Poon and Thaddeus Dryja published a draft of the Lightning Network white paper in February 2015.[9][10]
In 2017 the Bitcoin community fought to stop activation of SegWit which crippled the Bitcoin network and enabled second layer networks such as the Lightning Network.[10]
In January 2018 Blockstream launched a payment processing system for web retailers. Blockstream noted that Lightning was live on the Bitcoin mainnet with 60 nodes operating as of January 18, 2018, but that it should be considered to be "in testing" at that time.[citation needed]
On March 15, 2018, Lightning Labs CEO Elizabeth Stark announced the initial release of lnd 0.4-beta
for developers, with the intent on making it available for testing purposes on the main Bitcoin network with Litecoin support. That month, Stellar CTO Jed McCaleb announced that the Stellar Network would be implementing a protocol inspired by the Lightning Network.[citation needed] The network was also endorsed by mobile payment entrepreneur Jack Dorsey.[11]
Andreas Antonopoulos has referred to the Lightning Network as a second layer routing network.[12]: ch. 8
2018 DDoS attacks
On March 20, 2018, Lightning Network nodes faced a Distributed Denial of Service (DDoS) attack that sent around 200 nodes offline, down from around 1,050 to 870. The exploit used as many node connections as possible to prevent any new connections.[13] A month earlier in February, Bitcoin Core developer Peter Todd said the Lightning protocol could very well "prove to be vulnerable to DoS [denial of service] attacks in its current incarnation."[14]
2019 Bitcoin Lightning Torch
On January 19, 2019, pseudonymous Twitter user hodlonaut began a test of the Lightning network by sending 100,000 satoshis (0.01 Bitcoin) to a trusted recipient where each recipient added 10,000 satoshis ($0.34 at the time) to send to the next trusted recipient[15][16]. The "torch" was passed 292 times before reaching the previously hard-coded limit of 4,390,000 satoshis[17]. 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 raises awareness of Bitcoin in Venezuela[18][19].
Design
The payment channels allow participants to transfer money to each other without having to make all their transactions public on the blockchain.[20][21] 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). 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."[22]
The CheckSequenceVerify (CSV) Bitcoin Improvement Proposal details how Hash Time-Locked Contracts are implemented with CSV and used in Lightning: BIP 0112.
Commitment transactions
This section possibly contains original research. (December 2019) |
If Alice and Bob have a payment channel, each of them also maintain a "latest" commitment transaction. A commitment transaction divides the funds from the funding transaction according to the correct allocation between Alice and Bob. For example, if Alice owns 1.0 mBTC (equal to 0.001 bitcoins or 100000 satoshis) and Bob owns 1.0 mBTC in the channel, the commitment transactions divide the total channel funds in that way.[citation needed]
Commitment transactions allow multiple users to participate in a single transaction (and thus act as a single entity), using a multi-key system. Determination of congestion falls primarily on the miners, so this network rests on the assumption that honest miners will not organize a 51% attack.
Since commitment transactions spend the funding transaction, they must be signed by both partners.
Commitment transactions are actually a pair of asymmetrical transactions. Alice's commitment transaction contains two outputs: one which pays Bob outright, and another which is a timelocked, revocable output that eventually pays Alice. The revocable output may be revoked by Bob if Bob knows the revocation key. Bob's commitment transaction is the reverse: it pays outright to Alice, but pays Bob's share under a timelocked, revocable output; if Alice knows the revocation key to Bob's commitment transaction, she can revoke it.[citation needed]
Initially, Alice holds the commitment transaction, and Bob holds the commitment transaction. The revocation key for , , is known by Alice, but not by Bob; the revocation key for , , is likewise known only by Bob.
Suppose Alice decides to pay Bob 0.25 mBTC (before this, each owns 1 mBTC):[citation needed]
- Alice creates a new Bob's transaction, , which allocates 0.75 mBTC to Alice and 1.25 mBTC to Bob.
- Alice signs and sends to Bob.
- Bob receives , signs it, and keeps it.
- Bob creates a new Alice's transaction, , which allocates 0.75 mBTC to Alice and 1.25 mBTC to Bob.
- Bob signs and sends to Alice.
- Alice receives , signs it, and keeps it.
- Alice provides , invalidating ; she can then delete .
- Bob provides , invalidating ; he can then delete .
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.
Lightning Network Benefits
There are several benefits to using the Lightning Network compared to on-chain transactions.
- Privacy: Individual Lightning network payments are not public and may be routed through many sequential channels. Each node operator will be able to see payments across their channels, but they will not be able to see the source or destination of those funds[23].
- Granularity: Transactions on the Lightning network allow for payments that are smaller than a satoshi, the smallest unit on the base layer of bitcoin. Routing fees on the Lightning Network are frequently denominated in millisatoshis or msat.
Routing
The original whitepaper in reference to routing suggests that "eventually, with optimizations, the network will look a lot like the correspondent banking network, or Tier-1 ISPs".
Implementations
BOLT (Basis of Lightning Technology) specifications were drafted in late 2016.[24] Several implementations were made:
- Lightning Labs' lnd implementation in Go
- Blockstream's c-lightning implementation in C
- ACINQ's eclair implementation in Scala
- A non-commercial implementation by MIT Digital Currency Initiative
Use cases
Cryptocurrency exchanges such as Bitfinex use it to enable deposits and withdrawals.[25] Laszlo Hanyecz, who gained fame in the cryptocurrency community for paying 10,000BTC for two pizzas in 2010, bought two more pizzas in 2018 using lightning and paid 0.00649BTC.[26]
References
- ^ Russo, Camila (March 15, 2018). "Technology Meant to Make Bitcoin Money Again Is Now Live". www.bloomberg.com. Retrieved 2019-12-12.
{{cite web}}
: CS1 maint: url-status (link) - ^ "MIT and Stanford Professors Are Designing a Cryptocurrency to Top Bitcoin: Unit-e". fortune.com. January 17, 2019. Retrieved 2019-12-12.
{{cite web}}
: CS1 maint: url-status (link) - ^ a b Popper, Nathaniel (August 15, 2017). "Bitcoin price surges after deal on software updates". The Boston Globe. Retrieved December 12, 2019.
- ^ Lee, Timothy B. (2018-02-04). "Bitcoin has a huge scaling problem—Lightning could be the solution". Ars Technica. Retrieved 2019-12-12.
- ^ "lightning-rfc: Lightning Network Specifications". 25 September 2017 – via GitHub.
- ^ "MIT and Stanford Professors Are Designing a Cryptocurrency to Top Bitcoin: Unit-e". FT alphaville. January 17, 2019. Retrieved 2019-12-12.
{{cite web}}
: CS1 maint: url-status (link) - ^ Nakamoto, Satoshi. "main.cpp". GitHub. Github. Retrieved 2019-12-13.
- ^ a b Van Wirdum, Aaron (2018-04-04). "The History of Lightning: From Brainstorm to Beta". Magazine. Bitcoin Magazine. Retrieved 14 December 2019.
- ^ "Lightning Network whitepaper 0.5 by Joseph Poon and Thaddeus Dryja". 28 February 2015.
- ^ a b "SegWit and the bitcoin transaction fee conspiracy theory". FT Alphaville. FT. 2018-03-21.
- ^ "Bitcoin price: What is Bitcoin lightning network - how could it cause CHAOS with BTC price". Express. 2018-07-06.
- ^ Antonopoulos, Andreas M. (April 2014). Mastering Bitcoin: Unlocking Digital Crypto-Currencies. O'Reilly Media. ISBN 978-1-4493-7404-4.
- ^ "Lightning Network DDoS Sends 20% of Nodes Down". News Article. TrustNodes. 2018-03-21.
- ^ "Bitcoin developer warns Lightning Netweork is flawed and likely bulnerable to DoS attacks". News Article. The Next Web. 2018-02-27.
- ^ "Bitcoin's 'Lightning Torch' Explained: What It Is and Why It Matters". News Article. CoinDesk. 2019-03-04.
- ^ https://twitter.com/hodlonaut/status/1086703428791865345
- ^ https://www.coindesk.com/bitcoins-lightning-torch-has-blazed-through-37-countries-so-far
- ^ https://twitter.com/btcven/status/1117082867446816768
- ^ "Lightning Torch's Bitcoin Payment Is Running a Worldwide Marathon". News Article. Yahoo! Finance. 2019-02-05.
- ^ "The Lightning Network Could Make Bitcoin Faster—and Cheaper". Wired. ISSN 1059-1028. Retrieved 2019-12-12.
- ^ "MIT, Stanford Academics Design Cryptocurrency to Better Bitcoin". Bloomberg. Retrieved 2019-12-12.
- ^ "The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments" (PDF). lightning.network. January 14, 2016.
- ^ Antonopoulos, Andreas (2017-07-21). Mastering Bitcoin (2nd ed.). O'Reilly. pp. 297–304. ISBN 971-1-491-95438-6.
{{cite book}}
:|access-date=
requires|url=
(help); Check|isbn=
value: invalid prefix (help) - ^ GitHub - lightningnetwork/lightning-rfc: Lightning Network Specifications., lightningnetwork, 2019-08-11, retrieved 2019-08-11
- ^ Kaminska, Izabella (December 5, 2019). "By Jove! Crypto has discovered netting". FT Alpha. Retrieved 2019-12-12.
{{cite web}}
: CS1 maint: url-status (link) - ^ Russo, Camila (February 27, 2018). "Crypto Legend Who Bought Pizza With 10,000 Bitcoin Is Back At It". Bloomberg. Retrieved 2019-12-12.
{{cite web}}
: CS1 maint: url-status (link)