What is the Lightning Network?5 min read
The Lightning Network (LN) is a lightweight software solution that was built for scaling the Bitcoin blockchain and improving Bitcoin’s usability as a Medium of Exchange. Bitcoin is the world’s most widely used currency that can be accessed from anywhere in the world using the internet. But there were some serious drawbacks that prevented it from scaling to become the perfect vehicle for payments. Enter the Lightning Network.
Who Created the Lightning Network?
The concept of the Lightning Network was introduced by Joseph Poon and Thaddeus Dryja through the whitepaper: “The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments.” The paper was an important start but since its conception, the design of the protocol has improved. Multiple teams have been building different implementations of the Lightning Network that are all compatible with the BOLT protocol specifications.
Current teams building LN Implementations:
- Blockstream – Creator of C-lightning
- Lightning Labs – Creator of LND
- ACINQ – Creator of Eclair
- Nayuta – Creator of Ptarmigan
How does it work?
The Lightning Network runs on a peer-to-peer (P2P) level where all transactions occur on an off-chain network that is built on top of the Bitcoin blockchain. Transactions on LN occur on bi-directional payment channels. These transactions do not require a confirmation from the Bitcoin network since they occur off-chain. This means that transactions can be executed much quicker through a smart contract, requiring much lower fees and allowing much higher throughput.
To create a bi-directional payment channel, two parties must decide to open a payment channel where they can transact funds back and forth from each other’s wallets. To set up the payment channel, both parties need to fund the creation of the channel with an on-chain Bitcoin transaction. The total amount of the payment channel is the maximum amount of funds that can be transacted, thus protecting both parties from losing more funds than necessary.
The most common example of how LN works is with the Alice & Bob Model. To get started, Alice and Bob need to fund a payment channel using a multi-signature wallet. With the funds in the payment channel, it can act as a smart contract and the multi-signature wallet can act like a safe holding all of the funds to be transacted. While the payment channel remains open, Alice and Bob can continue to make as many transactions with each other as they choose.
These transactions are kept on a “balance sheet” that is localized in the channel between Alice and Bob. After every transaction, they sign and update their copies of the balance sheet to record the amount of Bitcoin each one of them has. When they are finished, they can both agree to close the payment channel and broadcast their final balances to the Bitcoin blockchain. Both parties will receive their Bitcoin according to the latest version of the balance sheet submitted due to the rules of the Lightning Network smart contract.
Hashed time-locked contracts powered by the Lightning Network are designed to protect both parties and always require the approval from both parties for any funds to be moved. Anytime one party acts maliciously and attempts to remove funds from the payment channel without the other’s consent, they are penalized and must forfeit their funds to the other party in the channel.
Routing payments on the Lightning Network
What makes the Lightning Network even more appealing is the routing of payments that occurs on the network with interconnected payment channels. This means that even if two parties aren’t connected through a direct payment channel, they are still able to send and receive Bitcoin payments as long as a connection to the rest of the network can be established. This allows Alice to send payments to her friend Sally without having a direct payment channel as long as there is another channel on the Lightning Network connected to Sally with enough funds on the payment channel to fit Alice’s payment.
If Alice has an open channel with Bob but no channel with Sally and Bob has a channel with Sally, Alice can send the payment to Sally through Bob. The routing of payments over the Lightning Network may involve several hops but the smart contract will automatically search for the shortest and most cost-efficient path available.
Benefits of the Lightning Network
- Instant Payments: On-chain Bitcoin payments require six confirmations which aren’t feasible for real-world payments. LN allows for Bitcoin payments to be made instantly with zero confirmations
- Micropayments: LN allows users to send and receive Bitcoin payments all the way down to 0.00000001 BTC (<0.01 Cents).
- Scalability: All Bitcoin transactions on LN occur off the Bitcoin blockchain (off-chain) without the delegation of trust or ownership, allowing users to conduct unlimited instant payments.
The Lightning Network is fully operational today and is successfully transacting micropayments around the world. As it continues to be developed and as channel limits continue to rise, we will get closer to confirming that the Lightning Network is a successful solution to scaling the Bitcoin network.
As a pioneer of the Lightning Network, the team at OpenNode understands the value of providing a pleasant user experience with this new technology and we’ll continue to improve our platform with every new development. OpenNode currently offers Bitcoin payment processing for both on-chain and Lightning Network payments; learn all about the features of our platform here.