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.
Interledger
Protocol Stack Deep Dive
Evan Schwartz
Co-Inventor of Interledger
@_emschwartz
Agenda 1. Internetworking Architecture
2. Ledger Integrations: HTLCs vs HTLAs
3. Interledger Protocol V4
4. Building on IL...
Internet of
Money
Payments
Value
Blockchains
Coins
The Internet Works the Same Over Ethernet, Fiber, Radio
IP Is So Network-Agnostic...
This is Why Protocols Designed for PDP-10s Work w/ iPhones
Internet Architecture
IP
PPP ETHERNET WIFI BLUETOOTH
L3: Internetwork
L2: Network
L4: Transport TCP UDP QUIC
L5: Applicati...
Interledger Architecture
ILP
PAYMENT / STATE CHANNELS
SIDECHAINS ...
L3: Interledger
L2 Network
L4: Transport IPR PSK STRE...
Background
Why layered protocol stacks?
Balancing Interoperability and Innovation
More
Standardization
More
Flexibility
Internet Architecture
IP
PPP ETHERNET WIFI BLUETOOTH
L3: Internetwork
L2: Network
L4: Transport TCP UDP QUIC
L5: Applicati...
What features belong in each layer?
?
?
L3: Interledger
L2 Network
L4: Transport ?
L5: Application ?
?(L1: Ledger)
What interfaces should each layer provide to the others?
?
?
L3: Interledger
L2 Network
L4: Transport
?
L5: Application
?
...
Background
Securing multi-hop payments
Optimistic Execution (Correspondent Banking Today)
EXECUTE
Optimistic Execution (Correspondent Banking Today)
FAIL
1. PREPARE
2. EXECUTE
Two-Phase Execution Secures Multi-Hop Transfers
REFERENCES
J. Poon and T. Drya, The Bitcoin Lightnin...
1. PREPARE
Sender Cannot Lose Money If Packet Is Dropped
1. PREPARE
2. EXECUTE
Malicious Intermediaries Lose Funds If Response Is Dropped
Background
HTLCs vs HTLAs
Hashed Timelock Contract (HTLC): Ledger-Mediated
What if the ledger is too slow, expensive, or no HTLCs?
Hashed Timelock Agreements (HTLA) Are Purely P2P
HTLA: No Preimage → No Money
HTLA: Preimage → Money
HTLA: Preimage, No Money → No Future Business
HTLAs: Prepare, Fulfill, Settle, Repeat
What features are needed from
ledgers (or Layer 2 networks)?
Layers 1 + 2
Ledger Integrations
There are a lot of blockchains out there!
Layer 2 Is a Hot Topic!
...And many more!
The Traditional Payment Space is Already Highly Fragmented
What features are common to
all payment networks?
What features can we expect?
Interledger.js Uses Plugins to Abstract Different Ledgers + L2s
Core Ledger Functions
● Send money
● Send data
Sending Data: BTP Uses Websockets for Secure P2P Comms
BTP 2.0 Is A Binary Request/Response Protocol
Sending Money: Settling HTLAs
?
What if the ledger is too slow or expensive?
Payment Channels Enable Fast, Free Settlement for HTLAs
XRP Ledger Payment Channels
Machinomy Library for ETH + ERC20 Payment Channels
Lightning Payments Used on Bitcoin
Payment channel plugins extend
ilp-plugin-btp and
ilp-plugin-mini-accounts
Plugins for on-ledger settlement
extend ilp-plugin-payment
Layer 1 + 2 Must-Haves:
● Send data
● Send money
Layer 1 + 2 Nice-To-Haves:
● Fast, Cheap Transfers OR
● (Unidirectional) ...
Layer 3
Interledger Protocol V4 (ILPv4)
ILPv4 Packet (Request)
ILPv4 Packet (Response, Error)
Example ILP Prepare Packet
{
"amount": "1000",
"executionCondition":
"3c36339587dbd93a815168c14478afcf3dcf77559c9ff0ca425b...
Example ILP Fulfill Packet
{
"fulfillment":
"c076b41108fa77c54a447e708f34c6d8114caec0b5a11df70ee31bcd99a4cb46",
"data":
"3...
Example ILP Reject Packet
{
"code": "F99",
"triggeredBy":
"test.amundsen.bmp.btp18q1xrp.DZ3ec1t1idUwmt7e2uU82mUkmT2pKodAq-...
ILP Addresses Are Hierarchical, Dot-Separated Strings
Questions Answered to Arrive At ILPv4
● Crypto Conditions or SHA-256?
● Are conditions a ledger or Interledger concern?
● ...
Four People Spent A Full Day Debating Address Separators
ILPv4 is (arguably) the
simplest possible protocol for
internetworking value networks
Layer 4
Transport
Internet Architecture
IP
PPP ETHERNET WIFI BLUETOOTH
L3: Internetwork
L2: Network
L4: Transport TCP UDP QUIC
L5: Applicati...
Transport layer provides
helpful functionality
needed by many applications
1st Gen: Receiver-Generated Fulfillments
2nd Gen: Sender-Generated Fulfillments
3rd Gen: In-Protocol Quoting
4th Gen: Quoting and Streaming
STREAM Client and Server Communicate Over ILP
Client Server
Interledger
STREAM Handles Bi-Directional Sending
Client Server
STREAM Connections Consist of Multiple Logical Streams
STREAM Features
STREAM Packets Are Opaque to Intermediaries
STREAM Packets Are Composed of a Header + Frames
Layer 5
Application
Application layer has
undergone many iterations but
more work to do using STREAM
Previously, Application Layer
just meant connection setup
Application Layer Protocols To-Date
● Simple Payment Setup Protocol
● HTTP-ILP
● Codius Cog
● Web Monetization
Resolving Human-Readable IDs to ILP Addresses
Application Layer Features
● Connection setup (TLS over ILP?)
● Requests for payment?
● Pull payments (using tokens)?
● Si...
BlockchainBanks Mobile Money Online Wallets
Help shape the Interledger architecture!
interledger.org @interledger
Interledger Protocol Stack Deep Dive @ Boston Interledger Meetup
Upcoming SlideShare
Loading in …5
×

Interledger Protocol Stack Deep Dive @ Boston Interledger Meetup

672 views

Published on

This presentation from the Boston Interledger Meetup goes into the technical details of the Interledger architecture. It describes how ILP integrates with different ledgers and Layer 2 networks, how ILPv4 works, and what the Transport and Application Layer protocols built on top of ILP look like.

Published in: Technology
  • Be the first to comment

Interledger Protocol Stack Deep Dive @ Boston Interledger Meetup

  1. 1. Interledger Protocol Stack Deep Dive Evan Schwartz Co-Inventor of Interledger @_emschwartz
  2. 2. Agenda 1. Internetworking Architecture 2. Ledger Integrations: HTLCs vs HTLAs 3. Interledger Protocol V4 4. Building on ILP: Transport & Application
  3. 3. Internet of Money Payments Value Blockchains Coins
  4. 4. The Internet Works the Same Over Ethernet, Fiber, Radio
  5. 5. IP Is So Network-Agnostic...
  6. 6. This is Why Protocols Designed for PDP-10s Work w/ iPhones
  7. 7. Internet Architecture IP PPP ETHERNET WIFI BLUETOOTH L3: Internetwork L2: Network L4: Transport TCP UDP QUIC L5: Application HTTP SMTP NNTP NTP RTP COPPER FIBER RADIO(L1: Physical)
  8. 8. Interledger Architecture ILP PAYMENT / STATE CHANNELS SIDECHAINS ... L3: Interledger L2 Network L4: Transport IPR PSK STREAM L5: Application SPSP HTTP-ILP PAYTORRENT BLOCKCHAINS CENTRAL LEDGERS(L1: Ledger)
  9. 9. Background Why layered protocol stacks?
  10. 10. Balancing Interoperability and Innovation More Standardization More Flexibility
  11. 11. Internet Architecture IP PPP ETHERNET WIFI BLUETOOTH L3: Internetwork L2: Network L4: Transport TCP UDP QUIC L5: Application HTTP SMTP NNTP NTP RTP COPPER FIBER RADIO(L1: Physical)
  12. 12. What features belong in each layer? ? ? L3: Interledger L2 Network L4: Transport ? L5: Application ? ?(L1: Ledger)
  13. 13. What interfaces should each layer provide to the others? ? ? L3: Interledger L2 Network L4: Transport ? L5: Application ? (L1: Ledger)
  14. 14. Background Securing multi-hop payments
  15. 15. Optimistic Execution (Correspondent Banking Today) EXECUTE
  16. 16. Optimistic Execution (Correspondent Banking Today) FAIL
  17. 17. 1. PREPARE 2. EXECUTE Two-Phase Execution Secures Multi-Hop Transfers REFERENCES J. Poon and T. Drya, The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments, 2015 S. Thomas and E. Schwartz, A Protocol for Interledger Payments, 2015
  18. 18. 1. PREPARE Sender Cannot Lose Money If Packet Is Dropped
  19. 19. 1. PREPARE 2. EXECUTE Malicious Intermediaries Lose Funds If Response Is Dropped
  20. 20. Background HTLCs vs HTLAs
  21. 21. Hashed Timelock Contract (HTLC): Ledger-Mediated
  22. 22. What if the ledger is too slow, expensive, or no HTLCs?
  23. 23. Hashed Timelock Agreements (HTLA) Are Purely P2P
  24. 24. HTLA: No Preimage → No Money
  25. 25. HTLA: Preimage → Money
  26. 26. HTLA: Preimage, No Money → No Future Business
  27. 27. HTLAs: Prepare, Fulfill, Settle, Repeat
  28. 28. What features are needed from ledgers (or Layer 2 networks)?
  29. 29. Layers 1 + 2 Ledger Integrations
  30. 30. There are a lot of blockchains out there!
  31. 31. Layer 2 Is a Hot Topic! ...And many more!
  32. 32. The Traditional Payment Space is Already Highly Fragmented
  33. 33. What features are common to all payment networks? What features can we expect?
  34. 34. Interledger.js Uses Plugins to Abstract Different Ledgers + L2s
  35. 35. Core Ledger Functions ● Send money ● Send data
  36. 36. Sending Data: BTP Uses Websockets for Secure P2P Comms
  37. 37. BTP 2.0 Is A Binary Request/Response Protocol
  38. 38. Sending Money: Settling HTLAs ?
  39. 39. What if the ledger is too slow or expensive?
  40. 40. Payment Channels Enable Fast, Free Settlement for HTLAs
  41. 41. XRP Ledger Payment Channels
  42. 42. Machinomy Library for ETH + ERC20 Payment Channels
  43. 43. Lightning Payments Used on Bitcoin
  44. 44. Payment channel plugins extend ilp-plugin-btp and ilp-plugin-mini-accounts
  45. 45. Plugins for on-ledger settlement extend ilp-plugin-payment
  46. 46. Layer 1 + 2 Must-Haves: ● Send data ● Send money Layer 1 + 2 Nice-To-Haves: ● Fast, Cheap Transfers OR ● (Unidirectional) Payment Channels ● Native Comms / Authentication
  47. 47. Layer 3 Interledger Protocol V4 (ILPv4)
  48. 48. ILPv4 Packet (Request)
  49. 49. ILPv4 Packet (Response, Error)
  50. 50. Example ILP Prepare Packet { "amount": "1000", "executionCondition": "3c36339587dbd93a815168c14478afcf3dcf77559c9ff0ca425b53317f32d56e", "expiresAt": "2018-05-22T19:41:20.724Z", "destination": "test.amundsen.bmp.btp18q1xrp.DZ3ec1t1idUwmt7e2uU82mUkmT2pKodAq-PRm4SoNlc.lo cal.0ttqOHeL_k9Hkdac-XFv4uyy-a3_Q6jbteIVU68ZIyY.ZQzhSKrtxjm10yuJQixQ9vct", "data": "a8bbf14d8331429627142fc19ad2e69ef7f3b45d576577ddd1027ec7ed43205e25ef6ff68a 76d2d26e6a7572cf5a7bc09952bfb7067d29f8edea1f17d42e41f36d1c4466b9d3f17cd54a 91ed55a0830702a36290ddad05e7bf41c5d61cac8ce9621e9f59a1dae637d23fcc1e648a99 497707d6a4a1ee85bb78a6b20550d9b99a9b14b9d4f51602c2bfacf9533a6d4c2c819faa6b 77d2592fc7dd75c5e522795e0f" }
  51. 51. Example ILP Fulfill Packet { "fulfillment": "c076b41108fa77c54a447e708f34c6d8114caec0b5a11df70ee31bcd99a4cb46", "data": "3f7cc52c5e93bbe6fd35571736c1089c0863fbfa21e6dbc945b4da7b077fde71c5d688c554 ae39226d7df7dde92c33d389335d09c4e1ea1ce3b9fe5a9a18275bc47c9c1cd0d30ea8403d " }
  52. 52. Example ILP Reject Packet { "code": "F99", "triggeredBy": "test.amundsen.bmp.btp18q1xrp.DZ3ec1t1idUwmt7e2uU82mUkmT2pKodAq-PRm4SoNlc.lo cal.0ttqOHeL_k9Hkdac-XFv4uyy-a3_Q6jbteIVU68ZIyY", "message": "", "data": "9e43eb8120564d3da393f80cc24d7f20b3144381c4d3cbc6c0679ab8b39fcba4b484fc50a0 497e24e2fb87e77ceb" }
  53. 53. ILP Addresses Are Hierarchical, Dot-Separated Strings
  54. 54. Questions Answered to Arrive At ILPv4 ● Crypto Conditions or SHA-256? ● Are conditions a ledger or Interledger concern? ● Address separator: dots, dashes, colons, >’s? ● Should packet include source address, options, QoS? ● Should packet include destination amount? ● Do we need a separate quoting protocol (ILQP?) ...and many more
  55. 55. Four People Spent A Full Day Debating Address Separators
  56. 56. ILPv4 is (arguably) the simplest possible protocol for internetworking value networks
  57. 57. Layer 4 Transport
  58. 58. Internet Architecture IP PPP ETHERNET WIFI BLUETOOTH L3: Internetwork L2: Network L4: Transport TCP UDP QUIC L5: Application HTTP SMTP NNTP NTP RTP COPPER FIBER RADIO(L1: Physical)
  59. 59. Transport layer provides helpful functionality needed by many applications
  60. 60. 1st Gen: Receiver-Generated Fulfillments
  61. 61. 2nd Gen: Sender-Generated Fulfillments
  62. 62. 3rd Gen: In-Protocol Quoting
  63. 63. 4th Gen: Quoting and Streaming
  64. 64. STREAM Client and Server Communicate Over ILP Client Server Interledger
  65. 65. STREAM Handles Bi-Directional Sending Client Server
  66. 66. STREAM Connections Consist of Multiple Logical Streams
  67. 67. STREAM Features
  68. 68. STREAM Packets Are Opaque to Intermediaries
  69. 69. STREAM Packets Are Composed of a Header + Frames
  70. 70. Layer 5 Application
  71. 71. Application layer has undergone many iterations but more work to do using STREAM
  72. 72. Previously, Application Layer just meant connection setup
  73. 73. Application Layer Protocols To-Date ● Simple Payment Setup Protocol ● HTTP-ILP ● Codius Cog ● Web Monetization
  74. 74. Resolving Human-Readable IDs to ILP Addresses
  75. 75. Application Layer Features ● Connection setup (TLS over ILP?) ● Requests for payment? ● Pull payments (using tokens)? ● Signed receipts? ● HTTP over ILP? (Get involved in this development!)
  76. 76. BlockchainBanks Mobile Money Online Wallets Help shape the Interledger architecture! interledger.org @interledger

×