Getting Started Series 14 - What is the Lightning Network?steemCreated with Sketch.

in CryptoDog5 years ago (edited)

image.png
Simply put, the Lightning Network is a second-layer payment protocol built on the Bitcoin network to solve the problem of Bitcoin network congestion. The idea is to open a "green channel" outside the blockchain, and conduct a large number of high-frequency and small transactions outside the blockchain.

image.png

In this way, both parties to the transaction can conduct multiple, high-frequency, two-way, and peer-to-peer transactions on this "green channel", realizing instant confirmation of micropayments; and if there is no direct peer-to-peer payment channel between the two parties, as long as the lightning network exists A payment path that connects two parties and is composed of multiple payment channels can also use this payment path to realize transactions.

image.png

Lightning network advantages

Instant payment

Lightning network transactions do not need to wait for network confirmation, so transactions can be completed quickly within a few seconds.

low cost

Since transaction settlement is performed off-chain, the Lightning Network transfer fee is extremely low.

Micropayment

The handling fee is calculated in proportion to the payment amount, so there will be no unreasonably high handling fee for small transactions.

Scalability

The Lightning Network makes it possible for the Bitcoin network to process millions of transactions.

image.png

How does the Lightning Network work?

The Lightning Network is built on the second layer of the Bitcoin blockchain and is a decentralized system controlled by smart contracts. It provides network participants with instant and high-traffic micropayment services that do not require escrow

The second layer of payment protocol establishes a secure network between transaction participants so that participants can directly conduct transactions without broadcasting each transaction to the Bitcoin blockchain network. The Lightning Network will only complete the final settlement through the Bitcoin blockchain when the payment channel is closed.

Two-way payment channel

To send and receive bitcoins through the Lightning Network, transaction participants need to establish a new lightning channel and send a sum of bitcoins to the channel.

Within the upper limit of the total number of bitcoins sent when the channel is opened, transaction participants can freely send any number of bitcoins between them.

Only when the channel is closed, all transactions that occur will be settled and the user's actual Bitcoin balance will be updated. Transfer fees will also be incurred.

Global Payment Network

The payment function of the lightning channel is not limited to the transaction participants who open the channel. Even when there is no direct relationship between the sender and the receiver, the network will still ensure that the funds are sent to the destination. The Lightning Network will look for possible indirect paths to reach the expected destination, otherwise it will refund.

Blockchain playing the role of arbitrator

Although all transactions are carried out off-chain, all participants can still guarantee the enforceability of the chain. Just like, someone can create legally binding contracts with many different counterparties, but there is no need to go to court for arbitration for every business within the contract. Intervention of arbitration is necessary, but only when the contract is not fulfilled, that is, the Lightning Network will ultimately rely on Bitcoin's blockchain algorithm.