2

If there is a lightning channel A-B where A had a balance of c coins and B had 0 balance, it could be the case that A makes several off-chain payments and now the balance of A is 0 and balance of B is c.

Can B now unilaterally close the channel given that to_remote output of A is 0 (this amount is below the dust limit) and to_local output is c or will this lead to failing of channel closure? Is it so that channel closure is allowed only when A has balance more than the dust limit? Also while doing a channel update, does A need to keep a channel_reserve that prevents him from transferring all the c coins to B? Or is this something checked only during open channel?

1 Answer 1

2

Can B now unilaterally close the channel given that to_remote output of A is 0 (this amount is below the dust limit) and to_local output is c or will this lead to failing of channel closure?

It can. If the output of A ended up being 0, the closing transaction would simply not include that output. That won't be the case though, check the last answer for why.

Is it so that channel closure is allowed only when A has balance more than the dust limit?

No, a channel closure is always allowed. If an output of the closing transaction is below the dust limit, that output will simply not be created, so the balance corresponding to that output will be set as fees. You can check BOLT3 for more details on that.

Also while doing a channel update, does A need to keep a channel_reserve that prevents him from transferring all the c coins to B? Or is this something checked only during open channel?

A does indeed need to keep a channel_reserve, as so does B, therefore, A balance will never be 0 (assuming she's the one unilaterally funding the channel), and B's will never go below the limit once his balance is above it.

7
  • How is A enforced to not exhaust the channel_reserve while updating the channel? So suppose A wants to do 1 single channel update that sends all c coins to B. Then will B deny signing this off-chain transaction seeing that A has exhausted the channel reserve and fail the channel? Oct 17, 2023 at 14:20
  • Yes. github.com/lightning/bolts/blob/master/…
    – sr_gi
    Oct 17, 2023 at 14:23
  • 1
    It actually says the opposite, given this is normally not held by one of the sides for the initial commitment (given channels are usually one-sided when funded): "Initially, this reserve may not be met, as only one side has funds; but the protocol ensures that there is always progress toward meeting this reserve, and once met, it is maintained."
    – sr_gi
    Oct 17, 2023 at 14:38
  • 1
    You can look down the same doc for "Adding an HTLC: update_add_htlc", under "A receiving node : receiving an amount_msat that the sending node cannot afford at the current feerate_per_kw (while maintaining its channel reserve and any to_local_anchor and to_remote_anchor costs): SHOULD send a warning and close the connection, or send an error and fail the channel."
    – sr_gi
    Oct 17, 2023 at 14:38
  • 1
    Thanks for the clarification and pointing this out that for every update channel_reserve constraint is maintained. Oct 17, 2023 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.