how ilp works

64
How It Works Evan Schwartz & Stefan Thomas ILP Packet, Addressing, Routing

Upload: interledger

Post on 11-Apr-2017

189 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: How ILP Works

How It Works

Evan Schwartz & Stefan Thomas

ILP Packet, Addressing, Routing

Page 2: How ILP Works

Ledgers Track Accounts and Balances

Sender RecipientLedger

2

Page 3: How ILP Works

But Not Everyone Is on the Same Ledger

3

Page 4: How ILP Works

Connectors Relay Money

Connector

Alice 100

Chloe 0

Chloe 110

Bob 0100 110

4

Page 5: How ILP Works

Connectors Convert Currencies

Connector

Alice 100

Chloe 0

Chloe 110

Bob 0100 110

5

Page 6: How ILP Works

How do we ask a connectorto pass on a payment?

Page 7: How ILP Works

We Need a Way to Send Instructions to Connectors

Alice 100

Chloe 0

Chloe 110

Bob 0

7

Um, excuse me? ...hello there…? ZZZZZZ

Page 8: How ILP Works

address: "us.wf.bob"

Interledger In One Slide

Hierarchical identifier

Decimal amountamount: "1023.20"

Page 9: How ILP Works

us.wf.bob1023.20

Page 10: How ILP Works

Sender Attaches Packet to Local Transfer

Alice 100

Chloe 0

Chloe 110

Bob 0100

10

us.wf.bob1023.20

Page 11: How ILP Works

Connector Forwards the Packet via Another Transfer

Alice 0

Chloe 100

Chloe 110

Bob 0

11

us.wf.bob1023.20

110

Page 12: How ILP Works

Paths Can Be Short

12

Page 13: How ILP Works

Or Long

13

Page 14: How ILP Works

Uh oh...

14

Page 15: How ILP Works

Can we trust connectors?

Page 16: How ILP Works

If Connectors Fail, Would We Lose Money?

Alice 100

Chloe 0

Chloe 110

Bob 0

?

100

16

Page 17: How ILP Works

Holds Provide Security

Page 18: How ILP Works

Ledgers Provide Hold Functionality

Alice 100

On Hold 0

Chloe 0

Chloe 110

On Hold 0

Bob 0

18

Page 19: How ILP Works

Holds Are Dependent on Conditions + Expiries

19

EXECUTEROLLBACK

Page 20: How ILP Works

Condition Fulfillment Executes Transfer

20

EXECUTEROLLBACK

Page 21: How ILP Works

Timeouts Cause Funds to Be Returned

21

EXECUTEROLLBACK

Page 22: How ILP Works

address: "us.wf.bob"amount: "1023.20"expiry: "2016-07-06T09:00:10Z"condition: "cc:0:3:4a7DEpj8f9..."

Interledger In One Slide (Really)

Timestamp (ISO 8601)

Crypto Condition

Page 23: How ILP Works

Funds Are Committed From Left to Right

23

Alice 100

On Hold 0

Chloe 0

Chloe 110

On Hold 0

Bob 0

COMMITMENT

Page 24: How ILP Works

Sender Puts Funds On Hold

Alice 100

On Hold 0

Chloe 0

Chloe 110

On Hold 0

Bob 0

100

24

us.wf.bob1023.20cc:0:3:4a...2016-07...

Page 25: How ILP Works

Connector Gets Notification of Funds on Hold

Alice 0

On Hold 100

Chloe 0

Chloe 110

On Hold 0

Bob 0

25

us.wf.bob1023.20cc:0:3:4a...2016-07...

?

Page 26: How ILP Works

Connector Puts Funds on Hold

Alice 0

On Hold 100

Chloe 0

Chloe 110

On Hold 0

Bob 0

26

us.wf.bob1023.20cc:0:3:4a...2016-07...

110?

Page 27: How ILP Works

Recipient Gets Notification of Funds on Hold

Alice 0

On Hold 100

Chloe 0

Chloe 0

On Hold 110

Bob 0

27

us.wf.bob1023.20cc:0:3:4a...2016-07...

? ?

Page 28: How ILP Works

Recipient Triggers Payment by Fulfilling the Condition

Page 29: How ILP Works

Transfers Are Executed Right to Left

29

Alice 0

On Hold 100

Chloe 0

Chloe 0

On Hold 110

Bob 0

EXECUTION

? ?

Page 30: How ILP Works

Recipient Signs Receipt

Alice 0

