Suppose in a payment route A->B->C, A desires to pay 0.01 BTC to C. It locks in 0.01 BTC with B in the HTLC having timeout period of say 2 days and B locks 0.01 BTC with C in HTLC having timeout period of 1 day. Now can something like this be done that if C delays in revealing the preimage say takes 1/2 day, then it gets 0.005 BTC and 0.005 BTC is returned to B. Can the contract support such dynamic settlement of payment based on amount of time lost? In the worst case, if C doesn't respond then B gets back full 0.1 BTC.


Such a functionality is currently not implemented and as far as I understand not intended. You can look at Discreet Log Contracts which where intended to solve CFD (Call for difference) contracts for example with cross asset swaps and changing exchange rate within the timelock period. We have a proposal how they could be transfered to lightning. That being said this would mean severe protocol changes and also computation of many signatures. Yet I think a similar construction could be applied for your usecase.

  • Thanks @Rene Pickhardt for sharing the resource. May 8 '20 at 13:51
  • Just wanted to know while updation of state in DLC, so if it is combined with LN, how does one keep track of the latest state? In LN the last state is first invalidated before moving on to the next state. So if the other party stops responding intentionally and the party affected broadcasts last updated state, so there is a chance the other party wakes up and claims all the channel fund. May 8 '20 at 14:05
  • that is exactly why we have this channel factory construction. This splits the channel into a part that operates as before with alle the state handling as known and independent of that we have the DLC. the DLC does not have to be touched if balances change. viceverca lightning state does not have to be touched if the DLC settles or is renegotiated. of course a lot of details are not described in the proposal May 8 '20 at 20:06
  • Oh sorry yes missed that part! I haven't got much idea about channel factories, so I will read it up May 9 '20 at 3:07
  • But can one do away with the problem of stale state if one of the parties do not cooperate for updation ? In that case there is no way the party can update the fund to be received by imposing a penalty (like the one above 0.005 BTC and 0.005 BTC for half a day delay). May 9 '20 at 3:51

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.