The time and fees for every payment we made may vary a lot, depending on several factors. The distance, the amount, the requirements, the companies involved; all of it can delay payments and/or make them more expensive. We assume this doesn’t happen usually with cryptocurrencies, and that’s right —most of the time. But Bitcoin is the first decentralized digital currency. It was created in 2009, by an anonymous founder or group of founders... (An abbreviation for Bitcoin.), for example, can be kind of slow and expensive too, sometimes. That’s why the Lightning Network (LN).
Lightning Network is a decentralized system specifically designed to make private micropayments out of the main Bitcoin (and Litecoin) blockchain(s). That goal is reached through secure and shared channels started by the parties involved. The channels only need to touch the blockchain once opened and closed: in the middle, the parties can exchange funds freely, without waiting times and almost without fees.
So, for example, Alice and Bob can agree to open an LN channel anytime with a certain amount of funds to exchange between them (or their friends with LN nodes). They can set an “expiration date”, and make commitment transactions while the channel is open —it can be an hour, a day, a month, a year, etc. When they agree to do so, they’ll close the channel (and register it on the Blockchain is a type of database storing an immutable set of data, verifiable to anyone with access to it —through..., making it irrevocable) with the final balances for each party.
Why is it necessary the Lightning Network?
Currently, the average Bitcoin To reward miners or validators for the work of ordering transactions and verifying blocks, a certain cost must be paid... More is $1.6, no matter the amount transacted. However, it’s not always like that: it may vary according to the state of the chain. In April 21, 2021, for example, the fee was up to $62.7 per A cryptocurrency transaction is an entry on the blockchain ledger, noting sender, receiver and number of coins transacted. More [BitInfoCharts]. That’s something crazy if you want to pay for a three-dollar coffee with BTC or donate a small tip to your favorite online creator.
The waiting time for every transaction is also an issue, sometimes. To send coins across different wallets, it’s necessary to wait between 30 minutes to 60 minutes per transaction. That’s the time it takes for several miners to create and validate a new A collection of cryptocurrency transactions. Every few minutes (or seconds, depending on the blockchain) one miner or validator verifies the... More on the blockchain —the system that supports cryptocurrencies.
To consider a BTC transaction fully valid and irreversible, we need to wait for, at least, three In Bitcoin and other cryptocurrencies, a transaction is confirmed (valid) when it’s included in a block. Each new block adds... More by miners. This happens in the time we mentioned above. Litecoin (LTC) is a little bit quicker, but it also needs some time. And also takes some fees.
That’s why Joseph Poon and Thaddeus Dryja proposed the Lightning Network in 2016. By using this system, the parties can avoid high fees and waiting times; and just transact instantly between them in private.
How does the Lightning Network work?
We’ll try to not make it complicated, because, in the practice, it’s not. But, behind the curtains of a nice app on your phone, the instant payment can be completed thanks to a couple of things: a Also “multisig”. While normal crypto wallets need only one private key to make a transaction, multisig wallets need keys from... More An address is a blockchain equivalent to a bank account number in the traditional financial system, or an email address.... and a A hash is a mathematical function that turns a set of data into a short string of random numbers and... More Timelock Contract (HTLC). To put it clearly, the channels we mentioned before use, indeed, multi-signature addresses. This implies that the parties involved will have the same power over the funds, and they’ll need to sign every transaction —which is great to avoid misbehaviors.
For its part, the HTLC assures that every party has a key to sign the funds, and also locks the funds while the channel is open. So, if one party wants to close the channel (sending it to the main chain) with a favorable (but fake) balance on their side, then they’ll have to wait until this special contract let it do so —within 72 hours, for example.
During this locked time, the other party can seize all the funds if the final balances of the channel are wrong. And they have the right to keep all the coins for them since the other party cheated. That’s the punishment for the bad actor.
An LN channel can be used by several parties as well. This way, for example, if Alice has a shared channel with Bob, and Diane has a shared channel with Alice but not with Bob; Diane can still send funds to Bob by using the route provided by Alice. That’s why it’s a “network”. Usually, the users might only share an “LN route” provided by a wallet, and that’s it.
How to use the Lightning Network?
The first thing you’ll need is to install a A crypto wallet is a user-friendly software or hardware used to manage private keys. There are software wallets for desktop... More or an LN A blockchain node is a server that downloads the history of transactions and shares it with other nodes in the... More. Of course, the wallet option is far easier than the node, which comes with detailed instructions on GitHub (a platform for developers). Lightning by Blockstream, Lightning Network Daemon by Lightning Labs, and Eclair by ACINQ are popular node implementations. We can’t recommend these options if you have little informatics knowledge.
On the other hand, we also have friendly wallets, ready to download and use. Available for desktop and mobile, we have options like Zap, Blue Wallet, Muun, Wallet of Satoshi, Electrum, or Breez. All of them have their own features and fees, with some of them charging between 0.4% to 1% on channel creations.
Another factor to consider is the decentralization of your funds. Some of these wallets (Blue Wallet and Wallet of Satoshi) are custodial, which means they guard your funds for you, and you don’t have complete control of them. The others are non-custodial wallets: you’ll always keep your private keys, therefore, full control of your funds. At least, almost all the time.
Certain features on these wallets may need you to trust the funds temporarily to the company behind the software. For example, Muun has the “Turbo Channels” available. They’re instant LN channels provided by Muun to offer liquidity and usability. As they describe:
“When transactions require the use of turbo channels, there is a limited window of time where you trust Muun. Specifically, during that window of time, you trust Muun will not execute a – very public! – double-spend attack. If you are not okay with this, you should disable turbo channels. You do need to know, however, that turbo channels allow all payments to settle instantly and make your money available to spend immediately.”
Making an LN transaction
To make the process more illustrative, we can make an LN transaction on the Muun wallet. The first step is, of course, to download the app from the App Store or Google Play. Then it comes the usual for every wallet: set up a PIN and back up your funds on “Security”. Once finished, it’s time to deposit some satoshis.
Tap on “Receive”, and you’ll have two options: send coins from an on-chain (traditional) Bitcoin wallet or exchange, or send the coins via Lightning Network —if you already have another LN wallet or if a friend with an LN wallet wants to send you funds. The second option isn’t that hard. You’ll only need to scan a A graphical representation of a public or private key. Scanning QR codes is a simple way to share keys between... More or copy (and share) the Lightning Invoice address.
There’s a menu to set the amount and valid time of your invoice (LN channel). The other party (or yourself) must do the opposite from their wallet: tap on “Send” and paste (or scan) the address or LN Invoice provided by the first wallet. Next, set the amount or choose “Use all funds”, add a note, and confirm the transaction.
Finally, voilá! Instant micropayment, almost for free. In this case, the Turbo Channel enabled by Muun will last almost 24h, which means that the transaction will be engraved on the blockchain later. But you still can send your new coins as you please. Enjoy Lightning Network!
Wanna trade BTC, LTC, and other tokens? You can do it safely on Alfacash! We’re talking about this and a lot of other things on our social media.