AdamISZ / pathcoin-poc

PathCoin (transfer bitcoin without network interaction) - proof of concept demonstration
11 stars 2 forks source link

Timelocks do not need delta #1

Closed AdamISZ closed 11 months ago

AdamISZ commented 11 months ago

This has been coded such that in a fidelity bond structure like:

fidelity bond funding -> ((A and TL_A) OR (T_A and CTV->((B and TL_B) OR (T_A and H(S_B) and CTV->(destination C))))

..., the timelocks are all distinct (staggered by a BLOCKHEIGHT_WINDOW variable).

(simple 3 party case).

Notation: T_A is the adaptor point for A's partial sig in the pathcoin, and TL_X is a timelock (controlled with CLTV) for participant X.

But there is no reason those timelocks need to be distinct. The purpose of the timelock is to ensure that the second half of the OR (implemented in Script as OP_ELSE) takes precedence over the first. Since the connectors are all CTV-ed, they are separate logical splits. All of TL_A, TL_B, TL_C (and etc.) can just be the same blockheight.

(Also, as a reminder, there is no timelock at all on the pathcoin itself. Only on these fidelity bond structures as per above.)