Cancellation Setup Atomic Trade Transaction 1. Funding Transaction: Stores deposit of both Funding Transaction Alice -> Bob Transfer parties. 2. Cancellation Transaction : Refunds all parties � A before Δ cancel = Block 3 Alice’s Deposit To Bob a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in � A Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer Condition in Alice -> Bob Transfer: Alice: “ You can claim these coins Bob, if I reveal the secret R of H(R)”. Block #1
Cancellation Setup Atomic Trade Transaction 1. Funding Transaction: Stores deposit of both Funding Transaction Alice -> Bob Transfer parties. 2. Cancellation Transaction : Refunds all parties � A before Δ cancel = Block 3 Alice’s Deposit To Bob a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in � A Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer Block #1
Cancellation Setup Atomic Trade Transaction 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob Alice -> Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit Transfer the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer Block #1
Cancellation Setup Atomic Trade Transaction 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit the respective fork if R of H(R) is revealed. Alice -> Bob a. Alice signs A->B and sends to Bob. Transfer Cancel Timer Block #1
Cancellation Setup Atomic Trade Transaction 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer Alice -> Bob Transfer Block #1
Cancellation Setup Atomic Trade Transaction 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer Alice -> Bob Transfer Block #1
Cancellation Setup Atomic Trade Transaction 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer Alice -> Bob Transfer Block #1
Cancellation Setup Atomic Trade Transaction 1. Funding Transaction: Stores deposit of both Funding Transaction Bob -> Alice Transfer parties. 2. Cancellation Transaction : Refunds all parties � B before Δ cancel = Block 3 Alice’s Deposit To Alice a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in � B Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer b. Bob signs B->A and sends to Alice. Alice -> Bob Transfer Block #1
Cancellation Setup Atomic Trade Transaction 1. Funding Transaction: Stores deposit of both Funding Transaction Bob -> Alice Transfer parties. 2. Cancellation Transaction : Refunds all parties � B before Δ cancel = Block 3 Alice’s Deposit To Alice a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in � B Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer b. Bob signs B->A and sends to Alice. Alice -> Bob Condition in Bob -> Alice Transfer: Transfer Bob: “ You can claim these coins Alice, if I reveal the secret R of H(R)”. Block #1 **REPLAY PROTECTION REQUIRED**
Cancellation Setup Atomic Trade Transaction 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob Bob -> Alice Transfer 3. Transfer Transactions: Sends each party coins in Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer b. Bob signs B->A and sends to Alice. Alice -> Bob Transfer Block #1
Cancellation Setup Atomic Trade Transaction 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit Bob -> Alice the respective fork if R of H(R) is revealed. Transfer a. Alice signs A->B and sends to Bob. Cancel Timer b. Bob signs B->A and sends to Alice. Alice -> Bob Transfer Block #1
Cancellation Setup Atomic Trade Transaction 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer b. Bob signs B->A and sends to Alice. Bob -> Alice Transfer Alice -> Bob Transfer Block #1
Cancellation Setup Atomic Trade Transaction 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer b. Bob signs B->A and sends to Alice. Alice -> Bob Bob -> Alice Transfer Transfer Block #1
Cancellation Setup Alice’s Forfeit Transaction 1. Funding Transaction: Stores deposit of both Funding Transaction Alice -> Bob Forfeit FORK-1 parties. 2. Cancellation Transaction : Refunds all parties � A before Δ cancel = Block 3 Alice’s Deposit To Bob a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in � A Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer b. Bob signs B->A and sends to Alice. 4. Forfeit Transactions: Alice promises to reveal pre-image r of H(R) before Δ B = Block 7 otherwise Alice -> Bob Bob -> Alice Transfer Transfer Bob gets all coins. Block #1
Cancellation Setup Alice’s Forfeit Transaction 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties Alice -> Bob before Δ cancel = Block 3 Alice’s Deposit Forfeit FORK-1 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer b. Bob signs B->A and sends to Alice. 4. Forfeit Transactions: Alice promises to reveal pre-image r of H(R) before Δ B = Block 7 otherwise Alice -> Bob Bob -> Alice Transfer Transfer Bob gets all coins. Block #1
Cancellation Setup Alice’s Forfeit Transaction Alice -> Bob 1. Funding Transaction: Stores deposit of both Forfeit FORK-1 Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer b. Bob signs B->A and sends to Alice. 4. Forfeit Transactions: Alice promises to reveal pre-image r of H(R) before Δ B = Block 7 otherwise Alice -> Bob Bob -> Alice Transfer Transfer Bob gets all coins. Block #1
Cancellation Setup Alice’s Forfeit Transaction Alice -> Bob Forfeit FORK-1 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer b. Bob signs B->A and sends to Alice. 4. Forfeit Transactions: Alice promises to reveal pre-image r of H(R) before Δ B = Block 7 otherwise Alice -> Bob Bob -> Alice Transfer Transfer Bob gets all coins. Block #1
Alice -> Bob Cancellation Setup Alice’s Forfeit Forfeit FORK-1 Transaction 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer b. Bob signs B->A and sends to Alice. 4. Forfeit Transactions: Alice promises to reveal pre-image r of H(R) before Δ B = Block 7 otherwise Alice -> Bob Bob -> Alice Transfer Transfer Bob gets all coins. Block #1
Alice -> Bob Cancellation Setup Alice’s Forfeit Forfeit FORK-1 Transaction 1. Funding Transaction: Stores deposit of both Funding Transaction Alice -> Bob Forfeit FORK-2 parties. 2. Cancellation Transaction : Refunds all parties � A before Δ cancel = Block 3 Alice’s Deposit To Bob a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in � A Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer b. Bob signs B->A and sends to Alice. 4. Forfeit Transactions: Alice promises to reveal pre-image r of H(R) before Δ B = Block 7 otherwise Alice -> Bob Bob -> Alice Transfer Transfer Bob gets all coins. Block #1
Alice -> Bob Cancellation Setup Alice’s Forfeit Forfeit FORK-1 Transaction 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit Alice -> Bob Forfeit FORK-2 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer b. Bob signs B->A and sends to Alice. 4. Forfeit Transactions: Alice promises to reveal pre-image r of H(R) before Δ B = Block 7 otherwise Alice -> Bob Bob -> Alice Transfer Transfer Bob gets all coins. Block #1
Alice -> Bob Cancellation Setup Alice’s Forfeit Forfeit FORK-1 Transaction 1. Funding Transaction: Stores deposit of both Alice -> Bob Funding Transaction parties. Forfeit FORK-2 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer b. Bob signs B->A and sends to Alice. 4. Forfeit Transactions: Alice promises to reveal pre-image r of H(R) before Δ B = Block 7 otherwise Alice -> Bob Bob -> Alice Transfer Transfer Bob gets all coins. Block #1
Alice -> Bob Cancellation Setup Alice’s Forfeit Forfeit FORK-1 Transaction Alice -> Bob Forfeit FORK-2 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer b. Bob signs B->A and sends to Alice. 4. Forfeit Transactions: Alice promises to reveal pre-image r of H(R) before Δ B = Block 7 otherwise Alice -> Bob Bob -> Alice Transfer Transfer Bob gets all coins. Block #1
Alice -> Bob Cancellation Setup Alice’s Forfeit Forfeit FORK-1 Transaction Alice -> Bob Forfeit FORK-2 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer b. Bob signs B->A and sends to Alice. 4. Forfeit Transactions: Alice promises to reveal pre-image r of H(R) before Δ B = Block 7 otherwise Alice -> Bob Bob -> Alice Transfer Transfer Bob gets all coins. Block #1 Block #2
Both Parties Alice -> Bob Cancellation Forfeit FORK-1 Transaction Commit To Atomic Trade Alice -> Bob Forfeit FORK-2 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer b. Bob signs B->A and sends to Alice. 4. Forfeit Transactions: Alice promises to reveal pre-image r of H(R) before Δ B = Block 7 otherwise Alice -> Bob Bob -> Alice Transfer Transfer Bob gets all coins. 5. Commit Transaction: Invalidates the cancellation transaction - and commits both parties to the trade! Only valid after Δ cancel = Block 3 Block #1 Block #2 Block #3
Both Parties Alice -> Bob Cancellation Forfeit FORK-1 Transaction Commit To Atomic Trade Alice -> Bob Forfeit FORK-2 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit Commit Transaction the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. � A Anywhere Cancel Timer b. Bob signs B->A and sends to Alice. 4. Forfeit Transactions: Alice promises to reveal pre-image r of H(R) before Δ B = Block 7 otherwise Alice -> Bob Bob -> Alice Transfer Transfer Bob gets all coins. 5. Commit Transaction: Invalidates the cancellation transaction - and commits both parties to the trade! Only valid after Δ cancel = Block 3 Block #1 Block #2 Block #3
Both Parties Alice -> Bob Cancellation Forfeit FORK-1 Transaction Commit To Atomic Trade Alice -> Bob Forfeit FORK-2 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob Commitment 3. Transfer Transactions: Sends each party coins in Bob’s Deposit Transaction the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer b. Bob signs B->A and sends to Alice. 4. Forfeit Transactions: Alice promises to reveal pre-image r of H(R) before Δ B = Block 7 otherwise Alice -> Bob Bob -> Alice Transfer Transfer Bob gets all coins. 5. Commit Transaction: Invalidates the cancellation transaction - and commits both parties to the trade! Only valid after Δ cancel = Block 3 Block #1 Block #2 Block #3
Both Parties Alice -> Bob Cancellation Forfeit FORK-1 Transaction Commit To Atomic Trade Alice -> Bob Forfeit FORK-2 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit the respective fork if R of H(R) is revealed. Commitment a. Alice signs A->B and sends to Bob. Cancel Timer Transaction b. Bob signs B->A and sends to Alice. 4. Forfeit Transactions: Alice promises to reveal pre-image r of H(R) before Δ B = Block 7 otherwise Alice -> Bob Bob -> Alice Transfer Transfer Bob gets all coins. 5. Commit Transaction: Invalidates the cancellation transaction - and commits both parties to the trade! Only valid after Δ cancel = Block 3 Block #1 Block #2 Block #3
Both Parties Alice -> Bob Cancellation Forfeit FORK-1 Transaction Commit To Atomic Trade Alice -> Bob Forfeit FORK-2 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer b. Bob signs B->A and sends to Alice. 4. Forfeit Transactions: Alice promises to reveal Commitment pre-image r of H(R) before Δ B = Block 7 otherwise Alice -> Bob Alice -> Bob Bob -> Alice Transaction Transfer Transfer Transfer Bob gets all coins. 5. Commit Transaction: Invalidates the cancellation transaction - and commits both parties to the trade! Only valid after Δ cancel = Block 3 Block #1 Block #2 Block #3
Both Parties Alice -> Bob Cancellation Forfeit FORK-1 Transaction Commit To Atomic Trade Alice -> Bob Forfeit FORK-2 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer b. Bob signs B->A and sends to Alice. 4. Forfeit Transactions: Alice promises to reveal pre-image r of H(R) before Δ B = Block 7 otherwise Alice -> Bob Alice -> Bob Bob -> Alice Transfer Transfer Transfer Bob gets all coins. 5. Commit Transaction: Invalidates the cancellation transaction - and commits both parties to the trade! Commitment Transaction Only valid after Δ cancel = Block 3 Block #1 Block #2 Block #3
Both Parties Alice -> Bob Cancellation Forfeit FORK-1 Transaction Commit To Atomic Trade Alice -> Bob Forfeit FORK-2 1. Funding Transaction: Stores deposit of both Funding Transaction parties. 2. Cancellation Transaction : Refunds all parties before Δ cancel = Block 3 Alice’s Deposit a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in Bob’s Deposit the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. Cancel Timer b. Bob signs B->A and sends to Alice. 4. Forfeit Transactions: Alice promises to reveal pre-image r of H(R) before Δ B = Block 7 otherwise Alice -> Bob Alice -> Bob Bob -> Alice Transfer Transfer Transfer Bob gets all coins. 5. Commit Transaction: Invalidates the cancellation transaction - and commits both parties to the trade! Only valid after Δ cancel = Block 3 Commitment Transaction Block #1 Block #2 Block #3 Block #4
Briefly what has happened so far…? ● Funding Stage ○ Both parties deposit coins into the blockchain ● Setup Cancellation: ○ Bob will be able to cancel the atomic trade before Δ cancel ● Setup Atomic Trade: ○ Both Alice and Bob exchange Transfer transactions. ○ Alice must reveal a secret R of H(R) after Δ fork to trigger the trade ● Setup Alice’s Forfeit: ○ Alice sets up a forfeit - if she does not reveal R before then Δ B Bob can claim all the coins. ● Commit to Trade ○ Alice broadcasts a transaction after Δ cancel that commits both parties to the atomic trade. ● Atomic Trade ○ Alice reveals R after Δ fork and claims her coins in FORK-2 ○ Bob finds R and claims his coins in FORK-1
Alice -> Bob Wait for hardfork… Forfeit FORK-1 Alice -> Bob Forfeit FORK-2 1. Wait: Both parties must wait until the hardfork Funding Transaction activates. Alice’s Deposit Bob’s Deposit Cancel Timer Alice -> Bob Bob -> Alice Transfer Transfer Commitment Transaction Block #1 Block #2 Block #3 Block #4
Alice -> Bob Wait for hardfork… Forfeit FORK-1 Alice -> Bob Forfeit FORK-2 1. Wait: Both parties must wait until the hardfork Funding Transaction activates. Alice’s Deposit Bob’s Deposit Cancel Timer Alice -> Bob Alice -> Bob Bob -> Alice Transfer Transfer Transfer Commitment HARDFORK Transaction BLOCK Block #5 Block #1 Block #2 Block #3 Block #4
Alice -> Bob Alice triggers Trade Forfeit FORK-1 Alice -> Bob Forfeit FORK-2 1. Wait: Both parties must wait until the hardfork Funding Transaction activates. 2. Alice Triggers Trade. She broadcasts Bob -> Alice Transfer Transaction which also reveals the Alice’s Deposit pre-image R of H(R). Bob’s Deposit Cancel Timer Bob -> Alice Alice -> Bob Alice -> Bob Bob -> Alice Transfer Transfer Transfer Transfer FORK-1 Commitment HARDFORK Transaction BLOCK FORK-2 Block #5 Block #1 Block #2 Block #3 Block #4
Alice -> Bob Alice triggers Trade Forfeit FORK-1 Alice -> Bob Forfeit FORK-2 1. Wait: Both parties must wait until the hardfork Funding Transaction activates. 2. Alice Triggers Trade. She broadcasts Alice -> Bob transfer transaction and reveals pre-image R of Alice’s Deposit H(R). Bob’s Deposit Cancel Timer Alice -> Bob Transfer Bob -> Alice Transfer FORK-1 Commitment HARDFORK Transaction BLOCK FORK-2 Block #5 Block #1 Block #2 Block #3 Block #4
Alice -> Bob Alice triggers Trade Forfeit FORK-1 Alice -> Bob Forfeit FORK-2 1. Wait: Both parties must wait until the hardfork Funding Transaction activates. 2. Alice Triggers Trade. She broadcasts Alice -> Bob transfer transaction and reveals pre-image R of Alice’s Deposit H(R). Bob’s Deposit Cancel Timer Alice -> Bob Transfer FORK-1 Commitment HARDFORK Bob -> Alice Transaction BLOCK Transfer FORK-2 Block #5 Block #1 Block #2 Block #3 Block #4
Alice -> Bob Alice triggers Trade Forfeit FORK-1 Alice -> Bob Forfeit FORK-2 1. Wait: Both parties must wait until the hardfork Funding Transaction activates. 2. Alice Triggers Trade. She broadcasts Alice -> Bob transfer transaction and reveals pre-image R of Alice’s Deposit H(R). Bob’s Deposit Cancel Timer Alice -> Bob Transfer FORK-1 Commitment HARDFORK Transaction BLOCK Bob -> Alice Transfer FORK-2 Block #5 Block #1 Block #2 Block #3 Block #4
Alice -> Bob Alice triggers Trade Forfeit FORK-1 Alice -> Bob Forfeit FORK-2 1. Wait: Both parties must wait until the hardfork Funding Transaction activates. 2. Alice Triggers Trade: She broadcasts Alice -> Bob Transfer Transaction and reveals pre-image R Alice’s Deposit of H(R). Bob’s Deposit Cancel Timer Alice -> Bob Transfer FORK-1 Commitment HARDFORK Transaction BLOCK Bob -> Alice FORK-2 Block #5 Block #1 Block #2 Block #3 Block #4 Transfer
Alice -> Bob Bob claims his coins! Forfeit FORK-1 Alice -> Bob Forfeit FORK-2 1. Wait: Both parties must wait until the hardfork Funding Transaction activates. 2. Alice Triggers Trade: She broadcasts Alice -> Bob Transfer Transaction and reveals pre-image R Alice’s Deposit of H(R). 3. Bob Claims Coins: He finds R, and then Bob’s Deposit broadcasts Bob -> Alice Transfer Transaction. Cancel Timer Alice -> Bob Transfer FORK-1 Commitment HARDFORK Transaction BLOCK Bob -> Alice FORK-2 Block #5 Block #1 Block #2 Block #3 Block #4 Transfer
Alice -> Bob Bob claims his coins! Forfeit FORK-1 Alice -> Bob Forfeit FORK-2 1. Wait: Both parties must wait until the hardfork Funding Transaction activates. 2. Alice Triggers Trade: She broadcasts Alice -> Bob Transfer Transaction and reveals pre-image R Alice’s Deposit of H(R). 3. Bob Claims Coins: He finds R, and then Bob’s Deposit broadcasts Bob -> Alice Transfer Transaction. Cancel Timer Alice -> Bob Transfer FORK-1 Commitment HARDFORK Transaction BLOCK Bob -> Alice FORK-2 Block #5 Block #1 Block #2 Block #3 Block #4 Transfer
Alice -> Bob Bob claims his coins! Forfeit FORK-1 Alice -> Bob Forfeit FORK-2 1. Wait: Both parties must wait until the hardfork Funding Transaction activates. 2. Alice Triggers Trade: She broadcasts Alice -> Bob Transfer Transaction and reveals pre-image R Alice’s Deposit of H(R). 3. Bob Claims Coins: He finds R, and then Bob’s Deposit broadcasts Bob -> Alice Transfer Transaction. Cancel Timer Alice -> Bob FORK-1 Transfer Commitment HARDFORK Transaction BLOCK Bob -> Alice FORK-2 Block #5 Block #1 Block #2 Block #3 Block #4 Transfer
Alice -> Bob Bob claims his coins! Forfeit FORK-1 Alice -> Bob Forfeit FORK-2 1. Wait: Both parties must wait until the hardfork Funding Transaction activates. 2. Alice Triggers Trade: She broadcasts Alice -> Bob Transfer Transaction and reveals pre-image R Alice’s Deposit of H(R). 3. Bob Claims Coins: He finds R, and then Bob’s Deposit broadcasts Bob -> Alice Transfer Transaction. Cancel Timer Alice -> Bob FORK-1 Transfer Commitment HARDFORK Transaction BLOCK Bob -> Alice FORK-2 Block #5 Block #1 Block #2 Block #3 Block #4 Transfer
Alice -> Bob Bob claims his coins! Forfeit FORK-1 Alice -> Bob Forfeit FORK-2 1. Wait: Both parties must wait until the hardfork Funding Transaction activates. 2. Alice Triggers Trade: She broadcasts Alice -> Bob Transfer Transaction and reveals pre-image R Alice’s Deposit of H(R). 3. Bob Claims Coins: He finds R, and then Bob’s Deposit broadcasts Bob -> Alice Transfer Transaction. Cancel Timer Alice -> FORK-1 Bob Transfer Commitment HARDFORK Transaction BLOCK Bob -> Alice FORK-2 Block #5 Block #1 Block #2 Block #3 Block #4 Transfer
All done! 1. Wait: Both parties must wait until the hardfork Funding Transaction activates. 2. Alice Triggers Trade: She broadcasts Alice -> Bob Transfer Transaction and reveals pre-image R Alice’s Deposit of H(R). 3. Bob Claims Coins: He finds R, and then Bob’s Deposit broadcasts Bob -> Alice Transfer Transaction. 4. All done! Cancel Timer Alice -> FORK-1 Bob Transfer Commitment HARDFORK Transaction BLOCK Bob -> Alice FORK-2 Block #5 Block #1 Block #2 Block #3 Block #4 Transfer
What are the problems? ● Elaborate ○ Four off-chain transaction required to set it up (and the bitcoin script is somewhat complex too) ● Potential to lock coins for long time ○ If Alice doesn’t sign cancellation transaction, then coins are locked up and eventually refunded after the hardfork. ● Hardfork Time must be FIXED. ○ If the hardfork is delayed after setup - Bob can potentially run away with all the coins! …… What if Transaction Malleability is fixed? paddyncl
Create 3 Transactions Alice claims coins in fork-2 1. Create Transactions: One party (i.e. Alice) creates To Bob Funding Transaction Funding Transaction, and both Transfer Transactions. Bob claims coins in fork-1 Both Deposits To Alice
Sign Transfer Transactions Alice claims coins in fork-2 1. Create Transactions: One party (i.e. Alice) creates � A � B To Bob Funding Transaction Funding Transaction, and both Transfer Transactions. Bob claims coins in fork-1 2. Sign Transfers: Both parties sign the transfer Both Deposits transactions off-chain. � A � B To Alice
Both Parties Sign and Publish Funding Tx Alice claims coins in fork-2 1. Create Transactions: One party (i.e. Alice) creates � A � B To Bob Funding Transaction Funding Transaction, and both Transfer Transactions. Bob claims coins in fork-1 2. Sign Transfers: Both parties sign the transfer Both Deposits transactions off-chain. � A � B 3. Sign/Publish Deposit: Both parties sign Funding To Alice Transaction and publish to the blockchain. Block #1
Both Parties Sign and Publish Funding Tx Alice claims coins in fork-2 1. Create Transactions: One party (i.e. Alice) creates � A � B To Bob Funding Transaction Funding Transaction, and both Transfer Transactions. Bob claims coins in fork-1 2. Sign Transfers: Both parties sign the transfer Both Deposits transactions off-chain. � A � B 3. Sign/Publish Deposit: Both parties sign Funding To Alice Transaction and publish to the blockchain. Block #1
Both Parties Sign and Publish Funding Tx Alice claims coins in fork-2 1. Create Transactions: One party (i.e. Alice) creates � A � B To Bob Funding Transaction Funding Transaction, and both Transfer Transactions. Bob claims coins in fork-1 2. Sign Transfers: Both parties sign the transfer Both Deposits transactions off-chain. � A � B 3. Sign/Publish Deposit: Both parties sign Funding To Alice Transaction and publish to the blockchain. Block #1
Both Parties Sign and Publish Funding Tx Alice claims coins in fork-2 1. Create Transactions: One party (i.e. Alice) creates � A � B To Bob Funding Transaction Funding Transaction, and both Transfer Transactions. Bob claims coins in fork-1 2. Sign Transfers: Both parties sign the transfer Both Deposits transactions off-chain. � A � B 3. Sign/Publish Deposit: Both parties sign Funding To Alice Transaction and publish to the blockchain. Block #1
Both Parties Sign and Publish Funding Tx Alice claims coins in fork-2 1. Create Transactions: One party (i.e. Alice) creates � A � B To Bob Funding Transaction Funding Transaction, and both Transfer Transactions. Bob claims coins in fork-1 2. Sign Transfers: Both parties sign the transfer Both Deposits transactions off-chain. � A � B 3. Sign/Publish Deposit: Both parties sign Funding To Alice Transaction and publish to the blockchain. Block #1
Wait for hardfork Alice claims coins in fork-2 1. Create Transactions: One party (i.e. Alice) creates � A � B To Bob Funding Transaction Funding Transaction, and both Transfer Transactions. Bob claims coins in fork-1 2. Sign Transfers: Both parties sign the transfer Both Deposits transactions off-chain. � A � B 3. Sign/Publish Deposit: Both parties sign Funding To Alice Transaction and publish to the blockchain. 4. Wait: Must wait for hardfork to activate Block #1 Block #2
Wait for hardfork Alice claims coins in fork-2 1. Create Transactions: One party (i.e. Alice) creates � A � B To Bob Funding Transaction Funding Transaction, and both Transfer Transactions. Bob claims coins in fork-1 2. Sign Transfers: Both parties sign the transfer Both Deposits transactions off-chain. � A � B 3. Sign/Publish Deposit: Both parties sign Funding To Alice Transaction and publish to the blockchain. 4. Wait: Must wait for hardfork to activate Block #1 Block #2 Block #3
Wait for hardfork Alice -> Bob Transfer 1. Create Transactions: One party (i.e. Alice) creates � A � B To Bob Funding Transaction Funding Transaction, and both Transfer Transactions. Bob -> Alice Transfer 2. Sign Transfers: Both parties sign the transfer Both Deposits transactions off-chain. � A � B 3. Sign/Publish Deposit: Both parties sign Funding To Alice Transaction and publish to the blockchain. 4. Wait: Must wait for hardfork to activate HARDFORK BLOCK Block #5 Block #1 Block #2 Block #3 Block #4
Both parties can claim after hardfork! Alice 1. Create Transactions: One party (i.e. Alice) creates claims Funding Transaction Funding Transaction, and both Transfer coins in Transactions. fork-2 2. Sign Transfers: Both parties sign the transfer Both Deposits transactions off-chain. Bob 3. Sign/Publish Deposit: Both parties sign Funding claims Transaction and publish to the blockchain. coins in 4. Wait: Must wait for hardfork to activate fork-1 5. Claim: Both parties claim coins in respective blockchain. FORK-1 HARDFORK BLOCK FORK-2 Block #5 Block #1 Block #2 Block #3 Block #4
Both parties can claim after hardfork! 1. Create Transactions: One party (i.e. Alice) creates Funding Transaction Funding Transaction, and both Transfer Transactions. Alice 2. Sign Transfers: Both parties sign the transfer Both Deposits claims transactions off-chain. coins in Bob 3. Sign/Publish Deposit: Both parties sign Funding fork-2 claims Transaction and publish to the blockchain. coins in 4. Wait: Must wait for hardfork to activate fork-1 5. Claim: Both parties claim coins in respective blockchain. FORK-1 HARDFORK BLOCK FORK-2 Block #5 Block #1 Block #2 Block #3 Block #4
Both parties can claim after hardfork! 1. Create Transactions: One party (i.e. Alice) creates Funding Transaction Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer Both Deposits transactions off-chain. Bob 3. Sign/Publish Deposit: Both parties sign Funding claims Transaction and publish to the blockchain. coins in Alice 4. Wait: Must wait for hardfork to activate fork-1 claims 5. Claim: Both parties claim coins in respective coins in blockchain. fork-2 FORK-1 HARDFORK BLOCK FORK-2 Block #5 Block #1 Block #2 Block #3 Block #4
Both parties can claim after hardfork! 1. Create Transactions: One party (i.e. Alice) creates Funding Transaction Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer Both Deposits transactions off-chain. Bob 3. Sign/Publish Deposit: Both parties sign Funding claims Transaction and publish to the blockchain. coins in 4. Wait: Must wait for hardfork to activate fork-1 5. Claim: Both parties claim coins in respective blockchain. Alice claims coins in FORK-1 fork-2 HARDFORK BLOCK FORK-2 Block #5 Block #1 Block #2 Block #3 Block #4
Both parties can claim after hardfork! 1. Create Transactions: One party (i.e. Alice) creates Funding Transaction Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer Both Deposits transactions off-chain. Bob 3. Sign/Publish Deposit: Both parties sign Funding claims Transaction and publish to the blockchain. coins in 4. Wait: Must wait for hardfork to activate fork-1 5. Claim: Both parties claim coins in respective blockchain. FORK-1 HARDFORK BLOCK Alice claims FORK-2 Block #5 Block #1 Block #2 Block #3 Block #4 coins in fork-2
Both parties can claim after hardfork! 1. Create Transactions: One party (i.e. Alice) creates Funding Transaction Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer Both Deposits transactions off-chain. Bob 3. Sign/Publish Deposit: Both parties sign Funding claims Transaction and publish to the blockchain. coins in 4. Wait: Must wait for hardfork to activate fork-1 5. Claim: Both parties claim coins in respective blockchain. FORK-1 HARDFORK BLOCK Alice claims FORK-2 Block #5 Block #1 Block #2 Block #3 Block #4 coins in fork-2
Both parties can claim after hardfork! 1. Create Transactions: One party (i.e. Alice) creates Funding Transaction Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer Both Deposits transactions off-chain. 3. Sign/Publish Deposit: Both parties sign Funding Transaction and publish to the blockchain. Bob claims 4. Wait: Must wait for hardfork to activate coins in 5. Claim: Both parties claim coins in respective fork-1 blockchain. FORK-1 HARDFORK BLOCK Alice claims FORK-2 Block #5 Block #1 Block #2 Block #3 Block #4 coins in fork-2
Both parties can claim after hardfork! 1. Create Transactions: One party (i.e. Alice) creates Funding Transaction Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer Both Deposits transactions off-chain. 3. Sign/Publish Deposit: Both parties sign Funding Transaction and publish to the blockchain. 4. Wait: Must wait for hardfork to activate Bob 5. Claim: Both parties claim coins in respective claims blockchain. coins in fork-1 FORK-1 HARDFORK BLOCK Alice claims FORK-2 Block #5 Block #1 Block #2 Block #3 Block #4 coins in fork-2
Both parties can claim after hardfork! 1. Create Transactions: One party (i.e. Alice) creates Funding Transaction Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer Both Deposits transactions off-chain. 3. Sign/Publish Deposit: Both parties sign Funding Transaction and publish to the blockchain. 4. Wait: Must wait for hardfork to activate 5. Claim: Both parties claim coins in respective blockchain. Bob claims coins in FORK-1 fork-1 HARDFORK BLOCK Alice claims FORK-2 Block #5 Block #1 Block #2 Block #3 Block #4 coins in fork-2
Recommend
More recommend