Atomically Trading with Roger: Gambling on the success of a - - PowerPoint PPT Presentation

atomically trading with roger gambling on the success of
SMART_READER_LITE
LIVE PREVIEW

Atomically Trading with Roger: Gambling on the success of a - - PowerPoint PPT Presentation

paddyncl Atomically Trading with Roger: Gambling on the success of a hardfork* Patrick McCorry, Ethan Heilman, Andrew Miller *Acknowledgement: We thank Roger Ver for letting us use his name in the papers title. paddyncl What is interesting


slide-1
SLIDE 1

Atomically Trading with Roger: Gambling on the success of a hardfork*

Patrick McCorry, Ethan Heilman, Andrew Miller

*Acknowledgement: We thank Roger Ver for letting us use his name in the paper’s title.

paddyncl

slide-2
SLIDE 2

What is interesting in the paper?

  • Brief history on soft and hard forks in Bitcoin/Ethereum.
  • An overview of replay protection proposals (including a new one we call

migration inputs)

  • This Talk: Hard Fork Atomic Trade Protocols for Bitcoin

○ How to set up trade prior to hardfork and perform it once hardfork occurs. ○

With and Without a transaction malleability fix!

  • Hard Fork Atomic Trade Protocol for Ethereum

○ How to use a Hardfork Oracle to set up and perform the atomic trade. I hope to leave everyone with one message: Transaction malleability *was* a pain in the ass and designing bitcoin contracts that accounts for malleability is non-trivial.

paddyncl

slide-3
SLIDE 3

Loaded Challenges Roger (and he accepts)

paddyncl

slide-4
SLIDE 4

paddyncl

Loaded didn’t want to use an escrow.

slide-5
SLIDE 5

paddyncl

Eventually.. I seen Ethan tweeting about the bet…

slide-6
SLIDE 6

Atomically Trade across two forks

Alice Bob

paddyncl

slide-7
SLIDE 7

Atomically Trade across two forks

Alice Bob 1. Deposit coins into a single transaction. Alices Deposit Bobs Deposit

paddyncl

slide-8
SLIDE 8

Atomically Trade across two forks

Alice Bob 1. Deposit coins into a single transaction. Alices Deposit Bobs Deposit

paddyncl

slide-9
SLIDE 9

Atomically Trade across two forks

Alice Bob 1. Deposit coins into a single transaction. Alices Deposit Bobs Deposit

paddyncl

slide-10
SLIDE 10

Atomically Trade across two forks

Alice Bob 1. Deposit coins into a single transaction. Alices Deposit Bobs Deposit

paddyncl

slide-11
SLIDE 11

Atomically Trade across two forks

Alice Bob 1. Deposit coins into a single transaction. Alices Deposit Bobs Deposit

paddyncl

slide-12
SLIDE 12

Atomically Trade across two forks

Alice Bob 1. Deposit coins into a single transaction. Alices Deposit Bobs Deposit

paddyncl

slide-13
SLIDE 13

Atomically Trade across two forks

Alice Bob 1. Deposit coins into a single transaction. Alices Deposit Bobs Deposit

paddyncl

slide-14
SLIDE 14

Atomically Trade across two forks

Alice Bob 1. Deposit coins into a single transaction. Alices Deposit Bobs Deposit

paddyncl

slide-15
SLIDE 15

HARDFORK BLOCK

Atomically Trade across two forks

Alice Bob 1. Deposit coins into a single transaction. 2. HARDFORK ACTIVATES Alices Deposit Bobs Deposit

paddyncl

slide-16
SLIDE 16

HARDFORK BLOCK

Atomically Trade across two forks

Alice Bob 1. Deposit coins into a single transaction. 2. HARDFORK ACTIVATES 3. Alice withdraws both coins in FORK-2 FORK-1 FORK-2 Alices Deposit Bobs Deposit

paddyncl

slide-17
SLIDE 17

HARDFORK BLOCK

Atomically Trade across two forks

