https://docs.google.com/document/d/1S-tqmfGhxS3Myy83IvZfffoYDwc5kIv1n7GhXYq937I/edit?usp=sharingAfter a discussion with coinbase they asked me to produce a document describing how a gateway works and what benefits there would be for them so they could share it internally. I have decided to produce a public document for anyone considering being a gateway. I am posting it here with a google doc so that we can get feedback and help formatting it. I would like CASS to help convert this into a beautiful document.
Feedback wanted.
Benefits of Becoming a BitShares Gateway
The BitShares network allows anyone to issue digital assets known as User Issued Assets (UIA). These assets can be used to track shares in a company, deposits in a bank, reward points, among other uses. Once an asset has been issued it can be freely traded against all of the other asset types on the network including the fully collateralized market issued assets.
This guide will provide a brief overview of the business opportunities available for those who wish to become a BitShares Gateway. A Gateway provides the service of bridging external assets such as fiat dollars, gold, silver, and Bitcoin into the BitShares network. This service is critical to the success of BitShares because the vast majority of value moving into and out of the BitShares network must flow through a Gateway.
Generating Revenue as a Gateway
Gateways have many ways of generating revenue. The most straightforward method is by charging transaction fee every time someone moves value through your service. You can also make money by charging users a fee every time they move one of your assets on the BitShares network and from market fees on the BitShares network. In addition to transaction fees of various sorts, gateways also have an opportunity to generate revenue on the float they hold for their customers.
How It Works
Every single Bitcoin exchange is already performing a similar role to a gateway. Users transfer funds to the exchange, the exchange tracks how much it owes each user, and when a user asks for a withdraw the exchange sends the funds back. While the funds are on the exchange users can quickly and safely perform trades with other users of the same exchange.
A BitShares gateway does the exact same process, the only difference is that the database that tracks the users deposits to the exchange is the BItShares blockchain. When a user transfers fiat dollars or bitcoin to a gateway, the gateway responds by transferring an IOU asset issued by the gateway back to the user. When the user returns the IOU to the gateway the gateway sends fiat dollars or bitcoin back to the user.
The IOU asset is tremendously useful to users in the BitShares ecosystem because it serves as a very flexible multi-party escrow asset. Users will use an IOU USD from your gateway to trade against BitUSD and/or IOUs from other gateways. Users want to store value in BitUSD because it is mostly free of counter party risk, but when it comes time to convert BitUSD back to fiat USD they will do so through a gateway.
Legal Compliance
Any company that takes deposits from customers and facilitates transfers among customers is heavily regulated in most countries. These regulations include license requirements, bonds, insurance, know your customer laws, and anti-money-laundering compliance among others. The BitShares block chain provides gateways with all of the tools necessary to comply with these regulations.
If you are in this business you are already maintaining a database tracking user deposits and your database is probably logging every single transaction and balance change. Your database knows exactly who is owed what at any point in time. You also have the power to seize or freeze user balances at the demand of law enforcement. BitShares provides you with all of these features as well including:
1) Ability to white list public keys that may control a balance of your asset.
2) Ability to freeze all funds and stop all trading of your assets
3) Ability to transfer any balance of your asset from any user to any other user
In other words, if you are operating a legally complaint crypto currency exchange, then you can easily expand your business to becoming a BitShares gateway.
Security
As a gateway you are likely very concerned about the safety of the funds you hold on behalf of your customers. Fortunately moving your database from a custom internal system to the BitShares network provides your business with greatly improved security because you gain all of the benefits of a block chain. Every transaction is logged in a public ledger and every balance transfer signed and verified by 101 delegates distributed around the world. The open source code is in use by many different gateways and peer reviewed by an entire community. You can rest assured that no funds will move without being properly signed by the private key of their owner.
As the creator of a User Issued Asset you have complete freedom to honor funds or to reverse transactions as a result of theft by social engineering or a compromised user key. No one can withdraw real fiat USD without your own review of the transaction history. Any bugs in the BitShares code cannot result in your gateway losing money because you retain the authority over how to honor your asset.
Perhaps the greatest improvement of security you gain by becoming a gateway rather than an exchange is that you only have to deal in a single asset. Rather than having users deposit both dollars and crypto assets to your exchange, you can only allow dollar deposits and issuer dollar IOUs. The BitShares block chain can then allow the user to trade directly with other users without having to transfer the assets to you and thus creating an additional liability of your exchange.
Perhaps the single biggest security liability your exchange faces as a gateway is guarding access to the private keys that control the user issued asset. For this reason all User Issued Assets are controlled by a N of M multi signature system. You can divide access control among many different individuals within your gateway to ensure that no single individual or single compromised machine can compromise control over your User Issued Asset. It is critical that you guard these keys carefully and keep them in cold storage.