<p>Currently HTLC's timeout transaction relies on absolute timelock enforced on the script. It allows a counterparty to withdraw the money from the contract if the other party doesn't release the preimage. What would have been the problem if instead of using timelock before the counterparty can unlock its money, the condition is replaced with timelock puzzle? The time taken to solve the puzzle will be same as the locktime of the offchain contract.</p>

CC BY-SA 4.0
2020-08-25T11:25:49.557Z
How do you (gu)estimate the "time taken to solve the puzzle" ?
Antoine Poinsot
CC BY-SA 4.0
2020-08-25T11:37:22.660Z
That can be decided by the sender who wants to initiate payment
Subhra Mazumdar
CC BY-SA 4.0
2020-08-25T11:43:56.237Z
Lightning HTLCs use relative timelock (CSV) not absolute (CLTV). This is because we don't know when the commitment tx will be confirmed (it is offline)
pinhead
CC BY-SA 4.0
2020-08-25T12:01:21.370Z
I was talking about the timeout period of HTLC within which the counterparty must provide the preimage in order to claim payment. Isn't that using an absolute timelock?
Subhra Mazumdar
CC BY-SA 4.0
2020-08-25T12:13:20.497Z
sorry you're right - in fact CSV and CLTV are both employed in different LN use cases: https://github.com/lightningnetwork/lightning-rfc/blob/master/03-transactions.md
pinhead
<lightning-network><payment><micropaymentchannels><hash-time-locked-contract><off-chain>
Time locked puzzle for payment in Lightning Network
Subhra Mazumdar
# Time locked puzzle for payment in Lightning Network

(Asked by: username_0 on 2020-08-25)

Currently HTLC's timeout transaction relies on absolute timelock enforced on the script. It allows a counterparty to withdraw the money from the contract if the other party doesn't release the preimage. What would have been the problem if instead of using timelock before the counterparty can unlock its money, the condition is replaced with timelock puzzle? The time taken to solve the puzzle will be same as the locktime of the offchain contract.

**Tags:** lightning-network, payment, micropaymentchannels, hash-time-locked-contract, off-chain

> **Comments:**
> **username_1**: How do you (gu)estimate the "time taken to solve the puzzle" ?  
> **username_0**: That can be decided by the sender who wants to initiate payment  
> **username_2**: Lightning HTLCs use relative timelock (CSV) not absolute (CLTV). This is because we don't know when the commitment tx will be confirmed (it is offline)  
> **username_0**: I was talking about the timeout period of HTLC within which the counterparty must provide the preimage in order to claim payment. Isn't that using an absolute timelock?  
> **username_2**: sorry you're right - in fact CSV and CLTV are both employed in different LN use cases: https://github.com/lightningnetwork/lightning-rfc/blob/master/03-transactions.md  

---

## 0 answers

