ripple developer conference 2013 at money2020

148

Upload: ripple-labs

Post on 06-May-2015

5.263 views

Category:

Technology


4 download

DESCRIPTION

These slides were presented at Ripple Labs' first developer confernece on Oct 10, 2013 at Money2020 in Las Vegas, NV. The agenda was as follows: 1. Welcome and Introduction, Chris Larsen CEO Chris Larsen provided an overview of Ripple and shared the latest news. 2. Ripple Technical Overview, Evan Schwartz Engineer Evan Schwartz upacked Ripple from a technical perspective, and offered examples of what developers could build and have built on the Ripple Network. 3. Integrating with Ripple for Merchants and Gateways, Bob Way, Denis Kiselev and Brian Keller-Heikkila Integration Engineer Bob Way explained how merchant and gateway integration works. Bob interviewed Denis Kiselev, founder and CEO of SnapSwap, about his team’s experience building the first U.S. Ripple Gateway. Brian Keller-Heikkila, CTO of ZipZap, joined Bob and Denis on stage to share special news. 4. Ripple Architecture and Advanced Uses, David Schwartz Chief Cryptographer David Schwartz discussed Ripple’s architecture, including a deep-dive on consensus, and interesting, advanced applications to consider. 5. Future Focus for Our Engineering Team, Stefan Thomas CTO Stefan Thomas offered a sneak peak of our roadmap.

TRANSCRIPT

Page 1: Ripple Developer Conference 2013 at Money2020
Page 2: Ripple Developer Conference 2013 at Money2020

Agenda8:30-9:30am – Registration

9:30-9:50am  – Welcome and Introduction, Chris Larsen, CEO, Ripple Labs

9:50-10:20am  – Ripple Technical Overview, Evan Schwartz, Software Engineer, Ripple Labs 

10:20-11:10am  – Integrating with Ripple for Merchants and Gateways, Bob Way, Integration Engineer, Ripple Labs; Denis Kiselev, CEO, SnapSwap; and Brian Keller-

Heikkila, CTO, ZipZap

11:10-11:20am  – Break

11:20am-12:10pm  – Ripple Architecture and Advanced Uses, David Schwartz, Chief

Cryptographer, Ripple Labs

12:10-12:30pm  – Future Focus for Our Engineering Team, Stefan Thomas, CTO, Ripple Labs

12:30 onward – Networking

Page 3: Ripple Developer Conference 2013 at Money2020

Summary

• a distributed payments protocol

• a new currency - ripples (XRP)

• the world’s first distributed

currency exchange

Chris Larsen, CEO, Ripple Labs

Ripple and Ripple Labs

• venture backed company that

contributes code and promotes

the Ripple protocol

Page 4: Ripple Developer Conference 2013 at Money2020

Math Based Currency Movement• Focus: Erosion of trust political currencies

• Solution: Trust in math relationship of servers in a distributed network

- No central authority to debase money supply.

- Fixed amount that can’t increase

Chris Larsen, CEO, Ripple Labs

AU BTC/XRP/LTC

Page 5: Ripple Developer Conference 2013 at Money2020

Virtual Currency is Just the Beginning

Chris Larsen, CEO, Ripple Labs

Page 6: Ripple Developer Conference 2013 at Money2020

The World Needs a Transaction Web Protocol

Information Exchange

Chris Larsen, CEO, Ripple Labs

Value Exchange“world is flat” “world is curved”

Page 7: Ripple Developer Conference 2013 at Money2020

Confirmation in a Decentralized System• Reward first ‘miner’ to solve a

math problem that is a confirmation.

• Need extremely powerful computers, energy intensive.

• Average 10 minute confirmations

Mining Method (Bitcoin)

Chris Larsen, CEO, Ripple Labs

• Current state of global ledger.

• Transactions that are valid to majority of servers are updated to ledger.

• 5-10 second confirmations.

Consensus Method (Ripple)

Page 8: Ripple Developer Conference 2013 at Money2020

Benefits as a Payment Protocol

Any Currency Global No Chargebacks Fast Free

Chris Larsen, CEO, Ripple Labs

Page 9: Ripple Developer Conference 2013 at Money2020

Peer-to-Peer Architecture

Chris Larsen, CEO, Ripple Labs

Page 10: Ripple Developer Conference 2013 at Money2020

A Common Ledger

Chris Larsen, CEO, Ripple Labs

Page 11: Ripple Developer Conference 2013 at Money2020

Ripple is a Protocol

• Ripple is a set of standards

• “Server Calls” to Send, Receive, etc.

• Transact without Intermediaries

• Decentralized System

• Open to Developers

• No Network Operator

Like SMTP, a Protocol for Moving Money

Chris Larsen, CEO, Ripple Labs

Page 12: Ripple Developer Conference 2013 at Money2020

Gateways

• Gateways take deposits and issue local currency balances on Ripple

• Balances can be transferred across the ledger without intermediaries

