What Is A Payment Channel?
A lightning networkWhat Is The Lightning Network? The lightning network is a layer 2 payment protocol that enables near-instant, low-fee, private payments on the Bitcoin network. It is intended to enable scalable,... payment channel is a specialized smart contractWhat Is A Smart Contract? A smart contract is a digital contract that is enforced by code rather than a trusted third party. Smart contracts are executed automatically when the... between two lightning nodes that allows for near-instantaneous bitcoin payments between the two nodes with absolutely zero fees. If multiple nodes all connect to each other with payment channels, they form a network which is the basis of the lightning network. When someone wants to send a payment through a series of nodes, the routing nodes may charge a routing fee to use their network of channels.
How Do Payment Channels Work?
Opening a payment channel requires a 2-of-2 multisigWhat Is MultiSig? Multisig, short for multiple signatures, is a security measure that requires multiple signatures in order to authorize and send a bitcoin transaction. It is a feature in... smart contract between two parties which allows the funds to be locked up and released according to certain conditions. If either party tries to unilaterally close the channel, the other party can open an on-chain dispute resolution process. If the two parties cooperatively close the channel, then both parties receive their portion of the channel sent to their wallet.
Opening A Channel
AliceWho Are Alice and Bob? Alice and Bob are fictional characters who are often used to describe problems or dilemmas in cryptography or communications protocols. Alice and Bob are typically... and BobWho Are Alice and Bob? Alice and Bob are fictional characters who are often used to describe problems or dilemmas in cryptography or communications protocols. Alice and Bob are typically... have decided to open a payment channel. Opening a payment channel requires an on-chain payment to a 2-of-2 multisig smart contract. Once the channel is open, the two parties can send payments back and forth to each other without having to record each transaction on the blockchainWhat Is The Blockchain? The blockchain is the public record of bitcoin transactions, which are organized into blocks that are all chronologically linked to one another. Because every block is... itself. These off-chain transactions are only stored on the two parties’ bitcoin nodesWhat Is A Bitcoin Node? A bitcoin node is any computer that runs the bitcoin software, enforces the bitcoin consensus rules, and validates bitcoin transactions and blocks. Bitcoin nodes are.... The cost to send payments back and forth between the 2 parties is absolutely 0 satsWhat Is A Satoshi? A Satoshi (sat or sats for short) is the smallest unit of a bitcoin. 1 Satoshi is a hundred millionth of a BTC (1 sat =... so they can transact back and forth at zero cost as long as the channel remains open.
Sending Bitcoin Payments
As soon as a payment channel has been opened, Alice and Bob can send lightning payments back and forth between each other as many times as they want for absolutely free. Since they are not routing any payments through any other nodes, they do not need to pay any routing fees.
Alice and Bob send dozens of payments back and forth between each other over the course of months. Alice sends 250,000 sats for some gas, Bob sends 100,000 sats to Alice for an Uber ride and so on until the balance is 600,000 sats owned by Alice and 400,000 sats owned by Bob.
Since it only required one on-chain payment to open the channel but Alice and Bob have sent dozens of payments back and forth between each other without any fees, they are lowering their overall costs of sending payments by using a payment channel. Another benefit of sending these payments is that they are completely private between Alice and Bob. They are the only two people in the world that know about them unless they tell other people.
Closing A Channel
When either party wants to close a channel, they simply submit the most recent copy of the channel history to their own bitcoin node with an on-chain transaction. This will settle the channel for all of the outstanding payments and determine who owns what percentage of the final balance. Because both parties sign the transaction and broadcast the final state of the channel, it is considered final and cannot be disputed once it has been confirmed on the blockchain.
Lightning network payment channels provide a secure and efficient way to transact bitcoin without having to wait for confirmations from the bitcoin network. Due to the low cost and the ability to send multiple payments during the life of a single payment channel, bitcoin used in this way is helping bitcoin to scale to be able to send substantially more payments than is capable on the blockchain itself.
You can view active payment channels on the lighthing explorer