8

I've been educating myself on how the Lightning Network protocol works, and I have some questions.

Let's say that a user sends a small payment to someone and it makes multiple hops through the network before reaching the recipient. The payment then propagates backward through the chain until it reaches the payer, and everything settles out.

It's possible that a node in the middle either either intentionally or unintentionally does not pay the next node down the line. The recourse is for the node that did not get paid to broadcast the transaction to the blockchain (and close the channel?).

Who pays the fees for for that transaction? What happens if the fee is significantly larger than the amount of money the node would gain by broadcasting the transactions?

This seems like it could potentially be a large attack vector. Is there something I am misunderstanding?

2 Answers 2

2

It's possible that a node in the middle either either intentionally or unintentionally does not pay the next node down the line. The recourse is for the node that did not get paid to broadcast the transaction to the blockchain (and close the channel?).

No, that's not accurate. If a node in the middle of a multi-hop payment rejects a payment request, the sender simply makes another attempt along a different route omitting this node. On the other hand, if the payment contract is already established, the node is already cryptographically committed to pay. It's impossible at that point for them not to pay. A forwarding node can merely fail to collect the reimbursement for what they've already forwarded.
If a node continuously fails to forward payments, their channel partner is still free to close the channel of course, but this is for different reasons.

Who pays the fees for for that transaction? What happens if the fee is significantly larger than the amount of money the node would gain by broadcasting the transactions?

The fee for Lightning payments is paid by the sender. They must include sufficient funds to pay fees to all nodes along the route. If the fee for closing a channel is higher than the channel's capacity, it probably makes more sense to leave it open until fees get lower.

3
  • "The node is already cryptographically committed to pay. It's impossible at that point for them not to pay." Sure, but if the amount of the transaction is higher than the current BTC fees it would cost the node that did not get paid more than the amount sent to force the transaction than they would receive by doing so.
    – Anthony
    Apr 25, 2018 at 19:22
  • @Anthony: The recipient of the payment can use the preimage to claim the committed funds from the HTLC. Then initiate the unilateral close. I don't understand your interjection. github.com/lightningnetwork/lightning-rfc/blob/master/…
    – Murch
    Apr 25, 2018 at 23:35
  • you say, "If the fee for closing a channel is higher than the channel's capacity, it probably makes more sense to leave it open until fees get lower.", but what if that never happens? miner fees are expected to go up over time as coinbase tx values go down. what happens if the channel can never settle? Oct 30, 2018 at 4:43
1

A network fee in Bitcoin is simply the leftover between sum of the inputs and the sum of the outputs. The lightning network can be viewed as a protocol for updating the value split between the outputs. Therefore, any closing transaction that is broadcast will already have the fee set in place.

If Alice has a channel open with Bob, and for whatever reason wants to broadcast her transaction to close the channel, she is intentionally agreeing to only receive the funds that transaction explicitly allocates to her. The fee has already been built in, and like the rest of the transaction, cannot be changed.

There is a section of fees in the protocol specification if you would like to read more.

2
  • It sounds like you are talking about fees paid to LN hubs? I am specifically talking about fees paid to bitcoin miners for including the transaction in the BTC blockchain.
    – Anthony
    Dec 27, 2017 at 19:02
  • @Anthony, no, I'm talking about transactions on the blockchain. A transaction on the lightning network is just an update to the potential closing transactions held by the channel owners. These closing transactions must include a fee, otherwise there is no threat that they may be broadcast to the Bitcoin network. I'm no expert, but I'd assume those fees would need to be recalculated when the closing transactions are updated, but once they are, they are set in stone.
    – Jestin
    Dec 27, 2017 at 19:07

Your Answer

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

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