• Gateways earn fees as they wish

Cash in, Cash Out

Chris Larsen, CEO, Ripple Labs

Page 13: Ripple Developer Conference 2013 at Money2020

Distributed Exchange

• Can create bid/ask offers for any currency pair

from any issuer

• Participants can profit from forex spreads

• Ripple routes transactions through a path

finding algorithm to find the lowest cost

execution

• Supports algorithm-driven trading

Chris Larsen, CEO, Ripple Labs

Page 14: Ripple Developer Conference 2013 at Money2020

The Role of XRP in Ripple

Chris Larsen, CEO, Ripple Labs

1. protects network from:- DDOS attacks- ledger spam

2. universal medium of exchange- no counterparty- every node trusts

Page 15: Ripple Developer Conference 2013 at Money2020

Pre-Mining

The Network

– Build and incent an amazing team (Ripple Labs)

Utility

– Give away XRP to as many consumers as possible

Liquidity

– Incent market makers with long-term forgivable XRP loans

Ripple doesn’t need to incent transaction validators with XRP, so mining is optional. Instead we chose to use XRP to support:

Chris Larsen, CEO, Ripple Labs

Page 16: Ripple Developer Conference 2013 at Money2020
Page 17: Ripple Developer Conference 2013 at Money2020

What, How, Who Cares?Some text goes here

(in 20 minutes)

Evan Schwartz

Page 18: Ripple Developer Conference 2013 at Money2020

Some text goes here

What is Ripple?

Evan Schwartz

Page 19: Ripple Developer Conference 2013 at Money2020

Some text goes here

Open Source Payment Network

Evan Schwartz

Page 20: Ripple Developer Conference 2013 at Money2020

Some text goes here

Four Types of Users

Basic Users Merchants Market Makers

Gateways

Evan Schwartz

Page 21: Ripple Developer Conference 2013 at Money2020

Some text goes here

Basic User Experience

Evan Schwartz

Page 22: Ripple Developer Conference 2013 at Money2020

Some text goes here

Basic User Experience

What could you

do with that?

Evan Schwartz

Page 23: Ripple Developer Conference 2013 at Money2020

Some text goes here

Merchant Experience

Evan Schwartz

Page 24: Ripple Developer Conference 2013 at Money2020

Some text goes here

Basic User Experience What could you

do with that?

Evan Schwartz

Page 25: Ripple Developer Conference 2013 at Money2020

Some text goes here

Market Maker Experience

Evan Schwartz

Page 26: Ripple Developer Conference 2013 at Money2020

Some text goes here

Market Maker Experience

Evan Schwartz

Page 27: Ripple Developer Conference 2013 at Money2020

Some text goes here

Basic User Experience

Interesting…

Evan Schwartz

Page 28: Ripple Developer Conference 2013 at Money2020

Some text goes here

Gateway Experience

Evan Schwartz

Page 29: Ripple Developer Conference 2013 at Money2020

Some text goes here

Gateway Experience

Evan Schwartz

Page 30: Ripple Developer Conference 2013 at Money2020

Some text goes here

Transactions in any currency?

Evan Schwartz

Page 31: Ripple Developer Conference 2013 at Money2020

Some text goes here

Too many pairsof currencies

Evan Schwartz

Page 32: Ripple Developer Conference 2013 at Money2020

Some text goes here

XRP connects people

Evan Schwartz

Page 33: Ripple Developer Conference 2013 at Money2020

Some text goes here

XRP connectscurrencies

Evan Schwartz

Page 34: Ripple Developer Conference 2013 at Money2020

Some text goes here

Basic User Experience

Evan Schwartz

Page 35: Ripple Developer Conference 2013 at Money2020

Some text goes here

Basic User Experience

Did you really need a caption?

Evan Schwartz

Page 36: Ripple Developer Conference 2013 at Money2020

Some text goes here

Coding time!

Evan Schwartz

Page 37: Ripple Developer Conference 2013 at Money2020
Page 38: Ripple Developer Conference 2013 at Money2020

Bob Way, Integration Engineer

Business Integration

Page 39: Ripple Developer Conference 2013 at Money2020

Ripple Integration

1. Set-up your Ripple account and trust lines.

2. Install a local rippled server

3. Automate your business processes

Three Steps

Bob Way, Integration Engineer

Page 40: Ripple Developer Conference 2013 at Money2020

Step 1The Ripple Ledger

Bob Way, Integration Engineer

Page 41: Ripple Developer Conference 2013 at Money2020

NewGateA gateway in 10 minutes

NewGate

Bob Way, Integration Engineer

Page 42: Ripple Developer Conference 2013 at Money2020

NewGateuser trust

NewGate

Alice

Bob Way, Integration Engineer

Page 43: Ripple Developer Conference 2013 at Money2020

NewGateuser trust

NewGate

Alice

Bob Way, Integration Engineer

Page 44: Ripple Developer Conference 2013 at Money2020