Alice Bob 1. Deposit coins into a single transaction. 2. HARDFORK ACTIVATES 3. Alice withdraws both coins in FORK-2 4. Bob withdraws both coins in FORK-1 FORK-1 FORK-2 Alices Deposit Bobs Deposit

slide-18
SLIDE 18

HARDFORK BLOCK

Atomically Trade across two forks

Alice Bob 1. Deposit coins into a single transaction. 2. HARDFORK ACTIVATES 3. Alice withdraws both coins in FORK-2 4. Bob withdraws both coins in FORK-1 FORK-1 FORK-2 Alices Deposit Bobs Deposit

slide-19
SLIDE 19

HARDFORK BLOCK

Atomically Trade across two forks

Alice Bob 1. Deposit coins into a single transaction. 2. HARDFORK ACTIVATES 3. Alice withdraws both coins in FORK-2 4. Bob withdraws both coins in FORK-1 FORK-1 FORK-2 Alices Deposit Bobs Deposit

slide-20
SLIDE 20

HARDFORK BLOCK

Atomically Trade across two forks

Alice Bob 1. Deposit coins into a single transaction. 2. HARDFORK ACTIVATES 3. Alice withdraws both coins in FORK-2 4. Bob withdraws both coins in FORK-1 FORK-1 FORK-2 Alices Deposit Bobs Deposit

slide-21
SLIDE 21

With and Without a Transaction Malleability fix

  • Transaction malleability

○ The identification hash of a transaction (i.e. transaction id) can is malleable (i.e. changable) any time before it is accepted into the blockchain. ○ It is not safe to sign a chain of unconfirmed transactions.

  • Without Transaction Malleability fix

○ Deposit must be stored in the blockchain - before both parties can sign atomic trade

  • With Transaction Malleability Fix

○ All atomic trade transactions can be signed before the deposit is stored in the blockchain

… Small difference? Huge implications for bitcoin contract design.

slide-22
SLIDE 22

Atomically Trade across two forks without a fix for transaction malleability?

  • 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

slide-23
SLIDE 23

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Funding Stage

1. Funding Transaction: Stores deposit of both parties.

Block #1

slide-24
SLIDE 24

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Funding Stage

1. Funding Transaction: Stores deposit of both parties.

Block #1

slide-25
SLIDE 25

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Funding Stage

1. Funding Transaction: Stores deposit of both parties.

Block #1

slide-26
SLIDE 26

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Funding Stage

1. Funding Transaction: Stores deposit of both parties.

Block #1

slide-27
SLIDE 27

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Funding Stage

1. Funding Transaction: Stores deposit of both parties.

Block #1

slide-28
SLIDE 28

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Cancellation

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3

Block #1 Refund Alice Refund Bob Cancellation Transaction

slide-29
SLIDE 29

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Cancellation

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 ○ Signed by Alice and sent to Bob

Block #1 Refund Alice Refund Bob Cancellation Transaction

A A A

Why do we NEED a cancellation transaction?! Later on, Alice will commit to reveal R of H(R). If R is not revealed - she’ll forfeit all coins to Bob. If Alice refuses to make this commitment… This transaction lets Bob cancel the atomic trade altogether.

slide-30
SLIDE 30

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Cancellation

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 ○ Signed by Alice and sent to Bob

Block #1 Refund Alice Refund Bob Cancellation Transaction

A A A

slide-31
SLIDE 31

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Cancellation

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 ○ Signed by Alice and sent to Bob

Block #1 Cancellation Transaction

slide-32
SLIDE 32

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Cancellation

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 ○ Signed by Alice and sent to Bob

Block #1 Cancellation Transaction

slide-33
SLIDE 33

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Cancellation

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 ○ Signed by Alice and sent to Bob

Block #1 Cancellation Transaction

slide-34
SLIDE 34

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Cancellation

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 ○ Signed by Alice and sent to Bob

Block #1 Cancellation Transaction

