What is Lightning Network?

Indice de Contenidos

  1. What is Lightning Network?
  2. Lightning Network in theory
  3. Lightning Network in practice
  4. Work yet to be done

What is Lightning Network?

Proposed in a white paper in 2016, the Lightning Network (LN) is a layer-2 solution built on top of Bitcoin. LN was created in response to scalability issues with Bitcoin, namely the speed and cost of Bitcoin transactions.

Bitcoin’s current theoretical maximum transactions per second (TPS) is 10, though in reality it is between 3 and 7. Contrast this with traditional payment processors like VISA, which handled on average 6,000 TPS in 2020 (based on VISA’s claim of 188 billion transactions a year).

Bitcoin’s transaction fees can vary wildly depending on the current demand to use the network. For instance, on April 20th 2021 average transaction fees were in excess of $50, while on August 9th 2021, the average was around $2.50. For large transactions, such as bank transfers or international remittance, Bitcoin’s speed and cost is comparable or superior to alternatives. But if Bitcoin is to be used for everyday payments (so-called micro-transactions, e.g., a cup of coffee, gas), the transaction speed must increase and transaction costs must decrease drastically.

Lightning Network in theory

To understand how LN works, and the current challenges of LN, we need to talk about Bitcoin. The limiting factor of the Bitcoin network is that every transaction must be put in a new block on chain. Since blocks are added to the chain approximately every 10 minutes, there is a hard limit to the number of transactions possible without significantly altering the Bitcoin protocol.

Read more: How do Bitcoin transactions work?

Debates on major reworkings of the Bitcoin protocol have happened before and resulted in 'hard forks,' most notably the creation of Bitcoin Cash. The Lightning Network, rather than creating a new blockchain, is a layer-2 solution. This means that it allows the Bitcoin protocol to remain relatively unchanged, but provides the benefits major reworkings could bring -- in theory, at least.

LN works by setting up a payment channel between two parties, where only the first and last transaction are put on the Bitcoin blockchain. Any number of transactions between the first and last will happen off chain, which means those transactions are not limited by the Bitcoin protocol.

To start a payment channel, both parties must commit an amount of Bitcoin. That Bitcoin is held and cannot be released as long as the payment channel remains open. The total amount of Bitcoin that can be transferred through this channel is the total amount of Bitcoin committed. Let’s look at an example to illustrate this:

Alice and Bob want to form a payment channel with each other. Alice commits 10 BTC and Bob commits 5 BTC into the payment channel. An opening transaction holding Alice and Bob’s combined 15 BTC is put onto the Bitcoin blockchain. Once that transaction has been added to the blockchain, which can take 10 minutes or more, Alice and Bob can transact an unlimited number of times at much faster speeds and effectively zero cost. Below are transactions between Alice and Bob:

  1. Alice sends Bob 1 BTC Alice: 9 BTC Bob: 6 BTC
  2. Alice sends Bob 2 BTC Alice: 7 BTC Bob: 8 BTC
  3. Bob sends Alice 3 BTC Alice: 10 BTC Bob: 5 BTC
  4. Bob sends Alice 1 BTC Alice: 11 BTC Bob: 4 BTC

When one or both wish to close the channel, a closing transaction is sent to the blockchain with the final balances of Alice and Bob. In this case, Alice’s final balance is 11 BTC and Bob’s is 4 BTC.

What if Alice wants to transact with Carol? Well, it so happens that Bob has a payment channel with Carol, so Alice transacts with Bob, and Bob passes the transaction on to Carol. Note that in this scenario, Bob might take a small payment for passing on the transaction. Over time, by the theory of six degrees of separation, LN allows Alice to transact with anyone else.

Lightning Network node mesh network Node A transacts with node Q despite only having direct payment channels with nodes C and B.

Lightning Network in practice

LN is a new protocol still in the testing phase. As such, it is faced with many challenges ranging from usability to security.

There are concerns about how easy it is to run a LN node. For LN to be successful, it requires a robust network of Bitcoin nodes running the LN protocol. Running a LN node can be quite difficult and it could be the case that there are payment incentive problems for running smaller nodes. It can be argued that running LN is not too much more difficult than running a full bitcoin node, though. However, since LN is mostly targeted at micro-transactions, the day-to-day experience with LN will be through LN-enabled wallets. LN-enabled wallets are not very user friendly, and most of these wallets caution that since they are still in public testing stages, it is advisable to not deposit too much funds. Unlike some of the more established Bitcoin wallets, the newness of these LN-enabled wallets means there are tradeoffs between custodial and non-custodial versions. The non-custodial LN wallets are harder to use -- more confusing, less straightforward. The custodial options are easier to use, but you must rely on a third-party with your Bitcoin.

