From 0cc2ff88448ba44c55fa51b0e5b0f8c1aead7a1c Mon Sep 17 00:00:00 2001 From: Nadav Kohen Date: Wed, 15 Jan 2020 15:44:54 -0600 Subject: [PATCH] Update Transactions.md Updates locktime scheme and renames justice to penalty --- Transactions.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Transactions.md b/Transactions.md index 021ccfb..b2546ea 100644 --- a/Transactions.md +++ b/Transactions.md @@ -56,8 +56,8 @@ Where - `Oracle Signature Point` is the 33-byte public key associated with this CET's outcome - Both `CET Public Key`s are 33-byte compressed public keys - `Local Paytout + Remote Payout = (DLC Funding Output).value` - - `nLockTime` is in the past (rather than just using 0) - - for privacy purposes and also to prevent [fee snipping](https://github.com/zkSNACKs/WalletWasabi/issues/2500) + - `nLockTime` is set to the contract maturity time + - `Timeout` is a CSV locktime after which [penalty transactions](#ClosingPenalty) are valid - `DLC Funding Output` is of the form [specified above](#FundingOutputs) ### Global * nLockTime @@ -75,7 +75,7 @@ Where OP_IF OP_ELSE - OP_CHECKLOCKTIMEVERIFY OP_DROP + OP_CHECKSEQUENCEVERIFY OP_DROP OP_ENDIF OP_CHECKSIG @@ -101,6 +101,7 @@ Where - Unlike CETs in a DLC, there is only one Refund Transaction that both parties share, similar to how there is only one [Funding Transaction](#funding-transaction) - Both `Refund Public Key`s are 33-byte compressed public keys - `Total Local Collateral + Total Remote Collateral = (DLC Funding Output).value` + - `Timeout` is a CLTV locktime set well after the contract maturity time - `DLC Funding Output` is of the form [specified above](#FundingOutputs) ### Global * nLockTime is `Timeout` @@ -148,9 +149,9 @@ Where Where - `P2WPKH(Local Unilateral Public Key)`'s value is `Local Payout` -## Closing Transaction (Justice) +## Closing Transaction (Penalty) ### Known Values - * Local Justice Public Key: `ECPublicKey` + * Local Penalty Public Key: `ECPublicKey` * nLockTime: `UInt32` * Remote's ToLocalOutput: `ScriptPubKey` * Fee Rate: `FeeUnit` @@ -167,4 +168,4 @@ Where * P2WPKH(Local Justice Public Key) Where - - `P2WPKH(Local Justice Public Key)`'s value is `P2WSH(Remote's ToLocalOutput).value - fee` + - `P2WPKH(Local Penalty Public Key)`'s value is `P2WSH(Remote's ToLocalOutput).value - fee`