Best online shop for the best quality toys in India

Welcome to the world of toys! Whether you’re a parent or a grandparent, an aunt or an uncle, you know how important it is to find the perfect toy for your little ones. With so many options available…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




The Inbound Capacity Problem in the Lightning Network

The need for inbound capacity can only be understood by taking a closer look at the Lightning Network’s first building block: payment channels. You have probably heard of them before, so let’s jump directly to the aspects that are related to inbound capacity.

We’ll first think of one separate channel, and increase the complexity of the setup throughout the post.

While a payment channel is open, there is a constant amount of bitcoins locked in it. This is called the channel capacity and both sides of the channel own a portion. The amount on your side of the channel is called local balance and the amount on your peer’s side is called remote balance. Your local and remote balance can be updated many times without closing the channel, but the channel capacity cannot change without closing (or splicing) it.

Your channel with Robert has a channel capacity of 8 BTC. Your local balance is 5 BTC and your remote balance is 3 BTC

Every time you make a payment, you push part of your local balance to your peer. This decreases your local balance and increases your remote balance. Similarly, when you receive a payment, your local balance increases in the same amount your remote balance decreases.

When you pay Robert 1 BTC, your local balance decreases by 1 BTC and your remote balance increases by 1 BTC.

Now that we have a clearer understanding of what determines the capacity of a channel and how the local and remote balance update, let’s think of what happens when you are part of a network of connected nodes.

Two peers don’t need to be directly connected to pay each other. Instead, they can pay through routing nodes. In each hop a payment does, there’s always a two-sided payment channel under the hood. Therefore, what we have just seen for one payment channel applies in each hop.

Let’s suppose you want to sell stickers via the Lightning Network. Therefore, you need to connect to at least one node of the Lightning Network. You choose it carefully, making sure it’s connected to your potential customers, Sophie and Angela. Let’s call this node lnTop.

You open a channel with lnTop and lock 2 BTC in it. Your local balance is 2 BTC and your remote balance is 0 BTC.

Now, Angela wants to buy you some stickers and pay you via lnTop. But, your remote balance with lnTop is 0 and lnTop cannot send you money. LnTop cannot route the payment.

At a given moment, the amount of money you can receive, or inbound capacity, is limited by your remote balance. You simply cannot receive more money than what your adjacent nodes can send you. Similarly, the amount of money you can send, or outbound capacity, is limited by your local balance.

When you opened a channel with lnTop, you decided how much bitcoins you wanted to lock in it, i.e. your initial local balance. Similarly, if lnTop opens a channel with you, they will determine your initial remote balance. This has important implications. While choosing your initial local balance allowed you to decide your initial outbound capacity, you had no control over your initial remote balance or inbound capacity.

If you launch your Lightning node today, and simply open a channel to another node of your choice, you will probably figure out you have no inbound capacity, i.e. you cannot receive payments via the Lightning Network. Seems like a huge problem for merchants, right?

The good news is that there are several ways to increase your inbound capacity, from simply spending money to asking (and paying) other nodes to provide it. This post explores different solutions to the inbound capacity problem.

Well… no, it’s not. Even if you figure out how to get enough remote balance on your channel with lnTop, the problem of inbound capacity might not be solved. Here’s the thing: not all inbound capacity is the same. To understand the reasons for this, we need to have more information of what’s happening in the rest of the network. Let’s reveal the local and remote balances of all nodes in the network to better understand how money flows.

Here’s the network after lnTop funds a channel with 3 BTC. In the network, each node has local and remote balances with their adjacent nodes.

After gaining some inbound capacity with lnTop, Angela can send you up to 2 BTC because you have at least 2 BTC of remote balance with lnTop, and lnTop has at least 2 BTC of remote balance with Angela.

However, in this network, Sophie cannot even send you 1 BTC. If you take a look at the route between Sophie and you, you will see that in spite of you having 3 BTC as remote balance, lnTop doesn’t have inbound capacity with lnFirst.

lnFirst can’t route a 1 BTC payment to lnTop. Sophie can’t pay you.

For incoming payments, each routing node and you (the receiver) need to have enough inbound capacity with the previous, adjacent node. So, while you might have solved inbound capacity with your adjacent node, lnTop, lnTop might not have good inbound capacity with their adjacent nodes. Alex Bosworth, Lightning Infrastructure Lead at Lightning Labs pointed this out some weeks ago (item 6)

There’s another fact that makes the situation a harder to solve. This thing of “revealing the local and remote balances of all nodes”, cannot be done in the Lightning Network. As a node of a network, you only get to know channels’ capacity, but not how it is distributed between the two peers.

Who is affected by this problem?

In the Lightning Network, not all nodes are equal or have the same needs. Looking at our example, we can identify at least three types of nodes.

Merchant nodes

We’ll call merchant nodes to those who are primarily receiving money in the Lightning Network. In the example above, you would be a merchant node because you are mostly interested in getting paid for the stickers you sell. For it, you need to have inbound capacity. Remember: not just with your adjacent node, but all the way from your customers to you.

End users nodes

These nodes are mainly sending money via the Lightning Network. Occasionally they could also receive money from friends or Lapps. Sophie and Angela would be end users. For this set of users, it is key to connect to other nodes with well-funded routes to merchants. They need both, inbound and outbound capacity, dependent on their behaviour.

Routing nodes

These nodes are routing payments through the network and charging a fee for it. LnTop and lnFirst are some examples. Their job is to detect relevant destinations, like you, the biggest sticker merchant in town. They need inbound capacity upstream with end users, and outbound capacity downstream with merchants. Also their fees have to be competitive with the rest of the market and they need to make sure to be online. Tough job, right?

We have discussed about inbound capacity starting by a single payment channel, then understanding the channel within a network and finally gaining full information of the other nodes.

We defined inbound capacity as the amount of money you can receive via the Lightning Network at a given moment and understood how it is dependent on your remote balance.

The inbound capacity problem seems to be a bootstrapping problem of the Lightning Network. As such, it might be less relevant once there’s more and better distributed liquidity in the network. We’ll keep writing about relevant aspects of the Lightning Network in its early days.

Add a comment

Related posts:

Cara Menabung yang Benar

Menabung adalah salah satu cara dalam pengelolaan keuangan yang bertujuan untuk menyiapkan dana cadangan di masa depan. Tabungan juga berperan untuk menjamin kestabilan keuangan Anda jika mengalami…

Give God the Best

Because the Levites weren’t given any inheritance with the rest of the Israelites, go commanded that most of the offerings that were supposed to go to Him would actually go to the Levites. It was…

More People Die from Communism Than Covid19

I swore I had written my last piece on Covid19 and the pandemic. Yet day after day I’m confronted with hogwash and propaganda created to mislead people. By now, everybody has made up their mind. You…