Read more: Understand the difference between custodial and non-custodial wallets, and how it relates to economic freedom.

LN must also contend with competitors. As of August 2021, LN has locked up approximately 2,300 BTC. This might sound like a lot, but by comparison, Bitcoin has been locked up on Ethereum (WBTC, wrapped Bitcoin) to the tune of 250,000 BTC. Since block times on Ethereum are approximately every 14 seconds as opposed to Bitcoin’s 10 minutes, it already is much faster to transact Bitcoin via WBTC on the Ethereum network. Further, it's conceivable that Ethereum projects like ETH 2.0 and Ethereum Plasma will make the Lightning Network unnecessary and obsolete. It’s also important to remember that using WBTC brings with it all of the massive benefits of access to DeFi, which LN does not.

Lastly, and most worryingly, LN has been faced with a number of vulnerabilities. These include:

  • Griefing attacks: Funds aren’t lost, but it causes the victim's Lightning funds to be frozen so that the payment channel cannot process any transactions.
  • Flood and loot: An attacker forces many victims to claim their funds from the blockchain at the same time (flood). The attacker uses this congestion to steal funds that were unable to be claimed before the deadline (loot).
  • Time-dilation attacks: An attacker lengthens the time a victim becomes aware of new blocks by delaying block delivery.
  • Pinning attacks: An attacker tricks a victim into closing their LN channel improperly and steals individual transactions.

Work yet to be done

While LN suffers from many vulnerabilities, no one has yet to exploit them. It is likely that since the expertise required to pull off these vulnerabilities is so high, none have done it. LN developers are confident that finding these vulnerabilities will only make the network stronger - that it is a necessary phase of growth. The developers are optimistic about creating various fixes for the vulnerabilities they have found so far, though pinning attacks and time-dilation attacks will require tweaks to both LN implementations and Bitcoin Core at the same time.

The Lightning Network of today is faced with many challenges, but the protocol is still relatively young and these kinds of issues are to be expected. Lightning developers will continue to improve the protocol and hopefully will be able to solve the issues to help scale Bitcoin on layer-2.

Read more: Understand the differences between Bitcoin and Bitcoin Cash, and why Bitcoin Cash is largely serving a different use case.

For a sober 10,000 foot assessment of the Lightning Network, written by a full-time Bitcoin Core contributor nonetheless, check out Antoine Riard’s excellent post.

¿Te ha servido de ayuda??

Guías relacionadas

Empezar desde aqui →
¿Qué es Bitcoin?

Bitcoin se basa en las ideas expuestas en un documento oficial publicado en 2008 titulado Bitcoin: un sistema de dinero en efectivo electrónico Peer-to-Peer.

Lee este artículo →
Cómo comprar bitcoines

La guía esencial para comprar bitcóin.

Lee este artículo →
Cómo vender bitcoines

La guía esencial para la venta de bitcoines.

Lee este artículo →
Cómo funciona el intercambio de Bitcoin

¿Qué tan seguro es almacenar su cripto en intercambios centralizados?

Lee este artículo →
Cómo crear un monedero de Bitcoin

Crear una billetera Bitcoin es tan fácil como instalar software en su dispositivo móvil o computadora

Lee este artículo →
Cómo enviar Bitcoin

Sending bitcoin is as easy as choosing the amount to send and deciding where it goes.

Lee este artículo →
¿Cómo puedo recibir bitcoin?

Para recibir bitcoin, simplemente proporciona al remitente tu dirección. Solo tienes que asegurarte de que proporcionas la correcta

Lee este artículo →
¿Qué es un monedero de Bitcoin sin custodia?

¿Necesita una monedero con custodia o sin custodia? ¿Cómo puede proteger sus fondos?

Lee este artículo →
¿Qué es la gobernanza de Bitcoin?

¿Qué es la gobernanza de Bitcoin?

Lee este artículo →
¿Qué son las tarjetas de débito de Bitcoin?

¿Qué son las tarjetas de débito de Bitcoin?

Lee este artículo →
¿Qué es la minería de bitcóin?

El proceso de emitir nuevos bitcoines se parece en algunos aspectos al proceso de extraer metales preciosos de la tierra. Por este motivo, se lo denominado “minería de Bitcoin”.

Lee este artículo →
Cómo funcionan las operaciones con bitcóin

Lee este artículo →
Empezar desde aqui →
Comienza a invertir de forma segura a través del monedero de Bitcoin.com
Más de de carteras creadas

Todo lo que necesitas para comprar, vender, operar e invertir en bitcóin y otras criptomonedas de forma segura

Bitcoin.com en tu bandeja de entrada

Un resumen semanal de las noticias importantes, además de recursos educativos y actualizaciones de productos y servicios que promueven la libertad económica