slide-35
SLIDE 35

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Atomic Trade

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed.

Block #1 Cancellation Transaction

slide-36
SLIDE 36

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Atomic Trade

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob.

Block #1 Cancellation Transaction To Bob Alice -> Bob Transfer

A A

slide-37
SLIDE 37

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Atomic Trade

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob.

Block #1 Cancellation Transaction To Bob Alice -> Bob Transfer

A A Condition in Alice -> Bob Transfer: Alice: “You can claim these coins Bob, if I reveal the secret R of H(R)”.

slide-38
SLIDE 38

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Atomic Trade

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob.

Block #1 Cancellation Transaction To Bob Alice -> Bob Transfer

A A

slide-39
SLIDE 39

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Atomic Trade

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob.

Block #1 Cancellation Transaction Alice -> Bob Transfer

slide-40
SLIDE 40

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Atomic Trade

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob.

Block #1 Cancellation Transaction Alice -> Bob Transfer

slide-41
SLIDE 41

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Atomic Trade

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob.

Block #1 Cancellation Transaction Alice -> Bob Transfer

slide-42
SLIDE 42

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Atomic Trade

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob.

Block #1 Cancellation Transaction Alice -> Bob Transfer

slide-43
SLIDE 43

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Atomic Trade

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob.

Block #1 Cancellation Transaction Alice -> Bob Transfer

slide-44
SLIDE 44

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Atomic Trade

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. b. Bob signs B->A and sends to Alice.

Block #1 Cancellation Transaction To Alice Bob -> Alice Transfer

B B

Alice -> Bob Transfer

slide-45
SLIDE 45

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Atomic Trade

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. b. Bob signs B->A and sends to Alice.

Block #1 Cancellation Transaction To Alice Bob -> Alice Transfer

B B Condition in Bob -> Alice Transfer: Bob: “You can claim these coins Alice, if I reveal the secret R of H(R)”. **REPLAY PROTECTION REQUIRED**

Alice -> Bob Transfer

slide-46
SLIDE 46

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Atomic Trade

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. b. Bob signs B->A and sends to Alice.

Block #1 Cancellation Transaction Bob -> Alice Transfer Alice -> Bob Transfer

slide-47
SLIDE 47

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Atomic Trade

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. b. Bob signs B->A and sends to Alice.

Block #1 Cancellation Transaction Bob -> Alice Transfer Alice -> Bob Transfer

slide-48
SLIDE 48

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Atomic Trade

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. b. Bob signs B->A and sends to Alice.

Block #1 Cancellation Transaction Bob -> Alice Transfer Alice -> Bob Transfer

slide-49
SLIDE 49

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Atomic Trade

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. b. Bob signs B->A and sends to Alice.

Block #1 Cancellation Transaction Bob -> Alice Transfer Alice -> Bob Transfer

slide-50
SLIDE 50

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Alice’s Forfeit

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. 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 Bob gets all coins.

Block #1 Cancellation Transaction Bob -> Alice Transfer To Bob Alice -> Bob Forfeit FORK-1

A A

Alice -> Bob Transfer

slide-51
SLIDE 51

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Alice’s Forfeit

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. 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 Bob gets all coins.

Block #1 Cancellation Transaction Alice -> Bob Transfer Bob -> Alice Transfer Alice -> Bob Forfeit FORK-1

slide-52
SLIDE 52

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Alice’s Forfeit

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. 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 Bob gets all coins.

Block #1 Cancellation Transaction Alice -> Bob Transfer Bob -> Alice Transfer Alice -> Bob Forfeit FORK-1

slide-53
SLIDE 53

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Alice’s Forfeit

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. 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 Bob gets all coins.

Block #1 Cancellation Transaction Alice -> Bob Transfer Bob -> Alice Transfer Alice -> Bob Forfeit FORK-1

slide-54
SLIDE 54

Bob -> Alice Transfer Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Alice’s Forfeit

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. 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 Bob gets all coins.

