Two Drivechain BIPs



Summary:

The author proposes that P2PKH can be used to create a Theft Contract and an Accomplice Contract. Both contracts are Hashed Time-Locked Contracts (HTLCs), with the difference being that the timelock in the Theft Contract is anyone-can-spend after the time limit, while the Accomplice Contract is an ordinary HTLC. By using P2PKH and an off-chain method, a HTLC with anyone-can-spend after the timelock can be formed. Spending from a P2PKH reveals the preimage to the public key. Therefore, the Accomplice Contract can use the P2PKH as the hash, and when the P2PKH is spent, acquire the public key to be used as the preimage of the hashlock. To create a timelock, the thief encrypts the private key to the P2PKH in a timelocked-encryption scheme, publishes it as part of the theft attempt, and provides a zero-knowledge proof that the timelock-encrypted private key is the correct private key to the given public key hash. If the thief does not spend the P2PKH, someone else can grind the timelock-encryption and spend the P2PKH, unlocking the Accomplice Contracts anyway. However, timelock-encryption is less reliable as a time measure since different sequential processing speeds yield different timelocks from the same timelock-encrypted data. An issue may arise if the Accomplice doesn't cooperate and the theft fails because the Accomplices can grind the timelock-encryption and acquire the private key. This allows them to compute the public key, which is also the preimage to their hashlock. Thus, there may not be an incentive to coordinate with the Thief under this structure. The author suggests that this idea may trigger someone else to exploit the precise mathematics of P2PKH to create something similar to a HTLC.


Updated on: 2023-06-12T22:29:59.880609+00:00