Decomposing exchanges

in #bitshares7 years ago

In the light of regulation, hacks and the desire of newly founded projects to be tradeable the desire of decentralization in the exchange space grows. So does the technical capabilites with new decentralized exchanges popping up every day. Most of these technical developments present solutions to only a part of the problem and do not answer the question on how to make a sustainable profit for involved businesses.

The 0x protocol is one of the more known projects in this space that allows to trade ERC20 token on Ethereum and defines a interface for totken as well as for smart contracts that allow to trade in a away that multiple decentralized exchanges spring of from the same code and are able to interact with each other. This takes into account already that more than the technical aspects have to be solved. The most famous one of them is liquidity. Liquidity is really a chicken and egg problem were liquidity naturally arrives at the place where most trading is happening but until it gets there some market maker has to sponsor the task of placing buy and sell orders around the current fair price so that its possible to execute a trade at any time. Every 0x exchange can find its own solutions to the liquidity problem and still profit from liquidity on other 0x exchnages by integrating using the underlying Ethereum protocol. This allows for instance newly created ERC20 token to run their own exchange.

But 0x is limited by the capability of the Ethereum network to process transactions since every trade is executed on chain and allows for ERC20 tokens only. A famous ERC20 token is the USDT token that is used by Ethfinex to make fiat currency pairs available on cryyptocurrency exchanges. To support its Ethfinex project, the centralized Bitfinex exchange made their USDT token plattform agnostic and started issuing it as ERC20 token as well whil supporting the former Omni Layer token on the Bitcoin and Litecoin blockchain as before.

Tether has a central role in the decentralized exchange business as it allows to encapsulate the centralized part of the gateway to send transaction in between the banking syste and the blockchains. A decentralized exchange just lists trading pairs involving USDT and will not have to deal with the problem of providing fiat denominated trading to its customers. In theory. An alternative is presented by smart coins from the Dai project which creates a pegges ERC20 token that is backed by an amount of crypto currency that is locked in a smart contract to back the value of the token that is denominated in USD. A complex mechanism is meant to ensure that the collateral will always be sufficient to pay the holder of the token 1 USD worth of token on request while returning the remains to the creator of the token.

The inventor of this idea is the BitShares project, one of the very early decentralized exchanges. It features another approach that is copied from the famous Ripple protocol. It extends on the idea of Ethfinex by assuming that token from every other blockchain than the BitShares blockchain can be traded on the decentralized exchange when there is a gateway that can receive token from the other blockchain and issue a IOU that can be switched back on request. In a way that is just like USDT but instead of issuing token that represent fiat we can represent token of arbitrary blockchains. The problem with that approach as a whole is for the trader that he haa to trust the gateway to not operate on fractional reserve. The problem from the gateway operator is that he operates under the constant threat that a successful hacking attempt drives him out of business. People tend to use exchanges as a wallet for all their token and don't even have the token that are stored in the gateways on trades. This makes these external funds dead capital that can turn into an existencial threat at any time.

The solution to this problem is coming in form of atomic swaps as demonstrated by altcoin.io and BlockNet. The techology was showcased just 3 months ago and we can now swap a lot of token directly with each other without ever leaving the funds on a exchange. The exchange is thus limited to the task of matching orders to facilitate trade. The order matching can be done on chain as in Bitshares or various smart contract solutions on Ethereum, or centralized for maximum performance. The current projects that are serious about making decentralized exchanges a success employ a centralized order matching algorithm. Scaling decentralized order matching is hard. A conceeptual problem is front running when one node announces the wish to trade and a receiving node can arbitrate by inserting a new order in front of the relayed order. This is known from centralized exchanges as well but is illegal and turns to become unstopable in a transparent environment where information of the current state depends on speed and connectivity of the nodes.

To warp up we can say that the business model of the centralized exchange is about to be unbundled. While prior to the advent of decentrailzed exchanges the wallet, the fiat gateway, the order matching and the market maker was bundled by a central entity, various legal and security threats as well as the insane amount of newly created token and ICOs favored the decoupling of the moving parts of an exchange, so that centralized parts stay centralized but tasks that can be performed in a peer to peer fashion can be integrated with each other using a blockchain to wire them up.

To tackle the liquidity problem there seems to be a solution in forms of exchange token that are not bound to fiat currencies but used to trade between two different token that have no direct trading pair. Traditionally the exchange token has either been USDT, USD, BTC or ETH. Numerous new esxchanges employed their own token that can be traded against all the token that are listed on the exchange. The Crypto Bridge project uses these tokens to collect trading fees on top of the network fees since the underlying BitShares protcol allows to set up extra fees for trades that involve a token that a gateway issued as IOU. In return they have invcentive to provide liquid markets for their trading pairs.

Ultimately the core exchange business can be reduced to having a set of markets, each run by different entities for every trading pair, and a index of orders on these markets for a matching engine. The exchange business thus can be seen as the first example of decomposing a traditional business model using blockchain technologies and incentivized economies.