Block #1 Cancellation Transaction Alice -> Bob Transfer Alice -> Bob Forfeit FORK-1

slide-55
SLIDE 55

Bob -> Alice Transfer Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Alice’s Forfeit

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. 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 Bob gets all coins.

Block #1 Cancellation Transaction Alice -> Bob Transfer To Bob Alice -> Bob Forfeit FORK-2

A A

Alice -> Bob Forfeit FORK-1

slide-56
SLIDE 56

Bob -> Alice Transfer Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Alice’s Forfeit

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. 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 Bob gets all coins.

Block #1 Cancellation Transaction Alice -> Bob Transfer Alice -> Bob Forfeit FORK-2 Alice -> Bob Forfeit FORK-1

slide-57
SLIDE 57

Bob -> Alice Transfer Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Alice’s Forfeit

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. 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 Bob gets all coins.

Block #1 Cancellation Transaction Alice -> Bob Transfer Alice -> Bob Forfeit FORK-2 Alice -> Bob Forfeit FORK-1

slide-58
SLIDE 58

Bob -> Alice Transfer Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Alice’s Forfeit

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. 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 Bob gets all coins.

Block #1 Cancellation Transaction Alice -> Bob Transfer Alice -> Bob Forfeit FORK-1 Alice -> Bob Forfeit FORK-2

slide-59
SLIDE 59

Bob -> Alice Transfer Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Setup Alice’s Forfeit

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. 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 Bob gets all coins.

Block #1 Cancellation Transaction Block #2 Alice -> Bob Transfer Alice -> Bob Forfeit FORK-1 Alice -> Bob Forfeit FORK-2

slide-60
SLIDE 60

Bob -> Alice Transfer Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Both Parties Commit To Atomic Trade

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. 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 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 Cancellation Transaction Block #2 Block #3 Alice -> Bob Transfer Alice -> Bob Forfeit FORK-1 Alice -> Bob Forfeit FORK-2

slide-61
SLIDE 61

Bob -> Alice Transfer Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. 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 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 Cancellation Transaction Block #2 Block #3 Anywhere Commit Transaction

A

Alice -> Bob Transfer

Both Parties Commit To Atomic Trade

Alice -> Bob Forfeit FORK-1 Alice -> Bob Forfeit FORK-2

slide-62
SLIDE 62

Bob -> Alice Transfer Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. 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 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 Cancellation Transaction Block #2 Block #3 Commitment Transaction Alice -> Bob Transfer

Both Parties Commit To Atomic Trade

Alice -> Bob Forfeit FORK-1 Alice -> Bob Forfeit FORK-2

slide-63
SLIDE 63

Bob -> Alice Transfer Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. 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 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 Cancellation Transaction Block #2 Block #3 Commitment Transaction Alice -> Bob Transfer

Both Parties Commit To Atomic Trade

Alice -> Bob Forfeit FORK-1 Alice -> Bob Forfeit FORK-2

slide-64
SLIDE 64

Bob -> Alice Transfer Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. 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 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 Cancellation Transaction Alice -> Bob Transfer Block #2 Block #3 Commitment Transaction Alice -> Bob Transfer

Both Parties Commit To Atomic Trade

Alice -> Bob Forfeit FORK-1 Alice -> Bob Forfeit FORK-2

slide-65
SLIDE 65

Bob -> Alice Transfer Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. 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 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 Cancellation Transaction Alice -> Bob Transfer Block #2 Block #3 Commitment Transaction Alice -> Bob Transfer

Both Parties Commit To Atomic Trade

Alice -> Bob Forfeit FORK-1 Alice -> Bob Forfeit FORK-2

slide-66
SLIDE 66

Bob -> Alice Transfer Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

1. Funding Transaction: Stores deposit of both parties. 2. Cancellation Transaction: Refunds all parties before Δcancel = Block 3 a. Signed by Alice and sent to Bob 3. Transfer Transactions: Sends each party coins in the respective fork if R of H(R) is revealed. a. Alice signs A->B and sends to Bob. 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 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 Cancellation Transaction Alice -> Bob Transfer Block #2 Block #3

