Download presentation
Presentation is loading. Please wait.
1
Micro-transaction channels
Corné Plooy
2
Contents Uni-directional micro-transaction channels
Bi-directional micro-transaction channels Unlimited lifetime micro-transaction channels Lightning and Amiko Pay
3
A Bitcoin transaction Amount TxID Amount ScriptPubKey Index
ScriptSig Amount ScriptPubKey Amount ScriptPubKey TxID Index ScriptSig Amount ScriptPubKey Amount ScriptPubKey Amount ScriptPubKey Amount ScriptPubKey
4
Example: WiFi hot-spot
80 minutes Internet 0.8 mBTC
5
Example: WiFi hot-spot
1 mBTC 80 minutes Internet 0.2 mBTC
6
Example: WiFi hot-spot
1 minute Internet 0.01 mBTC 1 minute Internet 0.01 mBTC 1 minute Internet 0.01 mBTC
7
Micro-transaction channels
B 1 mBTC to A
8
Micro-transaction channels
B 1 mBTC to A Deposit: 1 mBTC to A+B A Withdraw: 1 mBTC to A 0 mBTC to B
9
Micro-transaction channels
B 1 mBTC to A Deposit: 1 mBTC to A+B A Send transaction Withdraw: 1 mBTC to A 0 mBTC to B Withdraw: 1 mBTC to A 0 mBTC to B
10
Micro-transaction channels
B 1 mBTC to A Deposit: 1 mBTC to A+B A Send signature Withdraw: 1 mBTC to A 0 mBTC to B Withdraw: 1 mBTC to A 0 mBTC to B B B
11
Micro-transaction channels
B 1 mBTC to A Deposit: 1 mBTC to A+B A Withdraw: 1 mBTC to A 0 mBTC to B B
12
Micro-transaction channels
B 1 mBTC to A Deposit: 1 mBTC to A+B A Send transaction Withdraw: 1 mBTC to A 0 mBTC to B Withdraw: 0.99 mBTC to A 0.01 mBTC to B B A
13
Micro-transaction channels
B 1 mBTC to A Deposit: 1 mBTC to A+B A Send transaction Withdraw: 1 mBTC to A 0 mBTC to B Withdraw: 0.98 mBTC to A 0.02 mBTC to B B A
14
Micro-transaction channels
B 1 mBTC to A Deposit: 1 mBTC to A+B A Send transaction Withdraw: 1 mBTC to A 0 mBTC to B Withdraw: 0.2 mBTC to A 0.8 mBTC to B B A
15
Micro-transaction channels
B 1 mBTC to A Deposit: 1 mBTC to A+B A Withdraw: 1 mBTC to A 0 mBTC to B Withdraw: 0.2 mBTC to A 0.8 mBTC to B B B A
16
Micro-transaction channels
B 1 mBTC to A Deposit: 1 mBTC to A+B A Withdraw: 1 mBTC to A 0 mBTC to B Withdraw: 0.2 mBTC to A 0.8 mBTC to B A B A
17
Micro-transaction channels
B 1 mBTC to A Lock time Deposit: 1 mBTC to A+B A Withdraw: 1 mBTC to A 0 mBTC to B Withdraw: 0.2 mBTC to A 0.8 mBTC to B B A
18
Questions? A B 1 mBTC to A Deposit: 1 mBTC to A+B Withdraw:
0 mBTC to B Withdraw: 0.2 mBTC to A 0.8 mBTC to B B A
19
Example: Bitcoin exchange
3 BTC 2 BTC 5 BTC
20
Example: Bitcoin exchange
Withdraw: 10 BTC to A 0 BTC to B B 10 BTC to A B Withdraw: 7 BTC to A 3 BTC to B Deposit: 10 BTC to A+B A A
21
Example: Bitcoin exchange
Withdraw: 10 BTC to A 0 BTC to B B 10 BTC to A B Withdraw: 7 BTC to A 3 BTC to B Deposit: 10 BTC to A+B A A Withdraw: 9 BTC to A 1 BTC to B ???? ?
22
Example: Bitcoin exchange
Withdraw: 10 BTC to A 0 BTC to B B 10 BTC to A B Withdraw: 7 BTC to A 3 BTC to B Deposit: 10 BTC to A+B A A Withdraw: 9 BTC to A 1 BTC to B ???? B
23
Bi-directional channel
Withdraw: 10 BTC to A 0 BTC to B B 10 BTC to A B Withdraw: 7 BTC to A 3 BTC to B Deposit: 10 BTC to A+B A A Withdraw: 9 BTC to A 1 BTC to B B
24
Questions? A B Withdraw: 10 BTC to A 0 BTC to B 10 BTC to A Withdraw:
Deposit: 10 BTC to A+B A A Withdraw: 9 BTC to A 1 BTC to B B
25
Lock times Amount TxID Amount ScriptSig Index ScriptSig ScriptPubKey
26
Lock times TxID Amount Index Amount ScriptSig ScriptPubKey ScriptSig
SequenceNr Amount ScriptSig Amount ScriptSig Amount ScriptSig TxID Index ScriptPubKey SequenceNr Amount ScriptSig Amount ScriptSig LockTime Amount ScriptSig
27
Lock times OP_CHECKLOCKTIMEVERIFY OP_CHECKSEQUENCEVERIFY TxID Amount
ScriptSig TxID Index ScriptPubKey SequenceNr Amount ScriptSig Amount ScriptSig Amount ScriptSig TxID Index ScriptPubKey SequenceNr Amount ScriptSig Amount ScriptSig LockTime Amount ScriptSig OP_CHECKLOCKTIMEVERIFY OP_CHECKSEQUENCEVERIFY
28
OP_CHECKLOCKTIMEVERIFY
A 1 mBTC to A B Deposit: 1 mBTC to A+B A Withdraw: 1 mBTC to A 0 mBTC to B Withdraw: 0.3 mBTC to A 0.7 mBTC to B Withdraw: 0.2 mBTC to A 0.8 mBTC to B B A A
29
OP_CHECKLOCKTIMEVERIFY
A 1 mBTC to A B Deposit: 1 mBTC to: (A AND CLTV) OR (A AND B) A Withdraw: 1 mBTC to A 0 mBTC to B Withdraw: 0.3 mBTC to A 0.7 mBTC to B Withdraw: 0.2 mBTC to A 0.8 mBTC to B A A
30
Unlimited lifetime channel
10 BTC A A B 10 BTC A AND B A 8 BTC A AND CSV OR B AND RA 2 BTC B 8 BTC A 2 BTC B AND CSV OR A AND RB B A ... ... Relative lock time
31
Unlimited lifetime channel
10 BTC A A B 10 BTC A AND B A 8 BTC A AND CSV OR B AND RA 2 BTC B 8 BTC A 2 BTC B AND CSV OR A AND RB B A
32
Unlimited lifetime channel
10 BTC A A B 10 BTC A AND B A 8 BTC A AND CSV OR B AND RA 2 BTC B 8 BTC A 2 BTC B AND CSV OR A AND RB B A 6 BTC A AND CSV OR B AND RA' 4 BTC B 6 BTC A 4 BTC B AND CSV OR A AND RB' B A
33
Unlimited lifetime channel
10 BTC A A B 10 BTC A AND B A 8 BTC A AND CSV OR B AND RA 2 BTC B 8 BTC A 2 BTC B AND CSV OR A AND RB B A 6 BTC A AND CSV OR B AND RA' 4 BTC B 6 BTC A 4 BTC B AND CSV OR A AND RB' RA + B A
34
Regularly check your channel!
10 BTC A A B 10 BTC A AND B A 10 BTC A AND CSV OR B AND RA 0 BTC B 10 BTC A 0 BTC B AND CSV OR A AND RB B A 1 BTC A AND CSV OR B AND RA' 9 BTC B 1 BTC A 9 BTC B AND CSV OR A AND RB' RA + B A
35
Regularly check your channel!
10 BTC A A B 10 BTC A AND B A 10 BTC A AND CSV OR B AND RA 0 BTC B 10 BTC A 0 BTC B AND CSV OR A AND RB A B A 1 BTC A AND CSV OR B AND RA' 9 BTC B 1 BTC A 9 BTC B AND CSV OR A AND RB' RA + B A
36
Regularly check your channel!
10 BTC A A B 10 BTC A AND B A 10 BTC A AND CSV OR B AND RA 0 BTC B A B
37
Regularly check your channel!
10 BTC A A B 10 BTC A AND B A 10 BTC A AND CSV OR B AND RA 0 BTC B A B 10 BTC A 10 BTC B A RA B
38
Regularly check your channel!
10 BTC A A B 10 BTC A AND B A 10 BTC A AND CSV OR B AND RA 0 BTC B A B 10 BTC A 10 BTC B 1 BTC A 9 BTC B A RA B RA B
39
Questions? A B 10 BTC A 10 BTC A AND B A 10 BTC A AND CSV OR B AND RA
40
Lightning / Amiko Pay
41
Lightning / Amiko Pay
42
Lightning / Amiko Pay
43
Lightning / Amiko Pay
44
Lightning / Amiko Pay H H H t+1day t+3days H t+2days H t+4days
R = random() H = hash(R)
45
Lightning / Amiko Pay Hash Time Locked Contract (HTLC) H H H t+1day
t+3days H t+2days H t+4days R = random() H = hash(R) Hash Time Locked Contract (HTLC)
46
A AND CHECKLOCKTIMEVERIFY
HTLC A AND CHECKLOCKTIMEVERIFY OR B AND R R = random() H = hash(R)
47
C-Lightning channel design
10 BTC A A B 10 BTC A AND B A 6 BTC A AND CSV OR B AND RA 2 BTC R AND B OR CLTV AND CSV AND A B AND RA 2 BTC B 6 BTC A 2 BTC R AND B AND CSV OR CLTV AND A A AND RB 2 BTC B AND CSV OR A AND RB B A
48
Questions? A B 10 BTC A 10 BTC A AND B A 6 BTC A AND CSV OR B AND RA
R AND B OR CLTV AND CSV AND A B AND RA 2 BTC B 6 BTC A 2 BTC R AND B AND CSV OR CLTV AND A A AND RB 2 BTC B AND CSV OR A AND RB B A
49
1Cj3pyT1VDGK1g4DF5epbG4DL7rXAvzFwe
Thank you 1Cj3pyT1VDGK1g4DF5epbG4DL7rXAvzFwe
50
Scripts A AND CSV OR B AND RA OP_HASH160 <H(RA)> OP_EQUAL OP_IF
<key B> OP_ELSE <delay> OP_CHECKSEQUENCEVERIFY OP_DROP <key A> OP_ENDIF OP_CHECKSIG
51
Scripts OR CLTV AND A B AND RA R AND CSV AND B OP_HASH160 OP_DUP
<H(R)> OP_EQUAL OP_IF <delay> OP_CHECKSEQUENCEVERIFY OP_2DROP <key B> OP_ELSE <H(RA)> OP_EQUAL OP_NOTIF <HTLC timeout> OP_CHECKLOCKTIMEVERI FY OP_DROP OP_ENDIF <key A> OP_CHECKSIG
52
Scripts OR CLTV AND CSV AND A B AND RA R AND B OP_HASH160 OP_DUP
<H(R)> OP_EQUAL OP_SWAP <H(RA)> OP_EQUAL OP_ADD OP_IF <key B> OP_ELSE <HTLC timeout> OP_CHECKLOCKTIMEVERIFY <delay> OP_CHECKSEQUENCEVERIFY OP_2DROP <key A> OP_ENDIF OP_CHECKSIG
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.