Given a channel that exist between Alice and Bob, where Alice wants to transfer 0.0001 BTC to Bob. Alice makes HTLC payment to Bob contingent to the secret for the payment hash within a timelock of say 100 blocks. So now Alice and Bob will each have a copy of the commitment transaction. Suppose Alice decides to close the channel at the 50th block height by broadcasting her copy of commitment transaction which has two output: HTLC success and HTLC timeout. So she bears the transaction fee of the commitment transaction. Now Bob can immediately spend the HTLC success transaction by using the preimage of the payment hash and his signature. Now Bob in order to guarantee that his HTLC success transaction is prioritized, increases the transaction fee of HTLC success transaction (using Replace-by-fee). So is that Bob has to bear the cost of the increased transaction fee in order to spend his output?


Tl,;Dr answer:

  1. The fees for the htlc are covered by whoever claims the output
  2. The fees for the commitment tx are always covered by the party who opened the channel.

Sorry to say that but I believe there are many things wrongly stated in your question:

  1. The fee for the commitment transaction is not necessarily paid by Alice even if she force closes the channel. The fee is always covered by the the person who has opened the channel. This is independent of who closes it and what type of close we have.
  2. The commitment tx does not have two outputs htlc success and htlc timeout. It has 3 outputs: a) a relative timelocked to_local b) to_remote c) the htlc output which has two conditions to be spent: one is the htlc success and the other one is htlc timeout tx. (note of course there could be more than 1 htlc output in the commitment tx if there are several htlcs in flight)

The fees for claiming the htlc output must necessarily be paid by the person who claims the output, since the funds go to them and noone else. (of course ln could have decided that they could have been taken from the commitment tx but I think this would have been a wired and unclean solution) So yes in your case they are paid by Bob.

Note that the htlc output is again a multisig Adress to enable the second stage htlc process. AFAIK this is necessary to decouple the relative timelocks of the commitment tx from the absolute timelocks of the htlcs. That being said as far as I understand the situation Bob isn't able to replace by fee the htlc success tx without getting signatures from Alice. (note that in commitment signed message there is one signature for the commitment tx to spend the funding TX and then a list of signatures for every htlc as the htlcs are in a musig Adress (this is also necessary to allow the penalty tx in case if broadcasting old state). Thus without Alice's help Bob cannot create a new htlc success tx. In the case of a force close we assume there is no help.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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