Commitment Transaction

Block #4 Alice -> Bob Transfer

Both Parties Commit To Atomic Trade

Alice -> Bob Forfeit FORK-1 Alice -> Bob Forfeit FORK-2

slide-67
SLIDE 67

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

slide-68
SLIDE 68

Bob -> Alice Transfer Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Wait for hardfork…

1. Wait: Both parties must wait until the hardfork activates.

Block #1 Alice -> Bob Transfer Block #2 Block #3

Commitment Transaction

Block #4 Alice -> Bob Forfeit FORK-1 Alice -> Bob Forfeit FORK-2

slide-69
SLIDE 69

Bob -> Alice Transfer Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Wait for hardfork…

1. Wait: Both parties must wait until the hardfork activates.

Block #1 Alice -> Bob Transfer Block #2 Block #3

Commitment Transaction

Block #4

HARDFORK BLOCK

Block #5 Alice -> Bob Transfer Alice -> Bob Forfeit FORK-1 Alice -> Bob Forfeit FORK-2

slide-70
SLIDE 70

Bob -> Alice Transfer Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Alice triggers Trade

1. Wait: Both parties must wait until the hardfork activates. 2. Alice Triggers Trade. She broadcasts Bob -> Alice Transfer Transaction which also reveals the pre-image R of H(R).

Block #1 Alice -> Bob Transfer Block #2 Block #3

Commitment Transaction

Block #4

HARDFORK BLOCK

Block #5 Bob -> Alice Transfer Alice -> Bob Transfer

FORK-1 FORK-2

Alice -> Bob Forfeit FORK-1 Alice -> Bob Forfeit FORK-2

slide-71
SLIDE 71

Alice -> Bob Transfer Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Alice triggers Trade

1. Wait: Both parties must wait until the hardfork activates. 2. Alice Triggers Trade. She broadcasts Alice -> Bob transfer transaction and reveals pre-image R of H(R).

Block #1 Block #2 Block #3

Commitment Transaction

Block #4

HARDFORK BLOCK

Block #5 Bob -> Alice Transfer

FORK-1 FORK-2

Alice -> Bob Forfeit FORK-1 Alice -> Bob Forfeit FORK-2

slide-72
SLIDE 72

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Alice triggers Trade

1. Wait: Both parties must wait until the hardfork activates. 2. Alice Triggers Trade. She broadcasts Alice -> Bob transfer transaction and reveals pre-image R of H(R).

Block #1 Block #2 Block #3

Commitment Transaction

Block #4

HARDFORK BLOCK

Block #5 Bob -> Alice Transfer Alice -> Bob Transfer

FORK-1 FORK-2

Alice -> Bob Forfeit FORK-1 Alice -> Bob Forfeit FORK-2

slide-73
SLIDE 73

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Alice triggers Trade

1. Wait: Both parties must wait until the hardfork activates. 2. Alice Triggers Trade. She broadcasts Alice -> Bob transfer transaction and reveals pre-image R of H(R).

Block #1 Block #2 Block #3

Commitment Transaction

Block #4

HARDFORK BLOCK

Block #5 Bob -> Alice Transfer Alice -> Bob Transfer

FORK-1 FORK-2

Alice -> Bob Forfeit FORK-1 Alice -> Bob Forfeit FORK-2

slide-74
SLIDE 74

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Alice triggers Trade

1. Wait: Both parties must wait until the hardfork activates. 2. Alice Triggers Trade: She broadcasts Alice -> Bob Transfer Transaction and reveals pre-image R

  • f H(R).

Block #1 Block #2 Block #3

Commitment Transaction

Block #4

HARDFORK BLOCK

Block #5 Bob -> Alice Transfer

FORK-1 FORK-2

Alice -> Bob Transfer Alice -> Bob Forfeit FORK-1 Alice -> Bob Forfeit FORK-2

