lightning-dev
Hold fees: 402 Payment Required for Lightning itself
Posted on: November 2, 2020 23:10 UTC
In a conversation between t-bast and ZmnSCPxj, the issue of bidirectional upfront/hold fees for trustless offchain-to-onchain swaps was discussed.
The problem is that claiming the offchain side is dependent on claiming the onchain side, which is slow, forcing the swap service to pay up the hold fees. ZmnSCPxj suggests that the swap service should take this into account when collecting fees, so that it is the user who pays for the fee. However, t-bast suggests that the user can wait for the swap service to put an onchain HTLC and then time it out, causing the offchain/onchain swap service to pay for both the onchain HTLC and the hold fee. This issue is fixed in Boltz by having a separate mining-fee invoice that must be paid before the offchain/onchain swap service creates the onchain HTLC. Therefore, ZmnSCPxj suggests including the hold fee in the mining-fee invoice as well.