Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Technology of
Lightning Network
Takaya Imai
Jun/27/2017
the Cluster Disruptive Technologies Hub@Tel Aviv, Israel
United Bi...
Self Introduction
• United Bitcoiners Inc. Co-Founder & CTO
• Frontier Partners LLC Founder & CEO
• Chief Translator of Ma...
Self Introduction
• Background
• Ph. D. of Elementary Particle Physics
• kakaku.com
• Web service of price comparison in J...
Scaling Problems of
Bitcoin
• Transactions in one block is full
• 1MB per block
• Increase of Bitcoin blockchain data size...
2000 TX / 10 min / 60 second = 3.3 TX per second
360sat*256bytes*2,500usd/100,000,000sat = 2.304usd per TX
Scaling Problems of
Bitcoin
• Lightning Network is one of solutions for scaling.
• Scaling solutions have two types.
Scaling
on-chain or off-chain
• on-chain
• Side chain
• Changing block size
• Segregated Witness
• …
• off-chain
• Lightni...
Lightning Network is being
improved more and more now
• Basic ideas are based on a white paper of Joseph Poon and Thaddeus...
Lightning Network
Projects
Company/
Organization
Lightning Labs MIT DCI Blockstream ACINQ bcoin-org
Product Name lnd lit l...
Basic ideas of
Lighting Network
• Micro Payment Channel(bi-directional)
• Multi-hop for channels
• HTLC(Hashed Time Lock C...
Micro Payment Channel
(Uni-directional)
Micro Payment Channel
“Open”
Alice Bob
Channel Open Request
Blockchain
TX
input
Alice
1BTC
output
Alice & Bob
but
Alice af...
Micro Payment Channel
“First Payment”
Alice BobBlockchain
TX
input
Alice
1BTC
output
Alice & Bob
but
Alice after t1
1BTC
T...
Broadcast
Micro Payment Channel
“First Payment”
Alice BobBlockchain
TX
input
Alice
1BTC
output
Alice & Bob
but
Alice after...
Micro Payment Channel
“Second Payment”
Alice BobBlockchain
TX
input
Alice
1BTC
output
Alice & Bob
but
Alice after t1
1BTC
...
Micro Payment Channel
“Second Payment”
Alice BobBlockchain
TX
input
Alice
1BTC
output
Alice & Bob
but
Alice after t1
1BTC
...
Micro Payment Channel
“Second Payment & Close”
Alice BobBlockchain
TX
input
Alice
1BTC
output
Alice & Bob
but
Alice after ...
Micro Payment Channel
“Uncooperative Close”
Alice BobBlockchain
TX
input
Alice
1BTC
output
Alice & Bob
but
Alice after t1
...
Micro Payment Channel
(Bi-directional)
Bi-directional channel
• It is okay to use uni-directional channel.
• But bi-directional channel is better and more
effici...
Bi-directional channel
• Channel needs two tx fees.
• opening tx fee
• closing tx fee
• It is no need to open a channel in...
Bi-directional channel
• Bi-directional channel is okay to use the same way
as uni-directional one?
• Bi-directional chann...
Bi-directional channel
• Recent implementations does not use strict HTLC
but pubkey.
• I use HTLC for simplicity today.
Bi-directional Channel
(Open a channel)
Open a channel
Alice BobBlockchain
TX Funding
input
Alice
0.5BTC
output
Alice & Bob
1BTCinput
Bob
0.5BTC
signed not signed...
Open a channel
Alice BobBlockchain
TX Funding
input
Alice
0.5BTC
output
Alice & Bob
1BTCinput
Bob
0.5BTC
signed signed
Sen...
Open a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX Funding
output
Alice & Bob
1BTC
input...
Open a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX Funding
output
Alice & Bob
1BTC
input...
Open a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX Funding
output
Alice & Bob
1BTC
input...
Open a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
Send
input
input
TX Funding
output
Alice & Bob
1BTC
...
Open a channel
Alice BobBlockchain
TX
Bob commitment1
(Bob c1)
output
Bob after n blocks
or
Bob Revoke Hash1 & Alice
0.5BT...
Open a channel
Alice BobBlockchain
TX
Bob c1
input
output
TX Funding
output
Alice & Bob
1BTC
input
input
TX Funding
output...
Open a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX Funding
output
Alice & Bob
1BTC
input...
Open a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX Funding
output
Alice & Bob
1BTC
input...
Open a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Bob c1
input
Alice & Bob
1BTC
output
...
Bi-directional Channel
(Update a channel)
Update a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Alice c1
input
Alice & Bob
1BTC
TX
...
Update a channel
Alice BobBlockchain
Alice Revoke Secret1 Bob Revoke Secret1Alice Revoke Secret2 Bob Revoke Secret2
TX Fun...
Update a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Bob c2
input
Alice & Bob
1BTC
outpu...
Update a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Bob c2
TX
Alice c2
TX
Alice c1
TX
B...
Update a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Bob c2
TX
Alice c2
TX
Alice c1
TX
B...
Bi-directional Channel
(Close a channel)
Close a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Bob c2
TX
Alice c2
Alice Revoke Secr...
Close a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Bob c2
TX
Alice c2
Alice Revoke Secr...
Alice cheats a channel
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Bob c2
TX
Alice c2
TX
Alice c...
Alice cheats a channel
Alice BobBlockchain
TX
Alice c1
Alice Revoke Secret1Bob Revoke Secret1 Alice Revoke Secret2 Bob Rev...
Alice cheats a channel
Alice BobBlockchain
Alice Revoke Secret1Bob Revoke Secret1 Alice Revoke Secret2 Bob Revoke Secret2
...
Alice cheats a channel
Alice BobBlockchain
Alice Revoke Secret1Bob Revoke Secret1 Alice Revoke Secret2 Bob Revoke Secret2
...
Alice is uncooperative
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Bob c2
TX
Alice c2
TX
Alice c...
Alice is uncooperative
Alice BobBlockchain
TX Funding
output
Alice & Bob
1BTC
input
input
TX
Bob c2
TX
Alice c2
TX
Alice c...
Multi-hop
Multi-hop
payee recipient
Multi-hop
• No central server is in Lightning Network.
• Many paths are available for payment from payee to
recipient.
• I...
Multi-hop
payee recipient
Node in the middle can steal money?
Alice Bob Carol
Lightning Payment Image
payee recipient
Alice Bob Carol
Carol Secret, R
Carol Hash, H
Lightning Payment Image
payee recipient
Alice Bob Carol
Carol Secret, R
Carol Hash, H
Send
tx with H
need R to
use
tx with...
Multi-hop
(Update a channel with
Carol)
Update a channel with Carol
Alice Bob
TX
Alice c1
TX
Bob c1
input
Alice & Bob
1BTC
output
Bob
0.5BTC
input
Alice & Bob
1BT...
Update a channel with Carol
Alice Bob
TX
Alice c1
TX
Bob c1
input
Alice & Bob
1BTC
output
Bob
0.5BTC
input
Alice & Bob
1BT...
Update a channel with Carol
Alice Bob
TX
Alice c1
TX
Bob c1
input
Alice & Bob
1BTC
output
Bob
0.5BTC
input
Alice & Bob
1BT...
Update a channel with Carol
Alice Bob
TX
Alice c1
TX
Bob c1
input
Alice & Bob
1BTC
output
Bob
0.5BTC
input
Alice & Bob
1BT...
Update a channel with Carol
Alice Bob
TX
Alice c1
TX
Bob c1
input
Alice & Bob
1BTC
output
Bob
0.5BTC
input
Alice & Bob
1BT...
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
Ali...
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...
Update a channel with Carol
Alice Bob
TX
Alice c1
TX
Bob c1
input
Alice & Bob
1BTC
output
Bob
0.5BTC
input
Alice & Bob
1BT...
Flare: Lightning Network
Routing Algorithm
• I could not touch routing algorithm today.
• Flare is very interesting approa...
Thanks!
Technology of Lightning Network in Tel Aviv, Israel
Technology of Lightning Network in Tel Aviv, Israel
Technology of Lightning Network in Tel Aviv, Israel
Technology of Lightning Network in Tel Aviv, Israel
Technology of Lightning Network in Tel Aviv, Israel
Technology of Lightning Network in Tel Aviv, Israel
Upcoming SlideShare
Loading in …5
×

Technology of Lightning Network in Tel Aviv, Israel

959 views

Published on

the Cluster Disruptive Technologies Hub@Tel Aviv, Israel

Published in: Technology
  • About 73 page, it is not encumbered in case of more than two nodes in the middle. but if nodes in the middle have a trouble, it takes much time to finalize transferring funds. Details are in here: https://github.com/takaya-imai/packetization_for_paymentchannel .
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Technology of Lightning Network in Tel Aviv, Israel

  1. 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. 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. 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. 4. 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. • …
  5. 5. 2000 TX / 10 min / 60 second = 3.3 TX per second
  6. 6. 360sat*256bytes*2,500usd/100,000,000sat = 2.304usd per TX
  7. 7. Scaling Problems of Bitcoin • Lightning Network is one of solutions for scaling. • Scaling solutions have two types.
  8. 8. Scaling on-chain or off-chain • on-chain • Side chain • Changing block size • Segregated Witness • … • off-chain • Lightning Network • …
  9. 9. 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.
  10. 10. 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
  11. 11. Basic ideas of Lighting Network • Micro Payment Channel(bi-directional) • Multi-hop for channels • HTLC(Hashed Time Lock Contract)
  12. 12. Micro Payment Channel (Uni-directional)
  13. 13. Micro Payment Channel “Open” Alice Bob Channel Open Request Blockchain TX input Alice 1BTC output Alice & Bob but Alice after t1 1BTC Broadcast
  14. 14. 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
  15. 15. 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
  16. 16. 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
  17. 17. 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
  18. 18. 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
  19. 19. 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
  20. 20. Micro Payment Channel (Bi-directional)
  21. 21. Bi-directional channel • It is okay to use uni-directional channel. • But bi-directional channel is better and more efficient.
  22. 22. 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.
  23. 23. 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)
  24. 24. Bi-directional channel • Recent implementations does not use strict HTLC but pubkey. • I use HTLC for simplicity today.
  25. 25. Bi-directional Channel (Open a channel)
  26. 26. Open a channel Alice BobBlockchain TX Funding input Alice 0.5BTC output Alice & Bob 1BTCinput Bob 0.5BTC signed not signed Send
  27. 27. Open a channel Alice BobBlockchain TX Funding input Alice 0.5BTC output Alice & Bob 1BTCinput Bob 0.5BTC signed signed Send back
  28. 28. 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
  29. 29. 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
  30. 30. 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
  31. 31. 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
  32. 32. 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
  33. 33. 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
  34. 34. 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
  35. 35. 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
  36. 36. 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
  37. 37. Bi-directional Channel (Update a channel)
  38. 38. 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
  39. 39. 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
  40. 40. 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
  41. 41. 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
  42. 42. 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
  43. 43. Bi-directional Channel (Close a channel)
  44. 44. 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
  45. 45. 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
  46. 46. 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
  47. 47. 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
  48. 48. 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
  49. 49. 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
  50. 50. 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
  51. 51. 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
  52. 52. Multi-hop
  53. 53. Multi-hop payee recipient
  54. 54. 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.
  55. 55. Multi-hop payee recipient Node in the middle can steal money? Alice Bob Carol
  56. 56. Lightning Payment Image payee recipient Alice Bob Carol Carol Secret, R Carol Hash, H
  57. 57. 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
  58. 58. Multi-hop (Update a channel with Carol)
  59. 59. 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
  60. 60. 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
  61. 61. 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
  62. 62. 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
  63. 63. 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
  64. 64. 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
  65. 65. 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
  66. 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 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
  67. 67. 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.
  68. 68. Thanks!

×