slide-75
SLIDE 75

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Bob claims his coins!

1. Wait: Both parties must wait until the hardfork activates. 2. Alice Triggers Trade: She broadcasts Alice -> Bob Transfer Transaction and reveals pre-image R

  • f H(R).

3. Bob Claims Coins: He finds R, and then broadcasts Bob -> Alice Transfer Transaction.

Block #1 Alice -> Bob Transfer Block #2 Block #3

Commitment Transaction

Block #4

HARDFORK BLOCK

Block #5 Bob -> Alice Transfer

FORK-1 FORK-2

Alice -> Bob Forfeit FORK-1 Alice -> Bob Forfeit FORK-2

slide-76
SLIDE 76

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Bob claims his coins!

1. Wait: Both parties must wait until the hardfork activates. 2. Alice Triggers Trade: She broadcasts Alice -> Bob Transfer Transaction and reveals pre-image R

  • f H(R).

3. Bob Claims Coins: He finds R, and then broadcasts Bob -> Alice Transfer Transaction.

Block #1 Block #2 Block #3

Commitment Transaction

Block #4

HARDFORK BLOCK

Block #5 Alice -> Bob Transfer Bob -> Alice Transfer

FORK-1 FORK-2

Alice -> Bob Forfeit FORK-1 Alice -> Bob Forfeit FORK-2

slide-77
SLIDE 77

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Bob claims his coins!

1. Wait: Both parties must wait until the hardfork activates. 2. Alice Triggers Trade: She broadcasts Alice -> Bob Transfer Transaction and reveals pre-image R

  • f H(R).

3. Bob Claims Coins: He finds R, and then broadcasts Bob -> Alice Transfer Transaction.

Block #1 Block #2 Block #3

Commitment Transaction

Block #4

HARDFORK BLOCK

Block #5 Alice -> Bob Transfer Bob -> Alice Transfer

FORK-1 FORK-2

Alice -> Bob Forfeit FORK-1 Alice -> Bob Forfeit FORK-2

slide-78
SLIDE 78

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Bob claims his coins!

1. Wait: Both parties must wait until the hardfork activates. 2. Alice Triggers Trade: She broadcasts Alice -> Bob Transfer Transaction and reveals pre-image R

  • f H(R).

3. Bob Claims Coins: He finds R, and then broadcasts Bob -> Alice Transfer Transaction.

Block #1 Block #2 Block #3

Commitment Transaction

Block #4

HARDFORK BLOCK

Block #5 Alice -> Bob Transfer

FORK-1 FORK-2

Bob -> Alice Transfer Alice -> Bob Forfeit FORK-1 Alice -> Bob Forfeit FORK-2

slide-79
SLIDE 79

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

Bob claims his coins!

1. Wait: Both parties must wait until the hardfork activates. 2. Alice Triggers Trade: She broadcasts Alice -> Bob Transfer Transaction and reveals pre-image R

  • f H(R).

3. Bob Claims Coins: He finds R, and then broadcasts Bob -> Alice Transfer Transaction.

Block #1 Block #2 Block #3

Commitment Transaction

Block #4

HARDFORK BLOCK

Block #5 Alice -> Bob Transfer

FORK-1 FORK-2

Bob -> Alice Transfer Alice -> Bob Forfeit FORK-1 Alice -> Bob Forfeit FORK-2

slide-80
SLIDE 80

Alice’s Deposit Bob’s Deposit Cancel Timer Funding Transaction

All done!

1. Wait: Both parties must wait until the hardfork activates. 2. Alice Triggers Trade: She broadcasts Alice -> Bob Transfer Transaction and reveals pre-image R

  • f H(R).

3. Bob Claims Coins: He finds R, and then broadcasts Bob -> Alice Transfer Transaction. 4. All done!

Block #1 Block #2 Block #3

Commitment Transaction

Block #4

HARDFORK BLOCK

Block #5 Alice -> Bob Transfer