deposit

NewGate

$5

Alice

NewGate

Bob Way, Integration Engineer

Page 45: Ripple Developer Conference 2013 at Money2020

second user trust

NewGate

$5

Alice Bob

NewGate

Bob Way, Integration Engineer

Page 46: Ripple Developer Conference 2013 at Money2020

payment

NewGate $5

Alice Bob

NewGate

Bob Way, Integration Engineer

Page 47: Ripple Developer Conference 2013 at Money2020

payment

NewGate $5

Alice Bob

NewGate

Bob Way, Integration Engineer

Page 48: Ripple Developer Conference 2013 at Money2020

withdrawal

NewGate $4

$1

Alice Bob

NewGate

Bob Way, Integration Engineer

Page 49: Ripple Developer Conference 2013 at Money2020

NewGate $4

LAME!

make it real!

Alice Bob

NewGate

Bob Way, Integration Engineer

Page 50: Ripple Developer Conference 2013 at Money2020

making it real!

NewGate

BitstampSnapSwap

OffersBitcoin

฿Outbound Bridge

$4

Alice Bob

NewGate

Bob Way, Integration Engineer

Page 51: Ripple Developer Conference 2013 at Money2020

liquidity

NewGate $4

$10

$10

Alice Bob

Mark

NewGate

Bob Way, Integration Engineer

BitstampSnapSwap

OffersBitcoin

฿Outbound Bridge

Page 52: Ripple Developer Conference 2013 at Money2020

$10

BitstampSnapSwap

OffersBitcoin

฿Outbound Bridge

inter-gateway payment

NewGate $2

$10

$8

$2

Alice Bob

Mark

NewGate

Bob Way, Integration Engineer

Page 53: Ripple Developer Conference 2013 at Money2020

pay anyone

NewGate $2

$8

Alice Bob

Mark

$2

NewGate

Bob Way, Integration Engineer

$10

BitstampSnapSwap

OffersBitcoin

฿Outbound Bridge

Page 54: Ripple Developer Conference 2013 at Money2020

$8$8

BitstampSnapSwap

OffersBitcoin

฿Outbound Bridge

Denis Kiselev

NewGate

SnapSwap

$8

Alice Bob

Mark

$4

SnapSwap

Denis

$2

Bob Way, Integration Engineer

Page 55: Ripple Developer Conference 2013 at Money2020

Denis KiselevCEO SnapSwap

Page 56: Ripple Developer Conference 2013 at Money2020
Page 57: Ripple Developer Conference 2013 at Money2020
Page 58: Ripple Developer Conference 2013 at Money2020
Page 59: Ripple Developer Conference 2013 at Money2020
Page 60: Ripple Developer Conference 2013 at Money2020

Bob Way, Integration Engineer

NewGateautomation

NewGate

Page 61: Ripple Developer Conference 2013 at Money2020

web application

NewGate

Bob Way, Integration Engineer

NewGate

Code

Page 62: Ripple Developer Conference 2013 at Money2020

user interface

NewGate

Bob Way, Integration Engineer

NewGate

Code

Page 63: Ripple Developer Conference 2013 at Money2020

funds interface

NewGate

Bob Way, Integration Engineer

NewGate

Code

Page 64: Ripple Developer Conference 2013 at Money2020

rippled interface

NewGate

Bob Way, Integration Engineer

NewGate

Code

Page 65: Ripple Developer Conference 2013 at Money2020

Step 2Install rippled

Bob Way, Integration Engineer

Page 66: Ripple Developer Conference 2013 at Money2020

JSON messages over websockets or RPC

NewGate

Bob Way, Integration Engineer

NewGate

Code

Page 67: Ripple Developer Conference 2013 at Money2020

Bob Way, Integration Engineer

Step 3Using the rippled API

Page 68: Ripple Developer Conference 2013 at Money2020

Bob Way, Integration Engineer

Two Core Tasks1) receive incoming payments

Code

Monitor for incoming payments

Page 69: Ripple Developer Conference 2013 at Money2020

Bob Way, Integration Engineer

Monitoring your Ripple address

{"command":"account_info","account":"rUPotLj5CNKaP4bQANcecEuT8hai3VpxfB",

}

account_info - websocket command

websocket

Page 70: Ripple Developer Conference 2013 at Money2020

Bob Way, Integration Engineer

Monitoring your Ripple address

curl -X POST -d '{

"method": "account_ingo", "params": [ { "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", }]

}' http://s1.ripple.com:51234

account_info - RPC Call

rpc

Page 71: Ripple Developer Conference 2013 at Money2020

Bob Way, Integration Engineer