On Hold 100

Chloe 0

Chloe 0

On Hold 110

Bob 0

30

? ?

Page 31: How ILP Works

Signature Fulfills Condition, Ledger Releases Held Funds

Alice 0

On Hold 100

Chloe 0

Chloe 0

On Hold 110

Bob 0110

31

?

Page 32: How ILP Works

How Does the Connector Get Reimbursed?

Alice 0

On Hold 100

Chloe 0

Chloe 0

On Hold 0

Bob 110

32

?

?

Page 33: How ILP Works

Connector is Notified That Funds Have Been Released

Alice 0

On Hold 100

Chloe 0

Chloe 0

On Hold 0

Bob 110

33

?

Page 34: How ILP Works

Connector Passes on the Recipient’s Signature

Alice 0

On Hold 100

Chloe 0

Chloe 0

On Hold 0

Bob 110

34

?

Page 35: How ILP Works

Receipt Releases Funds from Hold

Alice 0

On Hold 100

Chloe 0

Chloe 0

On Hold 0

Bob 110

35

100

Page 36: How ILP Works

Sender Gets Non-Repudiable Proof of Payment

Alice 0

On Hold 0

Chloe 100

Chloe 0

On Hold 0

Bob 110

36

Page 37: How ILP Works

37

COMMITMENT

Transfers Are Committed L2R, Executed R2L

EXECUTION

Page 38: How ILP Works

(Now) Paths Can Be Short

38

Page 39: How ILP Works

Or Long

39

Page 40: How ILP Works

Or Long (And Still Secure)

40

Page 41: How ILP Works

The Interledger

Page 42: How ILP Works

address: "us.wf.bob"amount: "1023.20"expiry: "2016-07-06T09:00:10Z"condition: "cc:0:3:4a7DEpj8f9..."

Enabled By a Simple Packet Format

Page 43: How ILP Works

How do those addresses work?

Page 44: How ILP Works

address: "us.wf.bob"ledger account

Interledger Addresses

Page 45: How ILP Works

address: "us.wf.bob.mary"ledger subledger

Interledger Addresses

account

Page 46: How ILP Works

Connectors Convert Currencies

Connector

Alice 100

Chloe 0

Chloe 110

Bob 0100 110

46

Page 47: How ILP Works

Where does this rate come from?

Page 48: How ILP Works

Liquidity Curves Determine Exchange Rates

48

Connie

Page 49: How ILP Works

Connectors Set Rates per Ledger Pair

49

Ledger A

Ledger B

Ledger C

Ledger DA ⇒ B

A ⇒ C

A ⇒ D

Page 50: How ILP Works

Connectors Advertise Their Routes

50

A ⇒ BLedger Z Carmine

Page 51: How ILP Works

Synthetic Routes Are Created

51

A ⇒ BZ ⇒ A

Page 52: How ILP Works

Synthetic Routes Are Created

52

A ⇒ BZ ⇒ A

= Z ⇒ A ⇒ B

Page 53: How ILP Works

And Added to the Routing Table

53

Z ⇒ A ⇒ B

Connie

Z ⇒ A ⇒ C

Connie

Z ⇒ A ⇒ D

Connie

Page 54: How ILP Works

Routing Tables Grow Quickly

54

Z ⇒ A Local

Z ⇒ A ⇒ B

Connie

Z ⇒ A ⇒ C

Connie

Z ⇒ A ⇒ D

Connie

Z ⇒ C Local

Z ⇒ C ⇒ E Chao

Z ⇒ C ⇒ F Carl

Page 55: How ILP Works

Autonomous Systems

Page 56: How ILP Works

Core vs. Periphery

Page 57: How ILP Works

Routing a Payment

us.wf.bob.car1023.20

Page 58: How ILP Works

First We Route Up

us.wf.bob.car1023.20

Page 59: How ILP Works

Then Across

us.wf

us.wf.bob.car1023.20

Page 60: How ILP Works

Then Across

us.wf

us.wf.bob.car1023.20

Page 61: How ILP Works

And Finally Down

us.wf

us.wf.bob.car1023.20

us.wf.bob

Page 62: How ILP Works

And Finally Down

us.wf

us.wf.bob

us.wf.bob.carus.wf.bob.car1023.20

Page 63: How ILP Works

Some Ledgers Aren't Real Ledgers

us.wf

us.wf.bob

us.wf.bob.car

us.*

Page 64: How ILP Works

Questions?