FORK-1 FORK-2

Bob -> Alice Transfer

slide-81
SLIDE 81

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

slide-82
SLIDE 82

Both Deposits Funding Transaction

Create 3 Transactions

1. Create Transactions: One party (i.e. Alice) creates Funding Transaction, and both Transfer Transactions.

To Bob Alice claims coins in fork-2 To Alice Bob claims coins in fork-1

slide-83
SLIDE 83

Both Deposits Funding Transaction

Sign Transfer Transactions

1. Create Transactions: One party (i.e. Alice) creates Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer transactions off-chain.

To Bob Alice claims coins in fork-2

AB

To Alice Bob claims coins in fork-1

AB

slide-84
SLIDE 84

Both Deposits Funding Transaction

Both Parties Sign and Publish Funding Tx

1. Create Transactions: One party (i.e. Alice) creates Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer transactions off-chain. 3. Sign/Publish Deposit: Both parties sign Funding Transaction and publish to the blockchain.

Block #1 To Bob Alice claims coins in fork-2

AB

To Alice Bob claims coins in fork-1

AB

slide-85
SLIDE 85

Both Deposits Funding Transaction

Both Parties Sign and Publish Funding Tx

1. Create Transactions: One party (i.e. Alice) creates Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer transactions off-chain. 3. Sign/Publish Deposit: Both parties sign Funding Transaction and publish to the blockchain.

Block #1 To Bob Alice claims coins in fork-2

AB

To Alice Bob claims coins in fork-1

AB

slide-86
SLIDE 86

Both Deposits Funding Transaction

Both Parties Sign and Publish Funding Tx

1. Create Transactions: One party (i.e. Alice) creates Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer transactions off-chain. 3. Sign/Publish Deposit: Both parties sign Funding Transaction and publish to the blockchain.

Block #1 To Bob Alice claims coins in fork-2

AB

To Alice Bob claims coins in fork-1

AB

slide-87
SLIDE 87

Both Deposits Funding Transaction

Both Parties Sign and Publish Funding Tx

1. Create Transactions: One party (i.e. Alice) creates Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer transactions off-chain. 3. Sign/Publish Deposit: Both parties sign Funding Transaction and publish to the blockchain.

Block #1 To Bob Alice claims coins in fork-2

AB

To Alice Bob claims coins in fork-1

AB

slide-88
SLIDE 88

Both Deposits Funding Transaction

Both Parties Sign and Publish Funding Tx

1. Create Transactions: One party (i.e. Alice) creates Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer transactions off-chain. 3. Sign/Publish Deposit: Both parties sign Funding Transaction and publish to the blockchain.

Block #1 To Bob Alice claims coins in fork-2

AB

To Alice Bob claims coins in fork-1

AB

slide-89
SLIDE 89

Both Deposits Funding Transaction

Wait for hardfork

1. Create Transactions: One party (i.e. Alice) creates Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer 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

Block #1 Block #2 To Bob Alice claims coins in fork-2

AB

To Alice Bob claims coins in fork-1

AB

slide-90
SLIDE 90

Both Deposits Funding Transaction

Wait for hardfork

1. Create Transactions: One party (i.e. Alice) creates Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer 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

Block #1 Block #2 Block #3 To Bob Alice claims coins in fork-2

AB

To Alice Bob claims coins in fork-1

AB

slide-91
SLIDE 91

Both Deposits Funding Transaction

Wait for hardfork

1. Create Transactions: One party (i.e. Alice) creates Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer 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

Block #1 Block #2 Block #3 Block #4

HARDFORK BLOCK

Block #5 To Bob Alice -> Bob Transfer

AB

To Alice Bob -> Alice Transfer

AB

slide-92
SLIDE 92

Both Deposits Funding Transaction

Both parties can claim after hardfork!

1. Create Transactions: One party (i.e. Alice) creates Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer 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.

Block #1 Block #2 Block #3 Block #4

HARDFORK BLOCK