{ "result":{ "account_data":{

"Account":"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh","Balance":"114459798","EmailHash":"DF1352F23CD32812F4850B878AE4944C","Flags":0,"LedgerEntryType":"AccountRoot","OwnerCount":0,"PreviousTxnID":"0FA9B61C5EED265BAAA3...","PreviousTxnLgrSeq":2169731,"Sequence":26510,"TransferRate":4294967295,"index":"2B6AC232AA4C4BE41BF49D245...","urlgravatar":"

http://www.gravatar.com/avatar/df1352f23cd32812f4850b878ae4944c"},"ledger_current_index":2671768,

status":"success"}}

account_inforesponse

Page 72: Ripple Developer Conference 2013 at Money2020

Bob Way, Integration Engineer

Monitoring your Ripple address

account_infoaccount_linesaccount_txaccount_offers

api calls

Page 73: Ripple Developer Conference 2013 at Money2020

Bob Way, Integration Engineer

Two Core Tasks2) send outgoing payments

Code

Send outgoing payments

Page 74: Ripple Developer Conference 2013 at Money2020

Bob Way, Integration Engineer

Sending Payments

ripple_path_findpath_findformat “payment” transactionsignsubmit

api calls

Page 75: Ripple Developer Conference 2013 at Money2020

Bob Way, Integration Engineer

Tools

Understanding the Ledger

Woot!

• ripple.com/graph

• ripple.com/tools/info

Learning the JSON API• ripple.com/wiki/RPC_API

• ripple.com/tools/api/

For Your ripple.txt File• ripple.com/tools/txt/

Page 76: Ripple Developer Conference 2013 at Money2020

Bob Way, Integration Engineer

Brian Keller-KeikkilaCTO ZipZap

Page 77: Ripple Developer Conference 2013 at Money2020

Bob Way, Integration Engineer

integration

Pay with CASH.

Page 78: Ripple Developer Conference 2013 at Money2020

Bob Way, Integration Engineer

ZipZapintegration

Bob

ZipZap Merchants

Alice

$

$

PaymentCenter

Page 79: Ripple Developer Conference 2013 at Money2020

Bob Way, Integration Engineer

ZipZapintegration

$

Bitstamp

SnapSwap

ZipZap

Page 80: Ripple Developer Conference 2013 at Money2020

Bob Way, Integration Engineer

ZipZapintegration

$

Bitstamp

SnapSwap

Page 81: Ripple Developer Conference 2013 at Money2020

Bob Way, Integration Engineer

ZipZapintegration

$

ZipZap

Bitstamp

SnapSwap

Page 82: Ripple Developer Conference 2013 at Money2020

Bob Way, Integration Engineer

ZipZapintegration

SnapSwapBitstamp

ZipZap

$ $

Page 83: Ripple Developer Conference 2013 at Money2020

PaymentCenter

Bob Way, Integration Engineer

ZipZapintegration

SnapSwapBitstamp

$ $

$

ZipZap

$

Alice

Page 84: Ripple Developer Conference 2013 at Money2020

PaymentCenter

Bob Way, Integration Engineer

ZipZapintegration

SnapSwapBitstamp

$

$

$ $

ZipZap

Alice

Page 85: Ripple Developer Conference 2013 at Money2020

Bob Way, Integration Engineer

integration

Page 86: Ripple Developer Conference 2013 at Money2020

What’s Next?

THE WORLD.

Bob Way, Integration Engineer

integration

Page 87: Ripple Developer Conference 2013 at Money2020

10 Minute BreakSome text goes here

Page 88: Ripple Developer Conference 2013 at Money2020
Page 89: Ripple Developer Conference 2013 at Money2020

About Me

I’m the Chief Cryptographer at Ripple Labs.

I’m also known as JoelKatz on the Bitcoin forums and am told that I am a leading voice in the crypto-currency community.

Before that, I developed secure messaging and storage systems used by companies such as CNN and government agencies including the NSA.

David Schwartz

Some text goes here

David Schwartz, Chief Cryptographer

Page 90: Ripple Developer Conference 2013 at Money2020

• Open source, ISC license.

• Public ledger, public transactions, public history.

• Equal access, peer-to-peer, no central authority.

• Ledger modified by cryptographically signed transactions.

• Fast transactions with reliable confirmation.

• Sophisticated cross-currency and cross-issuer payments.

Key Features

A platform for issuing, holding, transferring, and trading arbitrary assets.

David Schwartz, Chief Cryptographer

Page 91: Ripple Developer Conference 2013 at Money2020

Ledger

• Every server can keep a full copy of the current ledger.

• Ledger contains all balances and offers.

• Previous ledgers and previous transactions are not needed.

• The ledger is organized as a chain of hash trees.

- A single 256-bit number identifies a ledger by hash

- Once you know a ledger’s hash, you can walk the hash tree to see the ledger’s

contents.

- You can walk the hash tree to prior ledgers efficiently.

Key Features

The ledger is public.

David Schwartz, Chief Cryptographer

Page 92: Ripple Developer Conference 2013 at Money2020

Ledger Contents

• Header

• State Tree

• Transaction Tree

Ledger Contents

A new ledger built every 5 to 30 seconds.

David Schwartz, Chief Cryptographer

Page 93: Ripple Developer Conference 2013 at Money2020

Ledger Contents

• Ledger sequence number

• Total XRP in existence

• Hash of the previous ledger

• Hash of the account tree and the transaction tree

• Close time of this ledger and the previous ledger

Ledger Header

David Schwartz, Chief Cryptographer

Page 94: Ripple Developer Conference 2013 at Money2020

Ledger Contents

• Organized as a Merkle tree of radix nodes.

- Inner nodes hold indexed links to hashes of other nodes.

- Leaf nodes hold data.

• Each node has a 256-bit index and a 256-bit hash.

• Leaf nodes can easily be looked up by index.

• Provides fast search and traverse by index.

• Efficient synchronization and comparison.

Hash Tree

David Schwartz, Chief Cryptographer

Page 95: Ripple Developer Conference 2013 at Money2020

Ledger Contents

• Holds the state of the Ripple network.

• Structured as an indexed hash tree.

• Contains accounts, balances, pathways, offers, and other persistent data.

• Contains some structural information and indexes.

• Represents the state after transactions are applied.

• Holds entries in a binary format that can be converted to and from JSON.

State Tree

David Schwartz, Chief Cryptographer

Page 96: Ripple Developer Conference 2013 at Money2020

Ledger Contents

• Account root

• Ripple state

• Offer

• Directory

• Fee settings

• Features

• Ledger Hashes

Key Entry Types

State Tree

David Schwartz, Chief Cryptographer

Page 97: Ripple Developer Conference 2013 at Money2020

Ledger Contents

{      "Account" : "rKu4m1UDLGxR6fjhdNEVWrF4gCDhpocWAQ",      "Balance" : "199999990",      "Flags" : 0,      "LedgerEntryType" : "AccountRoot",      "OwnerCount" : 0,      "PreviousTxnID" : "922345F7771870688116ABD484960D5A566F38C...",  "PreviousTxnLgrSeq" : 339000,  "Sequence" : 2,  "index" : "00118F9DC4F5767D6927A98FF749C..."}

Sample Entry

State Tree

David Schwartz, Chief Cryptographer

Page 98: Ripple Developer Conference 2013 at Money2020

Ledger Contents

• Also structured as an indexed hash tree.

• Contains all transactions applied in this ledger.

• Includes metadata for each transaction.

• Metadata justifies changes to state tree entries.

Transaction Tree

David Schwartz, Chief Cryptographer

Page 99: Ripple Developer Conference 2013 at Money2020

Transactions

• Account

• Public Key

• Signature

• Fee

• Type

• Sequence

• Type-specific information

Basic Structure

Cryptographically signed authorizations to modify ledger state

David Schwartz, Chief Cryptographer

Page 100: Ripple Developer Conference 2013 at Money2020

Transactions

{ "Account" : "rMWUykAmNQDaM9poSes8VLDZDDKEbmo7MX", "Fee" : "10", "Flags" : 0, "OfferSequence" : 62462, "Sequence" : 582232, "SigningPubKey" : "0256C64F0378DCCCB4E0224B36F7ED1…", "TransactionType" : "OfferCancel", "TxnSignature" : "3044022000ED14…", "hash" : "FC6F9BC14A7DA643…“}

Sample Transaction

This real transaction was randomly selected.

David Schwartz, Chief Cryptographer

Page 101: Ripple Developer Conference 2013 at Money2020

Transactions

Metadata

Metadata justifies ledger changes

David Schwartz, Chief Cryptographer

{ "ModifiedNode" : { "LedgerEntryType" : "AccountRoot", "LedgerIndex" : "56091AD066271ED03B106812AD376D48F12680…", "PreviousFields" : { "Balance" : "1994177177", "Sequence" : 582232 }, "FinalFields" : { "Account" : "rMWUykAmNQDaM9poSes8VLDZDDKEbmo7MX", "Balance" : "1994177167", "Flags" : 0, "OwnerCount" : 71, "Sequence" : 582233 }, "PreviousTxnID" : "A4BEFDE98429C0C3C310C6FF548ECD73C6E22…", "PreviousTxnLgrSeq" : 2438196 }

Page 102: Ripple Developer Conference 2013 at Money2020

Consensus

• Ripple’s method of solving the double spend problem

• Validators agree on a group of transactions to be applied in a given ledger

• Validators sign each ledger they build

• Analogous to a room full of people trying to agree

• All honest servers place a high value on agreement, second only to correctness

Key Points

Consensus establishes transaction ordering

David Schwartz, Chief Cryptographer

Page 103: Ripple Developer Conference 2013 at Money2020

Consensus

• Other aspects of the double spend problem are easily solved with deterministic rules

• We have a public ledger

• Ripple has deterministic rules for

- Transaction validity

- Transaction execution

- Transaction ordering within a ledger

• If one transaction must come before the other, then we can easily see that the second one

must fail

Why is transaction ordering important?

Consensus establishes transaction ordering

David Schwartz, Chief Cryptographer

Page 104: Ripple Developer Conference 2013 at Money2020

Consensus

• Agree on the last closed ledger

• Propose sets of transactions to include in the next ledger

• Avalanche to consensus

• Apply agreed transactions according to deterministic rules

• Publish a signed validation of the new last closed ledger

What do validators do?

Consensus establishes transaction ordering

David Schwartz, Chief Cryptographer

Page 105: Ripple Developer Conference 2013 at Money2020

Consensus

• If a transaction has no reason not to be included, all honest validators will vote to

include it.

• If a transaction has some reason not to be included, it is okay if it is not included

• Valid transactions that do not get into the consensus set will be voted into the next set

by all honest validators

• Algorithm is biased to exclude transactions to reduce overlap required

Why is consensus robust?

Consensus establishes transaction ordering

David Schwartz, Chief Cryptographer

Page 106: Ripple Developer Conference 2013 at Money2020

Consensus

• Every honest participant values agreement over everything but correctness

• Validations act as a safety.

• Network splits can be detected as they happen

• Validation performance can be monitored, treachery can be proven

Why is consensus robust?

Consensus establishes transaction ordering

David Schwartz, Chief Cryptographer

Page 107: Ripple Developer Conference 2013 at Money2020

Payments

• Payments succeed or fail atomically.

• Payments are fully confirmed at a well-defined point.

• You cannot give someone an asset they have not agreed to hold.

• A “maximum amount to send” field handles slippage.

Characteristics of Ripple payments

Pathfinding makes sophisticated payments possible

David Schwartz, Chief Cryptographer

Page 108: Ripple Developer Conference 2013 at Money2020

PaymentsAll payments except simple XRP payments require a path

- Alice pays Bob through Gateway.

- Alice’s balance with Gateway goes down.

- Bob’s balance with Gateway goes up.

- Gateway sees no net balance change, or an increase if they charge a transaction fee.

- Bob must already have agreed to accept USD from the Gateway or this path is

unusable.

David Schwartz, Chief Cryptographer

Page 109: Ripple Developer Conference 2013 at Money2020

PaymentsCross-currency path

- Alice sees her USD balance drop. Bob sees his BTC balance increase.

- Those who placed offers see their USD balances increase and their BTC balances

decrease.

- Gateways do not have to deal with any cross-currency aspects.

- Order books link gateways.

David Schwartz, Chief Cryptographer

Page 110: Ripple Developer Conference 2013 at Money2020

Payments

An account to account link uses a pathway to move funds from one account to another.

It is helpful to think of funds as being transferred by their issuers.

An intermediary account in a payment path with two account-to-account links will see one balance increase and the other decrease.

Account links cannot change currencies, only issuers.

Account to Account Link

Two types of path links

Order book links can change currencies.

Path specifies the order book, not specific orders.

Order book links appear with account links for their issuers.

Order Book Link

David Schwartz, Chief Cryptographer

Page 111: Ripple Developer Conference 2013 at Money2020

Payments

Only one server needs to do the pathfinding work for a given payment.

Pathfinding generates a set of paths for the transaction and gives an estimate of the cost.

Degrees of separation tend to be short.

Current Ripple servers use a table driven pathfinding engine.

There is room for innovation in path finding.

Pathfinding

Every validator executes the transaction.

Path set is already known.

Order books are indexed to make execution efficient.

Paths are taken incrementally and more than one path can be used to get the best rate.

Payments succeed or fail atomically.

Must be completely deterministic.

Execution

Division of labor

David Schwartz, Chief Cryptographer

Page 112: Ripple Developer Conference 2013 at Money2020

Trading

Marking making is offering to buy and sell the same asset over a period of time.

Market making in Ripple makes large payments possible and improves rates.

Market makers link cash-in networks with cash-out networks, making remittance efficient.

Market Making

Arbitrage is buying and selling the same asset at approximately the same time to profit from a difference in price.

Internal arbitrage involves only transactions inside the Ripple network. While there will be internal arbitrage opportunity in the Ripple network, everyone will be competing for the same opportunities.

External arbitrage involves matching transactions inside the Ripple network with transactions outside the Ripple network.

Arbitrage

Ripple supports order books between all asset pairs.

David Schwartz, Chief Cryptographer

Page 113: Ripple Developer Conference 2013 at Money2020

Invisible Ripple

• Customer selects product they want to buy.

• Merchant presents customer with payment options.

• Customer selects a payment network they are familiar with.

• Merchant directs the customer to a Ripple gateway, specifies their Ripple account and

payment amount.

• Customer makes payment to gateway using conventional payment network.

• Gateway makes Ripple payment to merchant.

• Merchant credits customer for payment.

Inbound payments using Ripple

Ripple can be the back end that makes a payment work

David Schwartz, Chief Cryptographer

Page 114: Ripple Developer Conference 2013 at Money2020

Invisible Ripple

• Customer uses conventional payment network they already know.

• Merchant is paid in local currency at a local financial institution.

• Payment has access to all the liquidity in the Ripple network.

• Similar model works for outbound payments.

• Each participant does one thing.

Advantages

Ripple can be the back end that makes a payment work

David Schwartz, Chief Cryptographer

Page 115: Ripple Developer Conference 2013 at Money2020

XRP

• XRP can be transferred between any two accounts, no transfer fee.

• XRP is a unique asset in the Ripple system:

- No issuer, no counterparty.

- Needed for transaction fees, account creation, and reserves.

• The easiest way to make an asset liquid is probably to make it liquid to and from XRP:

- Other assets have multiple issuers.

- Other assets are likely to be regional.

- XRP is a bridge.

• If assets are liquid to XRP, you can hold XRP if you do not know what asset you will need:

- Assuming price is reasonably stable.

Characteristics:

What is it for?

David Schwartz, Chief Cryptographer

Page 116: Ripple Developer Conference 2013 at Money2020

Conclusion

• Do what you do best.

• Everything works together.

- Currencies don’t matter.

- Locations don’t matter.

- Institutions don’t matter.

Ripple completes commerce

David Schwartz, Chief Cryptographer

The Internet works. Shipping works. Payments are broken.

Page 117: Ripple Developer Conference 2013 at Money2020

Conclusion

• Backed by Ripple Labs.

• Fully open source, ISC license.

• For everyone.

• Nearly instantaneous, nearly free transactions.

• Receive, pay, and hold the currency of your choice.

• Direct access to market makers

• Irreversible payments.

What does Ripple offer?

David Schwartz, Chief Cryptographer

Page 118: Ripple Developer Conference 2013 at Money2020

Any questions?Some text goes here

David Schwartz, Chief Cryptographer

Page 119: Ripple Developer Conference 2013 at Money2020
Page 120: Ripple Developer Conference 2013 at Money2020

ContractsSome text goes here

Page 121: Ripple Developer Conference 2013 at Money2020

About Me

Stefan Thomas

Some text goes here

CTO, Ripple Labs

Previous:

Page 122: Ripple Developer Conference 2013 at Money2020

Bitcoin Scripts

Outputs and inputs connect

A simple stack machine.

Page 123: Ripple Developer Conference 2013 at Money2020

Bitcoin Scripts

• Transaction outputs verify the state of the stack

• Transaction inputs need to set it up

• If it returns true, the input is valid.

• Surprisingly powerful!

Outputs and inputs connect

A simple stack machine.

Page 124: Ripple Developer Conference 2013 at Money2020

Bitcoin Scripts

• Limited set of opcodes

• No ability to reference external data

• No concept of accounts

Limitations

A simple stack machine.

Page 125: Ripple Developer Conference 2013 at Money2020

Contracts

• Contracts use arbitrary x86 code

• Ledger is a generic key/value store

Consensus for your own apps

A distributed Turing machine.

Page 126: Ripple Developer Conference 2013 at Money2020

Escrow

Mediator should only be able to send funds to one of the parties, but not to

herself.

Two parties transacting with mediator

Basic example.

Page 127: Ripple Developer Conference 2013 at Money2020

Escrow

2 <K1> <K2> <K3> 3 CHECKMULTISIGVERIFY

2 of 3 multisig in Bitcoin

A basic example.

Page 128: Ripple Developer Conference 2013 at Money2020

Escrow

if (check_multisig(2, 3, payload[“sigs”], local[“keys”])) send_funds(payload[“dest”]);

2 of 3 multisig in Ripple

A basic example.

Page 129: Ripple Developer Conference 2013 at Money2020

Escrow

function check_multisig(int n, int m, Object sigs, Object keys){ int valid_sigs = 0; for (int i = 0; i < m; i++) if (verify_ecdsa_sig(sigs[i], keys[i])) valid_sigs++;

return valid_sigs >= n;}

Someone has to actually implement check_multisig…

A basic example.

It’s a contract!

Page 130: Ripple Developer Conference 2013 at Money2020

Escrow

Code duplication?

A basic example.

• Contracts can link to other contracts as libraries

function check_multisig(int n, int m, Object sigs, Object keys)function check_multisig(int n, int m, Object sigs, Object keys)function check_multisig(int n, int m, Object sigs, Object keys)function check_multisig(int n, int m, Object sigs, Object keys)

Page 131: Ripple Developer Conference 2013 at Money2020

Escrow

• Compiled as a contract – and so is OpenSSL.

• “It’s contracts all the way down.”

• All pure processing functions are fully sandboxed

Minimal trusted code base (TCB)

What about verify_ecdsa_sig?

Basic example.

Page 132: Ripple Developer Conference 2013 at Money2020

Escrow

• A contract generates a static piece of data called the “agenda”.

SEND_CONTRACT_FUNDS_ALL [destination_account]

• Think of it like an SQL query.

And what about send_funds?

Basic example.

BEGIN TRANSACTION;UPDATE accounts SET balance = balance + (SELECT balance FROM contract_accounts WHERE contract_id = ?) WHERE account = ?;UPDATE contract_accounts SET balance = 0 WHERE contract_id = ?;COMMIT;

Page 133: Ripple Developer Conference 2013 at Money2020

Details

• Contracts can hold funds

• For KYC and other purposes contracts will have an “owner” account

• Contracts can delete themselves

• Contracts can write to hashtables based on their namespace

• Contracts can read any entry in the ledger

Some more notes on how it all works

We skipped a lot of stuff.

Page 134: Ripple Developer Conference 2013 at Money2020

Subscriptions

• I want to have a contract that says:

“You can take up to 10 USD/Bitstamp out of my account per month.”

Let’s ramp things up a bit!

This is a bit more interesting.

Page 135: Ripple Developer Conference 2013 at Money2020

Microgateways

*rolls up sleeves*

Goal: Can we get PayPal support without… PayPal support?

Ok, now we’re starting to talk craziness.

Page 136: Ripple Developer Conference 2013 at Money2020

Microgateways

• Hypothetical IOU worth 1 USD: USD/M

• I can now trade this IOU with full Ripple functionality:

– Buy them on PayPal after going through KYC

– Redeem them on PayPal with a 120 day escrow

– All managed by Ripple contracts and SSL session proofs

Contracts managing peer-to-peer transactions

Ok, now we’re starting to talk craziness.

Page 137: Ripple Developer Conference 2013 at Money2020

Microgateways

1. Do an SSL session through a proxy

– Proxy witnesses data stream (does not have access to contents)

– PayPal’s certificate shows up in initial handshake

2. Submit SSL log and witness signature to contract

3. Profit?

SSL proofs

Ok, now we’re starting to talk craziness.

Page 138: Ripple Developer Conference 2013 at Money2020

Microgateways

• Only requirement: It must cost at least 1 USD to create 1 USD/M

• “To issue 1 USD/M, you must send 1.05 USD to one of these charities.”

Disclaimer:

• SSL proofs are a bit weak for this: They’re worst of (counterparty, witness)

• There might be a better way to provably destroy dollars!

Ideally: Only need to trust Fed.

• But: Good enough.

Problem: How are these IOUs issued?

Ok, now we’re starting to talk crazy.

Page 139: Ripple Developer Conference 2013 at Money2020

Microgateways

• We want the value of the asset to track USD as much as possible.

• If there are too few USD/M, no problem, people can issue.

• But what if there are too many?

Bigger problem: How are these IOUs redeemed?!

Ok, now we’re starting to talk crazy.

Page 140: Ripple Developer Conference 2013 at Money2020

Microgateways

• Two main options:

– If underlying asset is inflationary: Do nothing

– If underlying asset is deflationary: Add demurrage to IOUs

IOU inflation

Ok, now we’re starting to talk crazy.

Page 141: Ripple Developer Conference 2013 at Money2020

Microgateways

• The price of 10 USD/M will be between:

0 USD (if there is no one wanting to deposit funds)

10 USD + whatever the real transaction costs of depositing are

• Good enough to get money in+out

• But you’d probably rather hold XRP or BTC

Let’s recap

Ok, now we’re starting to talk crazy.

Page 142: Ripple Developer Conference 2013 at Money2020

Autonomous Agents

• Agents need somewhere to run.

– Physical autonomous agents (e.g. self-driving cars)

– Hosted autonomous agents (hosting risk)

– Distributed autonomous agents (first time possible with Ripple)

• And they need to hold funds.

If code can own money…

He’s lost it.

Page 143: Ripple Developer Conference 2013 at Money2020

Autonomous Agents

• Evolutionary model:

– Agents can outsource improvements.

– Hire somebody with a reputation for making better agents

– Child agents start with a birth loan

– Agents are “mindless capital”

… fun things happen.

He’s lost it.

Page 144: Ripple Developer Conference 2013 at Money2020

Capital contracts

• Developers write agents and publish them

• Investors fund them

• Can be as flexible or rigid as needed

An alternative to the evolutionary model

Putting it all together.

Page 145: Ripple Developer Conference 2013 at Money2020

Any questions?Some text goes here

Page 146: Ripple Developer Conference 2013 at Money2020
Page 147: Ripple Developer Conference 2013 at Money2020

Thanks For Joining Us!Some text goes here

Page 148: Ripple Developer Conference 2013 at Money2020

We’re Hiring!

Business Development

• VP of Financial Services

• VP of Emerging Markets

Software Development

• Sr. Javascript Engineer

• Lead Android Developer

• Data Analyst

ripple.com/jobs - Inquire with [email protected]

Product

• Integration Engineer

• Product Manager of Platform

• Technical Writer

• UX Product Designer