From 343916614b471d5f2c49d78026347e9a6ef59832 Mon Sep 17 00:00:00 2001 From: mDuo13 Date: Mon, 1 Dec 2014 17:39:12 -0800 Subject: [PATCH 01/13] [DOC] e2g: opening paragraphs --- content/exchange_to_gateway.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 content/exchange_to_gateway.md diff --git a/content/exchange_to_gateway.md b/content/exchange_to_gateway.md new file mode 100644 index 0000000000..1db7670696 --- /dev/null +++ b/content/exchange_to_gateway.md @@ -0,0 +1,13 @@ +h1. Becoming a Ripple Gateway + +An existing online financial service, such as a payment system or digital currency exchanges, can provide additional value to customers by acting as a Ripple Gateway. This provides users the ability to send cross-currency payments to users linked by other Ripple Gateways, and potentially provides a new revenue source for balances deposited, withdrawn, or transferred in Ripple. + +Expanding an existing exchange system to support Ripple is a relatively simple task. This document explains the concepts necessary to set up a system, and covers the details of doing so. + +h2. Ripple Gateways Explained + +A Ripple _*Gateway*_ is an entity that exchanges balances in the Ripple Network for balances in the Ripple Network -- in other words, performing deposits and withdrawals from Ripple. Typically, a Gateway holds money (or other assets of value) outside of Ripple, and creates _*issuances*_ in the Ripple Network that represent that money and can be sent, traded, and exchanged atomically in Ripple. + + + +A digital exchange already accepts withdrawals and deposits from users using some existing system. In the United States, From a59b1728e8d9aa641f8c9e2ff19c4a8c99969129 Mon Sep 17 00:00:00 2001 From: mDuo13 Date: Tue, 2 Dec 2014 18:06:30 -0800 Subject: [PATCH 02/13] [DOC] deposit/withdraw processes sketched out --- content/exchange_to_gateway.md | 75 +++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 2 deletions(-) diff --git a/content/exchange_to_gateway.md b/content/exchange_to_gateway.md index 1db7670696..129fa6a4e9 100644 --- a/content/exchange_to_gateway.md +++ b/content/exchange_to_gateway.md @@ -8,6 +8,77 @@ h2. Ripple Gateways Explained A Ripple _*Gateway*_ is an entity that exchanges balances in the Ripple Network for balances in the Ripple Network -- in other words, performing deposits and withdrawals from Ripple. Typically, a Gateway holds money (or other assets of value) outside of Ripple, and creates _*issuances*_ in the Ripple Network that represent that money and can be sent, traded, and exchanged atomically in Ripple. - +h3. Prior to Ripple Integration -A digital exchange already accepts withdrawals and deposits from users using some existing system. In the United States, +A digital exchange already accepts withdrawals and deposits from users using some existing system, and uses some internal accounting system to track how much balance each user has with the exchange. Such a system can be modeled simply like this: + + + +h3. Adding Ripple Deposits + +Two changes are necessary in order to become a Ripple Gateway. First, you must modify your accounting system to track money that is backing funds issued on the Ripple Network. This could be as simple as adding a record in your core accounting system for Ripple. Second, you must create and follow a process for "deposits" into Ripple, and "withdrawals" from Ripple. These are similar to, but separate from the process of depositing and withdrawing money from the exchange. + +A deposit into Ripple involves the following steps: + +1. Alice asks to deposit €2 of her balance into Ripple +2. In its internal accounting, ACME debits Alice's balance €2 and credits the Ripple-backed balance by €2. +3. ACME submits a Ripple transaction, sending €2 to Alice's Ripple address. The €2 is marked in Ripple as being "issued" by ACME. + + + +There are several prerequisites that ACME must meet in order for this to happen: + +- ACME must have a Ripple account. Our best practices recommend actually having at least two accounts, so that the account creating issuances in Ripple is exposed to less risk than the account(s) performing day-to-day transactions. +- ACME needs to know Alice's Ripple address. +- Alice must create a trustline from her Ripple address to ACME. + +h3. Trading on Ripple + +(TODO: flesh out) + +- Anyone can buy/sell EUR@ACME on Ripple + - including users who don't have ACME accounts (caveat: requireauth flag) +- Ripple users trading and sending EUR@ACME to one another requires no intervention by ACME + + +h3. Withdrawing from Ripple + +(TODO: flesh out) + +- ACME should honor its obligations + - but should do KYC first + +Withdrawal process: (like a deposit in reverse!) + +1. Bob sends Ripple transaction of €1 to ACME +2. In its internal accounting, ACME debits its Ripple-backing balance €1 and credits Bob's balance €1. From 0b4ffd06c5f08909eee5d0d5f0e8cde358affe7d Mon Sep 17 00:00:00 2001 From: mDuo13 Date: Fri, 5 Dec 2014 13:48:55 -0800 Subject: [PATCH 03/13] [DOC] e2g html file --- content/exchange_to_gateway.md | 22 ++--- exchange_to_gateway.html | 164 +++++++++++++++++++++++++++++++++ 2 files changed, 175 insertions(+), 11 deletions(-) create mode 100644 exchange_to_gateway.html diff --git a/content/exchange_to_gateway.md b/content/exchange_to_gateway.md index 129fa6a4e9..e6d3af7995 100644 --- a/content/exchange_to_gateway.md +++ b/content/exchange_to_gateway.md @@ -1,18 +1,18 @@ -h1. Becoming a Ripple Gateway +# Becoming a Ripple Gateway # An existing online financial service, such as a payment system or digital currency exchanges, can provide additional value to customers by acting as a Ripple Gateway. This provides users the ability to send cross-currency payments to users linked by other Ripple Gateways, and potentially provides a new revenue source for balances deposited, withdrawn, or transferred in Ripple. -Expanding an existing exchange system to support Ripple is a relatively simple task. This document explains the concepts necessary to set up a system, and covers the details of doing so. +Expanding an existing exchange system to support Ripple is a relatively simple task. This document explains the concepts necessary to set up a system, and covers the details of doing so. In this document, we use a fictional online currency exchange named "ACME" and its users as examples of how ACME can expand its business to include being a Ripple Gateway. -h2. Ripple Gateways Explained +## Ripple Gateways Explained ## -A Ripple _*Gateway*_ is an entity that exchanges balances in the Ripple Network for balances in the Ripple Network -- in other words, performing deposits and withdrawals from Ripple. Typically, a Gateway holds money (or other assets of value) outside of Ripple, and creates _*issuances*_ in the Ripple Network that represent that money and can be sent, traded, and exchanged atomically in Ripple. +A Ripple _*Gateway*_ is an entity that exchanges balances in the Ripple Network for balances in the Ripple Network -- in other words, performing deposits and withdrawals from Ripple. Typically, a Gateway holds money (or other assets of value) outside of Ripple, and creates _*issuances*_ in the Ripple Network to represent them. Within Ripple, issuances can be sent, traded, and exchanged atomically without the gateway's intervention. -h3. Prior to Ripple Integration +### Prior to Ripple Integration ### -A digital exchange already accepts withdrawals and deposits from users using some existing system, and uses some internal accounting system to track how much balance each user has with the exchange. Such a system can be modeled simply like this: +Our example exchange, ACME, already accepts withdrawals and deposits from users using some existing system, and uses an internal accounting system to track how much balance each user has with the exchange. Such a system can be modeled simply like this: - -h3. Adding Ripple Deposits +### Adding Ripple Deposits ### Two changes are necessary in order to become a Ripple Gateway. First, you must modify your accounting system to track money that is backing funds issued on the Ripple Network. This could be as simple as adding a record in your core accounting system for Ripple. Second, you must create and follow a process for "deposits" into Ripple, and "withdrawals" from Ripple. These are similar to, but separate from the process of depositing and withdrawing money from the exchange. @@ -62,16 +62,16 @@ There are several prerequisites that ACME must meet in order for this to happen: - ACME needs to know Alice's Ripple address. - Alice must create a trustline from her Ripple address to ACME. -h3. Trading on Ripple +### Trading on Ripple ### -(TODO: flesh out) +After the issuances have been created in Ripple, they can be freely transferred and - Anyone can buy/sell EUR@ACME on Ripple - including users who don't have ACME accounts (caveat: requireauth flag) - Ripple users trading and sending EUR@ACME to one another requires no intervention by ACME -h3. Withdrawing from Ripple +### Withdrawing from Ripple ### (TODO: flesh out) diff --git a/exchange_to_gateway.html b/exchange_to_gateway.html new file mode 100644 index 0000000000..92a8bf9985 --- /dev/null +++ b/exchange_to_gateway.html @@ -0,0 +1,164 @@ + + + + + + + + Ripple Developer Portal: Exchange to Gateway Tutorial + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DRAFT
+ + + +
+ +
+ +
+
+