- The Concept of Payment Channel
- The Allocation of Funds in the Channel
- The Fundamental Rules of a Payment Channel
The Lightning Network is a network of payment channels built on top of the Bitcoin protocol, aiming to enable fast and low-cost transactions. It enables the creation of payment channels between participants, within which transactions can be made almost instantly and with minimal fees, without requiring the recording of each transaction individually on the blockchain. Thus, the Lightning Network aims to enhance Bitcoin's scalability and make it more suitable for low-value transactions.
Before exploring the "network" aspect, it is essential to understand the concept of a payment channel on Lightning, its operation, and its specifics. This is the subject of this first chapter.
The Concept of Payment Channel
A payment channel allows two parties, here Alice and Bob, to exchange funds over the Lightning Network. Each protagonist has a node, symbolized by a circle, and the channel between them is represented by a line segment.
In our example, Alice has 100,000 satoshis on her side of the channel, and Bob has 30,000, totaling 130,000 satoshis, which constitutes the channel capacity.
But what is a satoshi?
The satoshi (or "sat") is a unit of account on Bitcoin. Similar to a cent for the euro, a satoshi is simply a fraction of Bitcoin. One satoshi is equal to 0.00000001 Bitcoin, or one hundred millionth of a Bitcoin. Using the satoshi becomes increasingly practical as the value of Bitcoin rises.
The Allocation of Funds in the Channel
Let's return to the payment channel. The key concept here is the "side of the channel". Each participant has funds on their side of the channel: Alice has 100,000 satoshis, and Bob has 30,000. As we've seen, the sum of these funds represents the total capacity of the channel, a figure set when it is opened.
Let's take an example of a Lightning transaction. If Alice wants to send 40,000 satoshis to Bob, this is possible because she has enough funds (100,000 satoshis). After this transaction, Alice will have 60,000 satoshis on her side, and Bob will have 70,000.
The channel capacity, at 130,000 satoshis, remains constant. What changes is the allocation of funds. This system does not allow sending more funds than one possesses. For example, if Bob wanted to send back 80,000 satoshis to Alice, he could not, because he only has 70,000.
Another way to imagine the allocation of funds is to picture a cursor that indicates where the funds are within the channel. Initially, with 100,000 satoshis for Alice and 30,000 for Bob, the cursor is more on Bob’s side, since Alice has far more funds. After the transaction of 40,000 satoshis, the cursor will shift slightly towards Alice, who now holds 60,000 satoshis.
This representation can be useful for imagining the balance of funds in a channel.
The Fundamental Rules of a Payment Channel
The first point to remember is that the channel capacity is fixed. It's somewhat like the diameter of a pipe: it determines the maximum amount of funds that can be sent through the channel at once.
Let's take an example: if Alice has 130,000 satoshis on her side, she can only send a maximum of 130,000 satoshis to Bob in a single transaction. However, Bob can then send these funds back to Alice, either partially or in full.
What's important to understand is that the fixed capacity of the channel limits the maximum amount of a single transaction, but not the total number of possible transactions, nor the overall volume of funds exchanged within the channel.
What should you take away from this chapter?
- The capacity of a channel is fixed and determines the maximum amount that can be sent in a single transaction.
- The funds in a channel are distributed between the two participants, and each can only send to the other the funds they own on their side.
- The Lightning Network thus allows for the rapid and efficient exchange of funds, while respecting the limitations imposed by the capacity of the channels.
This concludes the first chapter, where we have laid the groundwork for the Lightning Network. In the coming chapters, we will see how to open a channel and delve deeper into the concepts discussed here.
Quiz
Quiz1/5
lnp2012.1
In a payment channel, what is the capacity of the channel?