Block #5 Bob claims coins in fork-1 Alice claims coins in fork-2

FORK-1 FORK-2

slide-93
SLIDE 93

Both Deposits Funding Transaction

Both parties can claim after hardfork!

1. Create Transactions: One party (i.e. Alice) creates Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer 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.

Block #1 Block #2 Block #3 Block #4

HARDFORK BLOCK

Block #5 Bob claims coins in fork-1 Alice claims coins in fork-2

FORK-1 FORK-2

slide-94
SLIDE 94

Both Deposits Funding Transaction

Both parties can claim after hardfork!

1. Create Transactions: One party (i.e. Alice) creates Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer 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.

Block #1 Block #2 Block #3 Block #4

HARDFORK BLOCK

Block #5 Bob claims coins in fork-1 Alice claims coins in fork-2

FORK-1 FORK-2

slide-95
SLIDE 95

Both Deposits Funding Transaction

Both parties can claim after hardfork!

1. Create Transactions: One party (i.e. Alice) creates Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer 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.

Block #1 Block #2 Block #3 Block #4

HARDFORK BLOCK

Block #5 Bob claims coins in fork-1 Alice claims coins in fork-2

FORK-1 FORK-2

slide-96
SLIDE 96

Both Deposits Funding Transaction

Both parties can claim after hardfork!

1. Create Transactions: One party (i.e. Alice) creates Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer 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.

Block #1 Block #2 Block #3 Block #4

HARDFORK BLOCK

Block #5 Bob claims coins in fork-1 Alice claims coins in fork-2

FORK-1 FORK-2

slide-97
SLIDE 97

Both Deposits Funding Transaction

Both parties can claim after hardfork!

1. Create Transactions: One party (i.e. Alice) creates Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer 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.

Block #1 Block #2 Block #3 Block #4

HARDFORK BLOCK

Block #5 Bob claims coins in fork-1 Alice claims coins in fork-2

FORK-1 FORK-2

slide-98
SLIDE 98

Both Deposits Funding Transaction

Both parties can claim after hardfork!

1. Create Transactions: One party (i.e. Alice) creates Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer 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.

Block #1 Block #2 Block #3 Block #4

HARDFORK BLOCK

Block #5 Bob claims coins in fork-1 Alice claims coins in fork-2

FORK-1 FORK-2

slide-99
SLIDE 99

Both Deposits Funding Transaction

Both parties can claim after hardfork!

1. Create Transactions: One party (i.e. Alice) creates Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer 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.

Block #1 Block #2 Block #3 Block #4

HARDFORK BLOCK

Block #5 Bob claims coins in fork-1 Alice claims coins in fork-2

FORK-1 FORK-2

slide-100
SLIDE 100

Both Deposits Funding Transaction

Both parties can claim after hardfork!

1. Create Transactions: One party (i.e. Alice) creates Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer 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.

Block #1 Block #2 Block #3 Block #4

HARDFORK BLOCK

Block #5 Alice claims coins in fork-2

FORK-1 FORK-2

Bob claims coins in fork-1

slide-101
SLIDE 101

Both Deposits Funding Transaction

Both parties can claim after hardfork!

1. Create Transactions: One party (i.e. Alice) creates Funding Transaction, and both Transfer Transactions. 2. Sign Transfers: Both parties sign the transfer 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.

Block #1 Block #2 Block #3 Block #4

HARDFORK BLOCK

Block #5 Alice claims coins in fork-2

FORK-1 FORK-2

Bob claims coins in fork-1

slide-102
SLIDE 102

How easy was that?

  • Similar to establishing a basic payment channel
  • No need for either party to trigger the exchange
  • Hardfork time must still be FIXED… but no need for elaborate setup.
  • Coins not locked for long time… (1 block after hardfork time).

… but when will this *actually* be useful?

...Segwit2x if replay protection is incorporated...

paddyncl http://homepages.cs.ncl.ac.uk/patrick.mc-corry/atomically-trading-roger.pdf