Technology of Lightning Network in Tel Aviv, Israel
1. Technology of
Lightning Network
Takaya Imai
Jun/27/2017
the Cluster Disruptive Technologies Hub@Tel Aviv, Israel
United Bitcoiners Inc. Co-Founder and CTO
Frontier Partners LLC. Founder and CEO
2. Self Introduction
• United Bitcoiners Inc. Co-Founder & CTO
• Frontier Partners LLC Founder & CEO
• Chief Translator of Mastering Bitcoin for Japanese
• Open Edition
• https://www.bitcoinbook.info
• Second Edition is released on 29 June
3. Self Introduction
• Background
• Ph. D. of Elementary Particle Physics
• kakaku.com
• Web service of price comparison in Japan
• Search Engine Development, Search Engine Server Control,
Big Data Processing & Analysis, Machine Learning, Image
Recognition
• Data Tower Inc. CEO
4.
5. Scaling Problems of
Bitcoin
• Transactions in one block is full
• 1MB per block
• Increase of Bitcoin blockchain data size
• High TX fee
• ex. 360 satoshi / byte
• ~ 7 TX per second
• 10 min block time
• 1 Mbytes / 256 bytes / 10 min / 60 second = 6.8 TX per second
• This block time is necessary for stable Bitcoin blockchain and is enough for usual bitcoin payment.
• But it is very slow comparing with credit card or NFC.
• …
6.
7.
8.
9.
10.
11. 2000 TX / 10 min / 60 second = 3.3 TX per second
15. Lightning Network is being
improved more and more now
• Basic ideas are based on a white paper of Joseph Poon and Thaddeus
Dryja.
• First release: Fed/28/2015
• https://lightning.network/lightning-network-paper.pdf
• BOLT(Base of Lightning Technology) is a RFC of Lightning Network and this
is being updated frequently.
• https://github.com/lightningnetwork/lightning-rfc
• I talk about basic ideas of Lightning Network today.
16. Lightning Network
Projects
Company/
Organization
Lightning Labs MIT DCI Blockstream ACINQ bcoin-org
Product Name lnd lit lightningd eclair plasma
Commitors
Thaddeus Dryja,
Joseph Poon,
Olaoluwa Osuntokun
Thaddeus Dryja
Rusty Russel,
Christian Decker
Pierre-Marie Padiou,
Fabrice Drouin,
dpad85
Christopher Jeffrey
Language Go Go C Scala Node js
first commit
(JST)
2015/10/25 2016/11/6 2015/5/24 2015/8/16 2016/8/29
lastest commit
(JST)
2017/6/27 2017/6/23 2017/6/27 2017/6/10 2016/11/23
github
https://github.com/light
ningnetwork/lnd
https://github.com/mi
t-dci/lit
https://github.com/El
ementsProject/lightn
ing
https://github.com/A
CINQ/eclair
https://github.com/bc
oin-org/plasma
17. Basic ideas of
Lighting Network
• Micro Payment Channel(bi-directional)
• Multi-hop for channels
• HTLC(Hashed Time Lock Contract)
19. Micro Payment Channel
“Open”
Alice Bob
Channel Open Request
Blockchain
TX
input
Alice
1BTC
output
Alice & Bob
but
Alice after t1
1BTC
Broadcast
20. Micro Payment Channel
“First Payment”
Alice BobBlockchain
TX
input
Alice
1BTC
output
Alice & Bob
but
Alice after t1
1BTC
TX
input
Alice & Bob
1BTC
output
Alice
0.9BTC
output
Bob
0.1BTC
Send
no signature
21. Broadcast
Micro Payment Channel
“First Payment”
Alice BobBlockchain
TX
input
Alice
1BTC
output
Alice & Bob
but
Alice after t1
1BTC
TX
input
Alice & Bob
1BTC
output
Alice
0.9BTC
output
Bob
0.1BTC
Add signature
Send
22. Micro Payment Channel
“Second Payment”
Alice BobBlockchain
TX
input
Alice
1BTC
output
Alice & Bob
but
Alice after t1
1BTC
TX
input
Alice & Bob
1BTC
output
Alice
0.8BTC
output
Bob
0.2BTC
Send
23. Micro Payment Channel
“Second Payment”
Alice BobBlockchain
TX
input
Alice
1BTC
output
Alice & Bob
but
Alice after t1
1BTC
TX
input
Alice & Bob
1BTC
output
Alice
0.8BTC
output
Bob
0.2BTC
Send
24. Micro Payment Channel
“Second Payment & Close”
Alice BobBlockchain
TX
input
Alice
1BTC
output
Alice & Bob
but
Alice after t1
1BTC
TX
input
Alice & Bob
1BTC
output
Alice
0.8BTC
output
Bob
0.2BTC
Broadcast
Send
25. Micro Payment Channel
“Uncooperative Close”
Alice BobBlockchain
TX
input
Alice
1BTC
output
Alice & Bob
but
Alice after t1
TX
input
Alice & Bob
1BTC
output
Alice
0.8BTC
output
Bob
0.2BTC
TX
input
Alice
1BTC
output
Alice
1BTC
Bob disappears
Broadcast
Send
27. Bi-directional channel
• It is okay to use uni-directional channel.
• But bi-directional channel is better and more
efficient.
28. Bi-directional channel
• Channel needs two tx fees.
• opening tx fee
• closing tx fee
• It is no need to open a channel in case of one time
payment.
• It is better to use one channel longer and have many
updates on the channel.
29. Bi-directional channel
• Bi-directional channel is okay to use the same way
as uni-directional one?
• Bi-directional channel needs status updates.
• How do revoked statuses create? -> HTCL(Hashed
Time Lock Contract)
32. Open a channel
Alice BobBlockchain
TX Funding
input
Alice
0.5BTC
output
Alice & Bob
1BTCinput
Bob
0.5BTC
signed not signed
Send
33. Open a channel
Alice BobBlockchain
TX Funding
input
Alice
0.5BTC
output
Alice & Bob
1BTCinput
Bob
0.5BTC
signed signed
Send back
34. Open a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX Funding
output
Alice & Bob
1BTC
input
input
Alice Revoke Secret1
Alice Revoke Hash1
Bob Revoke Secret1
Bob Revoke Hash1
35. Open a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX Funding
output
Alice & Bob
1BTC
input
input
Alice Revoke Secret1 Bob Revoke Secret1
Bob Revoke Hash1
Alice Revoke Hash1
36. Open a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX Funding
output
Alice & Bob
1BTC
input
input
Alice Revoke Secret1 Bob Revoke Secret1Bob Revoke Hash1 Alice Revoke Hash1
37. Open a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
Send
input
input
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Bob commitment1
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BTC
input
Alice & Bob
1BTC
output
Alice
0.5BTC
signed
Alice Revoke Secret1 Bob Revoke Secret1 Alice Revoke Hash1
not signed
38. Open a channel
Alice BobBlockchain
TX
Bob commitment1
(Bob c1)
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BTC
input
Alice & Bob
1BTC
output
Alice
0.5BTC
TX Funding
output
Alice & Bob
1BTC
input
input
TX Funding
output
Alice & Bob
1BTC
input
input
Alice Revoke Secret1 Bob Revoke Secret1 Alice Revoke Hash1
39. Open a channel
Alice BobBlockchain
TX
Bob c1
input
output
TX Funding
output
Alice & Bob
1BTC
input
input
TX Funding
output
Alice & Bob
1BTC
input
input
output
TX
Alice c1
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
input
Alice & Bob
1BTC
output
Bob
0.5BTC
Send
signed
Alice Revoke Secret1 Bob Revoke Secret1
not signed
40. Open a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Alice c1
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
input
Alice & Bob
1BTC
output
Bob
0.5BTC
TX
Bob c1
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BTC
input
Alice & Bob
1BTC
output
Alice
0.5BTC
Alice Revoke Secret1 Bob Revoke Secret1
41. Open a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Bob c1
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BTC
input
Alice & Bob
1BTC
output
Alice
0.5BTC
Broadcast
TX
Alice c1
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
input
Alice & Bob
1BTC
output
Bob
0.5BTC
Alice Revoke Secret1 Bob Revoke Secret1
42. Open a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Bob c1
input
Alice & Bob
1BTC
output
Alice
0.5BTC
TX
Alice c1
input
Alice & Bob
1BTC
output
Bob
0.5BTC
finished opening channel
Alice Revoke Secret1 Bob Revoke Secret1
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BTC
44. Update a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Alice c1
input
Alice & Bob
1BTC
TX
Bob c1
input
Alice & Bob
1BTC
Alice Revoke Secret1 Bob Revoke Secret1Alice Revoke Secret2
Alice Revoke Hash2
Bob Revoke Secret2
Bob Revoke Hash2
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BTC
output
Bob
0.5BTC
output
Alice
0.5BTC
45. Update a channel
Alice BobBlockchain
Alice Revoke Secret1 Bob Revoke Secret1Alice Revoke Secret2 Bob Revoke Secret2
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Alice c1
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
input
Alice & Bob
1BTC
TX
Bob c1
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BTC
input
Alice & Bob
1BTC
TX
Alice c2
output
Alice after n blocks
or
Alice Revoke Hash2 & Bob
0.4BTC
input
Alice & Bob
1BTC
TX
Bob c2
output
Bob after n blocks
or
Bob Revoke Hash2 & Alice
0.6BTC
input
Alice & Bob
1BTC
output
Alice
0.4BTC
output
Bob
0.6BTC
output
Bob
0.5BTC
output
Alice
0.5BTC
46. Update a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Bob c2
input
Alice & Bob
1BTC
output
Alice
0.4BTC
TX
Alice c2
input
Alice & Bob
1BTC
output
Bob
0.6BTC
TX
Alice c1
input
Alice & Bob
1BTC
output
Bob
0.5BTC
TX
Bob c1
input
Alice & Bob
1BTC
output
Alice
0.5BTC
Alice Revoke Secret1
Bob Revoke Secret1
Alice Revoke Secret2 Bob Revoke Secret2
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash2 & Bob
0.4BTC
output
Bob after n blocks
or
Bob Revoke Hash2 & Alice
0.6BTC
47. Update a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Bob c2
TX
Alice c2
TX
Alice c1
TX
Bob c1
Alice Revoke Secret1Bob Revoke Secret1 Alice Revoke Secret2 Bob Revoke Secret2
input
Alice & Bob
1BTC
output
Alice
0.4BTC
input
Alice & Bob
1BTC
output
Bob
0.6BTC
input
Alice & Bob
1BTC
output
Bob
0.5BTC
input
Alice & Bob
1BTC
output
Alice
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash2 & Bob
0.4BTC
output
Bob after n blocks
or
Bob Revoke Hash2 & Alice
0.6BTC
48. Update a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Bob c2
TX
Alice c2
TX
Alice c1
TX
Bob c1
Alice Revoke Secret1Bob Revoke Secret1 Alice Revoke Secret2 Bob Revoke Secret2
input
Alice & Bob
1BTC
output
Alice
0.4BTC
input
Alice & Bob
1BTC
output
Bob
0.6BTC
input
Alice & Bob
1BTC
output
Bob
0.5BTC
input
Alice & Bob
1BTC
output
Alice
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash2 & Bob
0.4BTC
output
Bob after n blocks
or
Bob Revoke Hash2 & Alice
0.6BTC
50. Close a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Bob c2
TX
Alice c2
Alice Revoke Secret1Bob Revoke Secret1 Alice Revoke Secret2 Bob Revoke Secret2
input
Alice & Bob
1BTC
output
Alice
0.4BTC
input
Alice & Bob
1BTC
output
Bob
0.6BTC
output
Alice after n blocks
or
Alice Revoke Hash2 & Bob
0.4BTC
output
Bob after n blocks
or
Bob Revoke Hash2 & Alice
0.6BTC
TX
Close
input
Alice & Bob
1BTC
output
Bob
0.6BTC
output
Alice
0.4BTC
signed
Send
not signed
51. Close a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Bob c2
TX
Alice c2
Alice Revoke Secret1Bob Revoke Secret1 Alice Revoke Secret2 Bob Revoke Secret2
input
Alice & Bob
1BTC
output
Alice
0.4BTC
input
Alice & Bob
1BTC
output
Bob
0.6BTC
output
Alice after n blocks
or
Alice Revoke Hash2 & Bob
0.4BTC
output
Bob after n blocks
or
Bob Revoke Hash2 & Alice
0.6BTC
TX
Close
input
Alice & Bob
1BTC
output
Bob
0.6BTC
output
Alice
0.4BTC
signed
Broadcast
signed
52. Alice cheats a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Bob c2
TX
Alice c2
TX
Alice c1
TX
Bob c1
Alice Revoke Secret1Bob Revoke Secret1 Alice Revoke Secret2 Bob Revoke Secret2
input
Alice & Bob
1BTC
output
Alice
0.4BTC
input
Alice & Bob
1BTC
output
Bob
0.6BTC
input
Alice & Bob
1BTC
output
Bob
0.5BTC
input
Alice & Bob
1BTC
output
Alice
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash2 & Bob
0.4BTC
output
Bob after n blocks
or
Bob Revoke Hash2 & Alice
0.6BTC
Broadcast
53. Alice cheats a channel
Alice BobBlockchain
TX
Alice c1
Alice Revoke Secret1Bob Revoke Secret1 Alice Revoke Secret2 Bob Revoke Secret2
input
Alice & Bob
1BTC
output
Bob
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
TX
input
Alice Revoke Secret1 & Bob
0.5BTC
output
Bob
0.5BTC
54. Alice cheats a channel
Alice BobBlockchain
Alice Revoke Secret1Bob Revoke Secret1 Alice Revoke Secret2 Bob Revoke Secret2
Broadcast
TX
Alice c1
input
Alice & Bob
1BTC
output
Bob
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
TX
input
Alice Revoke Secret1 & Bob
0.5BTC
output
Bob
0.5BTC
55. Alice cheats a channel
Alice BobBlockchain
Alice Revoke Secret1Bob Revoke Secret1 Alice Revoke Secret2 Bob Revoke Secret2
TX
Alice c1
input
Alice & Bob
1BTC
output
Bob
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
TX
input
Alice Revoke Secret1 & Bob
0.5BTC
output
Bob
0.5BTC
56. Alice is uncooperative
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Bob c2
TX
Alice c2
TX
Alice c1
TX
Bob c1
Alice Revoke Secret1Bob Revoke Secret1 Alice Revoke Secret2 Bob Revoke Secret2
input
Alice & Bob
1BTC
output
Alice
0.4BTC
input
Alice & Bob
1BTC
output
Bob
0.6BTC
input
Alice & Bob
1BTC
output
Bob
0.5BTC
input
Alice & Bob
1BTC
output
Alice
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash2 & Bob
0.4BTC
output
Bob after n blocks
or
Bob Revoke Hash2 & Alice
0.6BTC
57. Alice is uncooperative
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Bob c2
TX
Alice c2
TX
Alice c1
TX
Bob c1
Alice Revoke Secret1Bob Revoke Secret1 Alice Revoke Secret2 Bob Revoke Secret2
input
Alice & Bob
1BTC
output
Alice
0.4BTC
input
Alice & Bob
1BTC
output
Bob
0.6BTC
input
Alice & Bob
1BTC
output
Bob
0.5BTC
input
Alice & Bob
1BTC
output
Alice
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash2 & Bob
0.4BTC
output
Bob after n blocks
or
Bob Revoke Hash2 & Alice
0.6BTC
Broadcast
60. Multi-hop
• No central server is in Lightning Network.
• Many paths are available for payment from payee to
recipient.
• It can build so many micro payment system without an
huge investment to central server. For example, more than
10 million tx per second over the world.
• Each node in the middle can get a fee for transporting tx to
maintain nodes.
63. Lightning Payment Image
payee recipient
Alice Bob Carol
Carol Secret, R
Carol Hash, H
Send
tx with H
need R to
use
tx with H
need R to
use
Send
tx with H
need R to
use
Send
Send
R
Send
R
65. Update a channel with Carol
Alice Bob
TX
Alice c1
TX
Bob c1
input
Alice & Bob
1BTC
output
Bob
0.5BTC
input
Alice & Bob
1BTC
output
Alice
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BTC
Carol
Carol Secret
Carol Hash
Alice Revoke Secret1Bob Revoke Secret1
66. Update a channel with Carol
Alice Bob
TX
Alice c1
TX
Bob c1
input
Alice & Bob
1BTC
output
Bob
0.5BTC
input
Alice & Bob
1BTC
output
Alice
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BTC
Carol
Carol Secret
Carol Hash
Alice Revoke Secret1Bob Revoke Secret1
Bob Revoke Secret2
Bob Revoke Hash2
Alice Revoke Secret2
Alice Revoke Hash2
67. Update a channel with Carol
Alice Bob
TX
Alice c1
TX
Bob c1
input
Alice & Bob
1BTC
output
Bob
0.5BTC
input
Alice & Bob
1BTC
output
Alice
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BTC
Carol
Carol Secret
Carol Hash
Send
Alice Revoke Secret1Bob Revoke Secret1 Alice Revoke Secret2
Alice Revoke Hash2
Bob Revoke Secret2
Bob Revoke Hash2
68. Update a channel with Carol
Alice Bob
TX
Alice c1
TX
Bob c1
input
Alice & Bob
1BTC
output
Bob
0.5BTC
input
Alice & Bob
1BTC
output
Alice
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BTC
Carol
Carol Secret
Alice Revoke Secret1Bob Revoke Secret1 Alice Revoke Secret2
Alice Revoke Hash2
Bob Revoke Hash2
Send
Alice Revoke Hash2
Send
Carol Hash
Bob Revoke Secret2
Bob Revoke Hash2
69. Update a channel with Carol
Alice Bob
TX
Alice c1
TX
Bob c1
input
Alice & Bob
1BTC
output
Bob
0.5BTC
input
Alice & Bob
1BTC
output
Alice
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BTC
Carol
Carol Secret
Carol Hash
TX
Bob c2
input
Alice & Bob
1BTC
output
Alice
0.4BTC
output
Bob after n blocks
or
Bob Revoke Hash2 & Alice
0.5BTC
output
Carol Hash & Bob after m blocks
or
Bob Revoke Hash2 & Alice
or
Alice after t2
0.1BTC
Alice Revoke Secret1Bob Revoke Secret1 Alice Revoke Secret2
Carol Hash Bob Revoke Hash2
Alice Revoke Hash2
Bob Revoke Secret2
Bob Revoke Hash2
Alice Revoke Hash2
70. Update a channel with Carol
Alice Bob
TX
Bob c2
TX
Alice c1
TX
Bob c1
input
Alice & Bob
1BTC
output
Alice
0.4BTC
input
Alice & Bob
1BTC
output
Bob
0.5BTC
input
Alice & Bob
1BTC
output
Alice
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BTC
output
Bob after n blocks
or
Bob Revoke Hash2 & Alice
0.5BTC
output
Carol Hash & Bob after m blocks
or
Bob Revoke Hash2 & Alice
or
Alice after t2
0.1BTC
Carol
Carol Secret
Carol Hash
Send
Alice Revoke Secret1Bob Revoke Secret1 Alice Revoke Secret2
Carol Hash Bob Revoke Hash2
Alice Revoke Hash2
Bob Revoke Secret2
Bob Revoke Hash2
Alice Revoke Hash2
71. Alice Bob
TX
Alice c1
TX
Bob c1
input
Alice & Bob
1BTC
output
Bob
0.5BTC
input
Alice & Bob
1BTC
output
Alice
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BTC
Carol
Carol Secret
Carol Hash
TX
Bob c2
input
Alice & Bob
1BTC
output
Alice
0.4BTC
output
Bob after n blocks
or
Bob Revoke Hash2 & Alice
0.5BTC
output
Carol Hash & Bob after m blocks
or
Bob Revoke Hash2 & Alice
or
Alice after t2
0.1BTC
Update a channel with Carol
Alice Revoke Secret1Bob Revoke Secret1 Alice Revoke Secret2
Carol Hash Bob Revoke Hash2 Carol Hash
Alice Revoke Hash2
Bob Revoke Secret2
Bob Revoke Hash2
Alice Revoke Hash2
72. Update a channel with Carol
Alice Bob
TX
Alice c1
TX
Bob c1
input
Alice & Bob
1BTC
output
Bob
0.5BTC
input
Alice & Bob
1BTC
output
Alice
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash1 & Bob
0.5BTC
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BTC
Carol
Carol Secret
Carol Hash
TX
Alice c2
input
Alice & Bob
1BTC
output
Bob
0.5BTC
output
Alice after n blocks
or
Alice Revoke Hash2 & Bob
0.4BTC
output
Carol Hash & Bob
or
Alice Revoke Hash2 & Bob
or
Alice after t2
0.1BTC
TX
Bob c2
input
Alice & Bob
1BTC
output
Alice
0.4BTC
output
Bob after n blocks
or
Bob Revoke Hash2 & Alice
0.5BTC
output
Carol Hash & Bob after m blocks
or
Bob Revoke Hash2 & Alice
or
Alice after t2
0.1BTC
Bob Revoke Secret1 Alice Revoke Secret2
Carol Hash Bob Revoke Hash2
Alice Revoke Hash2
Alice Revoke Secret1
Carol Hash
Bob Revoke Secret2
Bob Revoke Hash2
Alice Revoke Hash2
73. Flare: Lightning Network
Routing Algorithm
• I could not touch routing algorithm today.
• Flare is very interesting approach.
• http://bitfury.com/content/5-white-papers-
research/whitepaper_flare_an_approach_to_routing_in_ligh
tning_network_7_7_2016.pdf
• However, I think it has a possibility for a node in the middle to
encumber a R transfer(Carol Secret) in case of more than two
nodes in the middle.