MelonLND asked over 2 years ago

What happens if by accumulating fees, you have reached your capacity. Does the capacity increase. If not, how do you offload sats to make room

11 Comments

LN+

LN+ Admin wrote over 2 years ago

Channels have some reserves in case you want to close them. It's normal not to have a small discrepancy. You're good.


LN+

LN+ Admin wrote over 2 years ago

You can LOOP out by Lightning Labs. Or use one of the LN > On Chain exchanges like fixedfloat.com, Kraken, Bitfinex, etc.


MelonLND

MelonLND wrote over 2 years ago

I do appreciate the help, but you are looking at the functionality of routing. My question is even more granular. If a route is to take place that would move the balance of one side or another above the capacity, will it be rejected. Let say I have a 100 sat capacity, and I have 99 sats routable, a route is proposed that would take place giving me 2 sats in fees, does that make my balance(either side) 101, or is it denied because of this limit. Can my combined remote/local balance be more than the capacity of the channel


MelonLND

MelonLND wrote over 2 years ago

That's the opposite of why I am asking. I don't plan on closing these channels for a long time(if ever) but if I am going to have forwards bypass my node because I am at capacity, Id like to know how to correct it.  I don't understand what channel capacity is, is it local only, is it combined between local and remote. I'm a newb when it comes to this, but I try to understand everything before I make decisions(damn engineer in me) I do appreciate all the help I am getting here, but I am not sure I am even asking the right questions.


MelonLND

MelonLND wrote over 2 years ago

Does channel capacity limit (inbound + outbound) amounts, or only one or the other. I have a channel where my (inbound + outbound) combined amount is like 100 sats away from my capacity. Should I be worried, or as long as one or the other is under capacity, I am good. I guess my question is can (inbound + outbound) combined amounts ever be higher than the channel capacity


LN+

LN+ Admin wrote over 2 years ago

capacity  = inbound (remote) + outbound (local)

The remote and local capacity will change on your channels when you route (forward). That is also normal. 


Shire_Society_Federation wrote over 2 years ago

Short answer:
Your node can't accumulate fees unless you have a channel with inbound routing capacity and another channel with outbound capacity. 
The capacity is the amount that can move in one direction through the channels, if the satoshis move, it lowers the amount that could move in that direction and raises the amount that could move the opposite direction.
see also: https://docs.lightning.engineering/the-lightning-network/routing/what-makes-a-good-routing-node

Long Answer:
Fees are "accumulated" on the local side of one channel (reducing the inbound capacity, increasing the outbound capacity of that channel), but those routed sats are sent out lowering the local side of the other channel (reducing outbound capacity and increasing inbound capacity of that other channel).
The fees are the difference of what was sent into the first channel local balance from what was sent out of the other channel local balance.
Example:  A-B-C, if you are node B, your channel from A collects the fees and routed payments up to the maximum A can send down to their 0 balance (Capacity minus reserve). Beyond that amount the channel from A can not route payments and fees to you.
Your out going channel to C (or elsewhere) would route payments while the outgoing balance is above the amount you need to route.
the fees are the amount not routed and thus collected on the first incoming channel but not sent out on the second outgoing channel.
As your inbound channel capacity lowers, you would need more inbound capacity to continue "collecting fees" efficiently as the amount available to route is reduced.
See the "post" about ways to increase inbound capacity: https://lightningnetwork.plus/posts/234 Note, it omits LN+ competitor Satoshi Radio Rings of Fire, a telegram based swap ring service.
Either A) spending out, B) buying inbound, or C) joining swaps are the 3 commonly used methods.
(C) Is done on this site and SRROF, as well as any dual funded channels node runners might form based on mutual contributions.
(A) and (B) are available via a variety of methods, some listed in the post linked above, including "buying" on-chain bitcoin for lightning.


Shire_Society_Federation wrote over 2 years ago

I updated the first response to be more helpful I hope, but your new questions are hopefully answered here:

Channel capacity is the total bitcoin locked in an on-chain transaction and some amount is a "reserve" for paying any closing fees. 100 sats seems a little low for that but theoretically possible I guess. The remaining capacity is local + remote balances.
Your node owns the local balance which is the "outbound capacity". The remote balance belongs to the other node and is the "inbound capacity".
Routing a transaction requires your node to have desirable channels to be used, one inbound and one outbound of sufficient capacity for a single routing transaction.
Routing is chosen by the node sending a payment based on "gossip" received through the nodes on the lightning network sharing the capacity available to route payments through channels.
Example, If your channel has 1,001,000 satoshis remote and you have another channel with 1,000,000 local then your node could route a maximum of 1,000,000 through while collecting 1,000 ppm in fees, in that case it would end with 1,001,000 satoshis local on the first and 1,000,000 remote on the other.


LN+

LN+ Admin wrote over 2 years ago

Yes. It will be rejected. You will have a routing failure. 


Shire_Society_Federation wrote over 2 years ago

The remote balance belongs to the other node sharing the channel, thus it's not "yours". The combination of your local balance, their remote balance, and the reserve (agreed between nodes to pay in the case of force closing the channel) is exactly equal to the channel capacity. Like beads on an abacus, the sats can neither be taken out or put onto the channel after it is opened, only moved between the 2 sides. Thus the total of a channel opened with 100 sats will never total more or less than 100 sats. The fees are merely more total sats in your local balances as one channel is increased in the local side while the other channel is decreased on the local side.
A balanced channel with 50/50 would have 50 inbound capacity and 50 outbound capacity while 0/100 or 100/0 would have 100 inbound or outbound and ZERO capacity to route the other way. The "fee" your node earns is simply the difference not routed out through the other channel. Each channel is independent of each other and may have grossly different capacities so long as it is above the amount being routed.


MelonLND

MelonLND wrote over 2 years ago

Thanks for the education, and here I thought I was an old dog.....never too old to learn something new

Please login to post comments.