11

To be clear: Following is not about fees in Lightning Network. Following is about fees on blockchain for transaction which closes the channel in LN.

Channel closing transaction can be created months before broadcasting to blockchain network. How the fee for the blockchain transaction is calculated without knowing the (far) future situation in mempool?

Is replace-by-fee possible for LN's closing transaction? There are different types of closing transaction — maybe answer is different for each type of closing transaction.

Is the fee calculation related to current situation in mempool? I found some calculations here, but I didn't found any relation to dynamically changing situation in mempool.

1 Answer 1

11

If worried about the original closing transaction having too high of fees:

The signed closing transaction that you're worried about (with too high of fees) has not yet been broadcast to the network, so no harm no foul (yet).

If the two parties are cooperative, they can just agree to sign a new transaction with lower fees and broadcast that to close out the payment channel (this should be advantageous for both of them anyway).

If the two parties are NOT cooperative, it might be best to just broadcast the original closing transaction and eat the fees.

Is replace-by-fee possible for LN's closing transaction?

Replace-by-fee only applies to transactions that have already been broadcast to the network. Also, they only help if you're increasing fees, not decreasing them, so it doesn't apply to this situation.

If worried about the original closing transaction having too low of fees:

If the two parties are cooperative, you can just sign a new closing transaction with higher fees and broadcast that.

If the two parties are NOT cooperative, just broadcast the original closing transaction and hope that the transaction does not get stuck in the mempool. Also make sure that the original closing transaction has a high enough fee that there is little worry about it getting stuck in the mempool. Even somewhat non-cooperative parties should be willing to re-sign and lower the fees to close out the payment channel. Overall, this is the trickier scenario to predict.

Is replace-by-fee possible for LN's closing transaction?

Again, replace-by-fee only applies to transactions that have already been broadcast to the network. Also, this would require a cooperative party.

4
  • No, I'm (most) worried about too low fee, and not cooperative party.
    – CoperNick
    Dec 28, 2017 at 6:46
  • @CoperNick I updated my answer with more conditional scenarios. It's still a tricky problem that you're bringing up. Dec 28, 2017 at 16:00
  • Thanks. After your update I see potential attack scenario on channel with more than one balance updates with different transaction fees. Maybe see you in next question.
    – CoperNick
    Dec 28, 2017 at 18:59
  • 3
    Isn't "Child pays for parent" another way to resolve a closing transaction having too low fees? I.e. broadcast the closing transaction with small fees and broadcast a subsequent dependent transaction with high fees. Jan 26, 2018 at 18:26

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.