Lightning Network: Is the way ahead for Bitcoin? [eng][esp]
ENGLISH VERSION
As we all know Bitcoin is the pioneer in the world of cryptocurrencies, however, very soon and until today several altcoins projects have been born, which in view of the limitations of Bitcoin seek to provide other types of solutions. One of the most obvious limitations are the problems of scalability, which is usually measured by the number of transactions per second that can be performed(TPS).
Per block, bitcoin supports 2048 transactions, which equates to about 7 transactions per second, as each block is processed in about 10 minutes. If we compare this with the Visa and Mastecard records, which are 24k and 5k respectively, we can see why improvements to the technology we already have are necessary. This being the case, let's move on to discuss the different points that from our point of view constitute a promising path for Bitcoin.
History
Lightning network was proposed in 2015 by Joseph Poon and Thaddeus Dryjamedio during a bitcoin seminar, then in January 2016 they published their white paper in which they make it very clear that the intention of their creation is to achieve that we can really talk about the possibility of instant payments in the bitcoin network.
In 2017 some tests were done and by 2018 it was up and running. In fact one of the interesting anecdotes of its first steps is that in 2019 an anonymous Twitter user starts an initiative called Bitcoin Lightning Torch sending 100k satoshis to a wallet, the idea was to keep making payments where each recipient would receive 10k satoshis and send 10k more. This was done, about 292 times, until reaching 0.4 $BTC that were transferred to Bitcoin Venezuela, an institution that promotes the adoption of the cryptocurrency in the country.
With this data we can affirm that lightning network is one of the current approaches that comes closest to fulfilling the promise that Satoshi Nakamoto made at the beginning with bitcoin, which is that this would be a means of transferring cash, electronically and peer to peer. And we say this with propriety because despite the promise at the beginning, the truth is that $BTC is not practical to make cash payments, not only because of the time it takes to complete a transaction (as we have already pointed out) but also because of the fee expenses it entails, in lightning network this changes completely. How does it make this possible? Let's see it in the following points, although in a very basic way and making the important caveat that it is still a technology that is in its infancy and under development.
What is Lightning Network?
First of all, we have to start from the fact that it is a layer 2 solution this means that it is a separate software that performs all operations outside the bitcoin network, although then there is a bridge that makes everything connect back to it by recording a transaction. So it is a sidechain, that is, a blockchain that runs parallel to the main blockchain which, in this case, is called the base layer or one. On the other hand, it is a very particular solution, since most of its operations are performed off-chain.
But this does not detract from the security of Bitcoin, since before starting any kind of operation, a first transaction is made on the main network that secures the funds to be committed. In fact, we find it very interesting that while what is done in bitcoin is called a transaction, in lightning network it is just a payment, but which is done as we commonly say without even needing to trust the other person, since, previously the funds have already been consigned in the blockchain.
Therefore, it takes the best of $BTC, its security, to focus on what traditional payment platforms already offer (scalability), because, since everything is done outside the chain, there is practically no limit to the transactions that can be made other than those that can be made by other factors, such as those coming from the participating nodes. This is where we can see in more detail, but still at a basic level, how it all works.
How does it work?
First of all, we have the nodes participating in the network, they send and receive payments from each other but also with the Bitcoin network. Therefore, having one's own lightning network node also requires having a bitcoin node, although it may be a lighter version of it, since the transactions made on it are mainly for payment verification. Hence, even when switching from one network to another, the fees are still low.
Once we have the nodes, each one of them can open different payment channels with whomever they wish, for which they perform the above transaction so that the channel has funds and can make their payments. The other transaction that is performed on-chain when communicating with bitcoin is when a payment channel is closed. So there are only two interactions with the blockchain, but it is in between them where the magic happens, because you can make as many transactions as you want, of course as long as there are funds.
It is also important to consider that it is not necessary to have an open channel with each and every one of the people who are going to perform a transaction, since here the network is also responsible for getting the most appropriate route for each case. On the other hand, we cannot forget that there are several Lightning Network wallets that facilitate all this work. Some of them even allow us to choose the node and/or channel to which we want to connect or establish, some of them are: moon wallet, blue wallet, eclair wallet, satoshi wallet, among others.
Hive lightning
Regarding what we have previously developed, I think it is important to highlight in this writing that in our hive blockchain there is a proposal that goes further, as it allows to communicate our HIVE tokens and / or HBD with bitcoins from the lightning network. From here it can be done and it is extremely simple to do, to send from our blockchain to Lightning we only need to scan the QR code of the wallet where we are going to send our payment.
But not only this, because we can also do the opposite operation, that is, receive bitcoin from a Ligntning wallet, which will be transformed into some of the tokens we have selected. In this way, we have a kind of bitcoin Litghtning Network wallet within Hive, which we can keep funded with our tokens, without the need to leave the network. By the way, here is the proposal to maintain this excellent initiative and promising project.
Advantages of using Lightning Network
Among so many that we can refer to, let's dwell on the following:
Cross-chain. Operations of this type (such as atomic swaps) can be performed. As we have seen that it has already been implemented in hive, it is possible to do it with other networks. In fact, it has already been done successfully, this creates new opportunities for the blockchain and cryptocurrency industry, which is noteworthy because the future points to this type of cross-chain operations.
Economics. Since transactions are done off-chain, only few transactions are on-chain , and those that are done are in themselves also quite a bit cheaper, since it is mostly, so to speak, an update of wallet balances. Hence, the number of transactions can easily exceed that of traditional payment methods, in addition to making a large number of micropayments feasible.
Speed. For the reason stated above of being off-chain, it also benefits the speed of payments. Certainly there is also its internal protocol (wire protocol), but as each payment is not signed in the base layer (bitcoin in this case) everything becomes simpler and in a much more agile way.
Privacy. This is so because the payments made are then stored in a general way, not detailed, in the main blockchain. In this way, the anonymity of each payment is preserved. This makes it still more similar to cash, which, as we said in the development of this interesting topic, is a pending promise to be fulfilled by $BTC in its origins.
Notwithstanding what we have pointed out, we cannot forget that Lightning Network is still a project in development, we can say that it is still a child, therefore, it is necessary to take into account one of the dangers that have been most noted, and it is nothing more and nothing less than that of centralization, since depending on the opening of channels and that these have funds, makes it more likely that everything revolves around the one that is best positioned in this regard.
Despite this, there are explorers of this network (one of the most popular is 1ml.com), in which we can note the number of nodes that have joined and open channels, about 17k and 75k respectively, which is a clear sign that it is a technology that is getting stronger every day and looking for increasingly useful proposals that are maintained over time.
VERSIÓN EN ESPAÑOL
Como muy bien sabemos Bitcoin es la pionera en el mundo de las criptomonedas, no obstante, muy pronto y hasta el día de hoy han nacido varios proyectos de altcoins, que ante las limitaciones de Bitcoin buscan aportar otro tipo de soluciones. Una de las limitaciones más evidentes son los problemas de escalabilidad, la cual es medida normalmente por la cantidad de transacciones que por segundo se pueden realizar(TPS).
Por bloque, bitcoin soporta 2048 transacciones, lo cual equivale alrededor de 7 transacciones por segundo, pues cada bloque se procesa en un aproximado de 10 minutos. Si comparamos esto con los registros de Visa y Mastecard que son de 24k y 5k respectivamente podemos darnos cuenta por qué es necesario las mejoras a la tecnnología que ya poseemos. Siendo así las cosas, pasemos a tratar los diferentes puntos que desde nuestro punto de vista constituye un camino promisorio para Bitcoin.
Historia
Lightning network fue propuesta en el año 2015 por Joseph Poon y Thaddeus Dryjamedio durante un seminario de bitcoin, luego en enero de 2016 publicaron su white paper en el cual dejan muy claro que la intención de su creación es lograr que realmente podamos hablar de la posibilidad de pagos instantáneos en la red de bitcoin.
En el 2017 se hicieron algunas pruebas y para 2018 ya estaba en funcionamiento. De hecho una de las anécdotas interesante de sus primeros pasos es que en 2019 un usuario anónimo de Twitter comienza una iniciativa llamada Bitcoin Lightning Torch enviando 100k satoshis a una wallet, la idea era seguir haciendo pagos donde cada receptor recibiera 10k satoshis y enviará 10k más. Así se realizó, unas 292 veces, hasta llegar a 0.4 $BTC que fueron transferidos a Bitcoin Venezuela, institución que promueve la adopción de la criptomoneda en el país.
Con este datos podemos afirmar que lightning network es uno de los planteamiento actuales que más se acerca a cumplir la promesa que Satoshi Nakamoto hiciera en un principio con bitcoin, y que es que este fuera un medio de transferencia de dinero en efectivo, de manera electrónica y peer to peer. Y esto lo decimos con propiedad porque a pesar de la promesa de un principio la verdad es que $BTC no es práctico para realizar pagos en efectivo, ya no solo por lo que dura en realizarse una transacción (como ya hemos señalado) sino también por los gastos de fee que acarrea, en lightning network esto cambia rotundamente. ¿Cómo hace posible esto? Veámoslo en los siguientes puntos, aunque sea de manera muy básica y haciendo la importante salvedad que todavía es una tecnología que está en sus inicios y en desarrollo.
¿Qué es Lightning Network?
En primer lugar, tenemos que partir del hecho de que se trata de una solución de capa 2 esto significa que es un software aparte que realiza todas las operaciones fuera de la red de bitcoin, aunque luego hay un puente que hace que todo se vuelva a conectar a ella mediante el registro de una transacción. Por eso, es una sidechain, esto es, una blockchain que corre paralela a la principal que, en este caso, se le llama la capa base o uno. Por otra parte, se trata de una solución muy particular, ya que la mayoría de sus operaciones las realiza off-chain.
Pero esto no le quita la seguridad de Bitcoin, puesto que antes de empezar cualquier tipo de operativa, se hace una primera transacción en la red principal que asegura los fondos que se van a comprometer. De hecho, nos resulta muy interesante que mientras que lo que se realiza en bitcoin se le llama transacción, en lightning network es solo un pago, pero que se realiza como comúnmente decimos sin necesidad incluso de confiar en la otra persona, pues, ya previamente los fondos han sido consignados en la blockchain.
Por eso, toma lo mejor de $BTC, su seguridad, para enfocarse en lo que ya ofrecen las plataformas de pagos tradicionales (la escalabilidad), pues, ya que todo se realiza fuera de la cadena prácticamente no hay límite de las transacciones que pueden realizar más que la puedan darse por otros factores, como las que vengan de los nodos participantes. He aquí donde podemos ver más en detalle, pero todavía a un nivel básico, cómo funciona todo.
¿Cómo funciona?
Primeramente, tenemos los nodos participantes de la red, estos envían y reciben pagos de entre sí pero también con la red de Bitcoin. Por eso, tener un propio nodo de lightning network también exige tener uno de bitcoin, aunque de este puede ser una versión más ligera, ya que las transacciones que sobre él se hacen son sobre todo de verificación de pagos. De allí que incluso cuando se hace el paso de una a otra red los fee siguen siendo económicos.
Luego que ya tenemos los nodos, cada uno de ellos puede abrir diversos canales de pago con quien desee, para ello realizan la transacción arriba señalada para que dicho canal tenga fondos y puedan realizar sus pagos. La otra transacción que se realiza on-chain al comunicarse con bitcoin es cuando se cierra un canal de pago. Así que son solo dos interacciones la que con la blockchain se tiene, pero es en el intermedio de las mismas donde sucede la magia, ya que se pueden realizar cuántas transacciones se quieran, claro siempre y cuando existan los fondos.
También es importante considerar que no es necesario que tengamos un canal abierto con todas y cada una de las personas que vayamos a realizar una operación, puesto que aquí también se hace cargo la red de conseguir la ruta más apropiada a cada caso. Por otra parte, no podemos obviar que existen diversas wallets de Lightning Network que facilitan todo este trabajo. Algunas nos permiten incluso elegir el nodo y/o canal al cual queramos conectarnos o establecer, algunas de renombre son: moon wallet, blue wallet, eclair wallet, satoshi wallet, entre otras.
Hive lightning
Al respecto de lo que hemos desarrollado previamente, me parece importante resaltar en este escrito que en nuestra blockchain de hive hay una propuesta que va más allá, ya que permite comunicar nuestros tokens de HIVE y/o HBD con bitcoins de la lightning network. Desde aquí se puede realizar y es sumamente sencillo de hacerlo, para enviar de nuestra blockchain a Lightning solo debemos escanear el código QR de la billetera donde vamos a enviar nuestro pago.
Pero no solo esto, porque también podemos hacer la operación contraria, es decir, recibir bitcoin de una billetera de Ligntning, que será transformado en algunos de los tokens que hayamos seleccionado. De esta manera, tenemos una especie de wallet de bitcoin Litghtning Network dentro de Hive, la cual podemos mantener fondeada con nuestros tokens, sin necesida de salir de la red. Por cierto, aquí está la propuesta para mantener esta excelente iniciativa y prometedor proyecto.
Ventajas de usar Lightning Network
Entre tantas que podemos hacer referencia, vamos a detenernos en las siguientes:
Cross-chain. Se pueden realizar operaciones de este tipo (como los atomic swaps). Así como hemos visto que ya se ha implementado en hive, es posible, hacerlo con otras redes. De hecho, ya se ha realizado con éxito, esto crea nuevas oportunidades a la industria de blockchain y las criptomonedas, lo cual es de resaltar porque el futuro apunta a este tipo de operaciones entre cadenas.
Economía. Ya que las operaciones se realizan off-chain, sólo pocas transaciones son on-chain , y las que se realizan son de por sí también bastante más económicas, ya que sobre todo es, por decirlo de alguna manera, una actualización de saldos de las wallets. De allí que el número de transacciones a realizar fácilemnte puede superar la de los métodos de pagos tradicionales, además de hacer factible gran cantidad de micropagos.
Rápidez. Por la razón señalada anteriormente de ser off-chain, también se beneficia la velocidad de los pagos. Ciertamente también hay su protocolo interno (wire protocol), pero como no se firma cada pago en la capa base (bitcoin en este caso) todo se hace más sencillo y de maner mucho más ágil.
Privacidad. Esto es así puesto que los pagos realizados son luego consigandos de mamenra general, no detallada, en la blockchain principal. De esta manera se guarda el anonimato de cada pago. Lo cual lo hace más semejante todaviá al dinero en efectivo que como decíamos en el desarrollo de esta interesante temática, es una promesa pendiente por cumplir de parte de $BTC en sus orígenes.
No obstante lo que hemos señalado, no podemos olvidar que Lightning Network es todavía un proyecto en desarrollo, podemos decir que todavia es un niño, por eso, es de tener en cuenta uno de los peligros que más se han hecho notar, y es nada más y nada menos que el de la centralización, pues al depender de la apertura de canales y que éstos tengan fondos, lo hace más proclive a que todo gire en torno al que mejor se posicione en este respecto.
A pesar de esto, existen los exploradores de esta red (uno de los más pulares es 1ml.com), en los cuáles podemos notar la cantidad de nodos que se han unido y canales abiertos , alrededor de 16k y 75k respectivamente, lo cual es un signo evidetne de que está siendo una tecnología que se está fortaleceindo cada día más y buscando propuestas cada vez más útiles y que semantengan a través dle tiempo.