Ripple for Gateways

From Ripple Wiki
Jump to: navigation, search

Contents

What is a Ripple Gateway?

A Ripple “gateway” is any business that allows its customers to move money into or out of the Ripple network.

A4 02.png

A gateway is not so much a particular business model as a specific role in the Ripple ecosystem.

Many different types of business will act as Ripple gateways. (Banks, payment processors, money transfer services, remittance companies, etc.) Each will bring their own specific user base, use cases and customer value proposition.

A business acts as a Ripple gateway if it enables its customers to do three things:

Deposit

1) Deposit funds in exchange for a balance issued by that business.

A4 03.png

Transfer

2) Transfer their balance to another customer of the business.

A4 04.png

Withdraw

3) Withdraw funds by redeeming a balance issued by that business.

A4 05.png

Gateway’s and Trust

Inside the Ripple ledger, a gateway account is no different from any other user account. As Alice showed in the previous example, any Ripple user can choose to serve in a gateway role. All that is required is for others to “trust” that you will hold the requisite funds to be able to promptly redeem their balances on demand.

A4 06.png



The value of a gateway is that it serves as a common point of trust for a large community of people. That enables Alice and Bob (and all the others) to transact financially without having to personally know and trust each other.

Ripple’s inter-connectivity means most Ripple users will only need to trust a single gateway. That gives each gateway a hub and spoke structure inside the ledger graph.

Note that all trust lines tend to face inward. Ripple users are required to trust the gateway before it can issue balances for their funds. However, gateway accounts are not required to trust any other Ripple account.



This “gateway island” configuration isolates the gateway business from any negative effects resulting from the failure of any other Ripple gateway or business.

A4 07.png




Because gateways always issue positive balances to their users, the gateway’s resulting net balance is always negative.

In fact, no Ripple account can have a positive balance unless it trusts another account to issue it that balance.

A4 08.png








However, the gateway’s negative Ripple balance is generally offset by a positive balance of funds maintained at a traditional financial institution.









Creating a Manual Gateway

It is possible to create and operate a Ripple gateway using nothing more than the web client.

Create Gateway Address

NG00.png
Screens00.png







To do so, first create and fund with XRP, a new Ripple Ripple wallet. The address of that wallet will serve as your gateway address.



User Trust

NG01.png
Screens01.png



You can't be a gateway without users, so create and fund a second Ripple address and from that account, extend a trust line to your gateway address.






Deposit

NG02.png
Screens02.png



The main purpose of a gateway is to take real world funds and digitize them into the Ripple network. So accept a simulated $5 deposit from your new user. In return, send $5 to his Ripple address from your gateway account.




Second User Trust

NG03.png
Screens03.png


In order to send a payment you'll need a second gateway user to receive it. So create and fund a third account. Then, from that wallet, extend a trust line to your gateway.




User Payment

NG04.png
Screens04.png



Now from the first user's wallet, you can send a $5 payment to the second user's Ripple address.








Withdrawal

NG05.png
Screens05.png

The other major function of a gateway is to allow users to redeem their Ripple balances for real funds.

To see how this works, send $1 from the second user's wallet, back to the gateway address. Once the gateway sees that transaction it will disburse the users withdrawal.




Your "Mock" Gateway

NG06.png
Screens06.png

That's it! You now have a functioning gateway.

Sure it seems like a lame mock gateway, but in fact, it's really not. Many people have used this exact process to start their own manual gateways. All that is left is to publicize your deposit/withdrawal procedures and gateway address so that others can begin to trust you.


Making it Real

NG19.png


For your new gateway to have maximum value, the currency you issue needs to interoperate with currencies issued by other gateways.









At the moment, there is no pathway between your gateway and existing Ripple gateways. That means your users are limited to trading among themselves. Let's remove this restriction.



Liquidity

The process of connecting gateways together is called providing liquidity.

NG20.png
Screens20.png














To provide liquidity for your new gateway, create a third user account to act as market maker. From this wallet, extend trust to other Ripple gateways. Then deposit some money at each of those gateways.



Cross Currency Payment

NG21.png
Screens21.png





By placing a market offer to sell your bitcoins for dollars, you enable your gateway users to send payments into the bitcoin block chain via Bitstamp's bitcoin bridge.



Inter-Gateway Payment

NG23.png
Screens23.png





By holding dollar balances at two different gateways, you allow other user's payments to passthrough from one gateway to another.




You're a Live Gateway

By trusting in your own gateway and valuing its balances against other gateway currencies, you've made your currency real. Now payments can flow in both directions through your market making account. As you attract more users, some of them will also choose to server as market makers. The competition makes sure your user's get the best price when making cross currency purchases.

Personal tools
Namespaces

Variants
Actions
Navigation
Tools