Network scalability has been a hot topic of discussion in the bitcoin community over the last couple of years, and there are many different solutions in the works from a variety of bitcoin developers and sub-communities.
The Bitcoin network transaction limit is very low right now and it can currently handle only a handful of transactions per second. That is in comparison to classic payment providers like VISA ridiculously low. For a global network with potentially billions of users, Bitcoin needs a drastic increase in the number of possible transactions per second. One of the most promising solutions in this scaling debate is the Lightning Network.
What you'll learn 👉
A “Game-Changing Innovation”
Lets start by defining the purpose of lightning:
The Lightning Network is a decentralized system for instant, high-volume micropayments that removes the risk of delegating custody of funds to trusted third parties.
lightning proposes to solve the blockchain scalability problem by using trustless peer-to-peer payment channels, with transactions within those channels happening instantly and off the blockchain.
When two users open a payment channel together, they create a new 2-of-2 multisig address. As they are funding it, they also create an exit transaction for each user. The exit transactions can be activated unilaterally.
So opening a payment channel requires writing on the blockchain to protect against double-spend. First you establish a refund from the funding transaction, then you broadcast the funding transaction which needs to be mined into the blockchain before payments can be made in the channel securely.
One on-chain (blockchain) transaction is needed to open a channel, and another on-chain transaction can close the channel. Fees are paid to the miners on these first and last transactions only.
Once a channel is open, value can be transferred instantly between counterparties, who are exchanging real bitcoin transactions, but without broadcasting them to the bitcoin network. To update the balances in the channel consent of both parties is required.
Should a user wish to close a connection, the smart-contract can be executed on the Blockchain as a regular transaction. So, when the channel is closed by both parties, the accounts “settle up” with the Bitcoin blockchain.
So, the Lightning Network system utilizes bidirectional payment channels that consist of multi-signature addresses.
How can people not double spend the same coins?
The transactions require both parties to be actively participating in updating the smart contracts that keep the channel alive. If one party fails to respond, they are essentially in violation of the smart contract, and are forfeiting their claim to any of the funds in the channel.
Penalizing unresponsive nodes is a feature of the lightning network, intended to keep it functional. By leaving the channel unattended, one party is doing a disservice to the other. Making that behavior financially disastrous is what makes the system work in the first place.
Users will need to run software that is actively monitoring the blockchain for contract breaches (broadcasting of an obsolete transaction)
However, it will be possible to outsource this monitoring to a third party.
Outsourcing will not affect your privacy, but you must trust the service to actually do its job.
How are paths found in Lightning Network?
The currently suggested routing would be similar to the Border Gateway Protocol. The suggestion so far was to use beacon nodes that are periodically selected by a pseudo-random process.
Altogether, “shortest” path would be some combination of reachable, sufficient liquidity, lowest fee, fewest hops, and most reliable.
What Resources Does It Take to Run a Lightning Node?
A (pruned) full bitcoin node, for now. Using a full bitcoin node is always going to be the safest and most private option (and more full nodes are good for everyone else, too!), but light nodes are possible with some caveats, some of which can be removed by further extensions to the lightning protocol.
How will the lightning network handle lightweight clients?
Most steps during the payment process in an LN channel don’t actually require full knowledge of the blockchain or even the unconfirmed (mempool) transactions. This is because the transactions involved deal with 2-of-2 multisig scripts, where both parties have to sign off on each transaction to make it valid, so they both can stay aware of all transactions made relevant to the channel they share without monitoring the blockchain.
Privacy is a frequently overseen feature of LN
And it has been a major focus while working out the protocol. Currently, Lightning payments are routed in a similar fashion as Tor traffic, meaning that only the endpoints of the transaction, sender and receiver, know what is going on and all the middlemen have no idea. They just forward the package having no knowledge about the sender and the receiver of the payment they are helping to facilitate.
Is centralization in the Lightning network inevitable? Why (not)?
Tiny payments are possible: since fees are proportional to the payment amount, you can pay a fraction of a cent; accounting is even done in thousandths of a satoshi.
Payments are settled instantly: the money is sent in the time it takes to cross the network to your destination and back, typically a fraction of a second.
Peer failures: if one of your peers is unresponsive, you might have to wait for hours to close that channel spend your funds.
No Offline Payments: you can’t pay someone who is not online
Terrible for large payments: If there is a route, but it doesn’t have capacity to transfer the amount you want, you can’t use it.
Can LN be run on other cryptocurrencies?
You can run lightning Network on top of Ethereum, you can run lightning Network on top of any cryptocurrency that enables the three basic primitives: checking hashes; Multi signature contracts and lock time time-based controls.
Lightning Network scaling alternatives?
The obvious one would be side chains, the idea being that the transactions on the side chain would be off the main chain.
Most other scaling solutions are either on-chain or centralized. For example, segwit and block size increases are on-chain and using a service like coinbase to move coins off-chain are clearly centralized.
How secure is Lightnining Network?
The security in a Lightning Network is extracted from the underlying Bitcoin Network.
A Lightning Network cannot operate on its own; it is completely dependent on the underlying bitcoin network for security. If something goes wrong in a Lightning channel (like your counterparty going offline) you will always have the option to fall into the safety-net which is bitcoin network and blockchain.
Lightning is neither a soft-fork nor a hard-fork.
Instead, the Lightning Network builds an additional layer on top of the bitcoin network.
Implementation is therefore independent from consensus.
Lightning allows you to lock coins between two wallets, and then send special transactions between each wallet which only become “real” when they are added to the blockchain. But you don’t do that, because on-chain costs you more fees, so you keep updating the transactions between each other.
Lightning not only makes it possible to send transactions off-chain from A to B, but also from A to B to C etc. Which would make it possible to create one big network, where most transactions happen off chain, you don’t need to trust anyone and where all transactions are instantaneous.
CaptainAltcoin's writers and guest post authors may or may not have a vested interest in any of the mentioned projects and businesses. None of the content on CaptainAltcoin is investment advice nor is it a replacement for advice from a certified financial planner. The views expressed in this article are those of the author and do not necessarily reflect the official policy or position of CaptainAltcoin.com