Several different options and approaches to the creation of a Decentralized Exchange (DEX) exist. The approaches differ according to limitations in various contexts, and generally fall under two types of approahces.
In order to develop a DEX, first it would be a good idea to cover the scope of the exchange pairs intended to be offered, as this will define the limitation of the types of asset pairs which can be legitimately offered/listed, and subsequently affect the type of DEX needed.
Two general types of DEX's:
If the intended exchange pair offerings only intend to include tokens tracked on a single blockchain (Ethereum blockchain for instance) than you can build a single-chain based DEX. Exchanges are facilitated through smart contract code provided for escrow and order book management of registered users accounts. Generally interledger exchange is not possible without some type of intermediary service in this use case, however "off-chain" state channels can be used to "bridge" between co-dependent singleton chain DEXs.
The other approach is a "multi-ledger" DEX. This based on an interledger transaction protocol extension. These DEX's can NOT inherently support any type of "token" or blockchain based asset measure without explicit consent of the host/parent blockchains consensus (co-dependent) if exchanges are intended to be "trustless" on-chain reconciled exchanges (as also assumed in the case above). This type of DEX is generally considered an integral component to a multi-ledger blockchain `verse.
The multi-ledger DEX requires protocol level transaction feature support by the blockchains/protocols involved in the exchange. Currently existing "inter-ledger" DEX's utilize some type of intermediating service to provide market-making or account management functions (for eg. how to do "on chain" BTC to ETH blockchain when neither support the other).
The main difference between the two approaches has primarily to do with the intended maximum transaction throughput. The reason to go with a singleton-chain 'bridge' type architecture is that the intention may be to directly develop 'off-chain' state channels to support high frequency trusted 'hybrid' services whos transaction throughput is only limited by hardware. Generally speaking the multi-chain DEXs intend to primarily facilitate interledger transactions more for the purpose of asset exchange and transfer, rather than trading markets and liquidity.
Also very few true interleger "trustless" DEX's are fully functional, and usually rely on a type of early stage "atomic" type of exchange rather than typical or expected traditional trading market functions.
Examples of singleton-chain DEX's:
- Raidex
- Legolas
- Omisego
Examples of multi-chain interledger protocols:
- Cosmos
- AION
- ILP
There are interledger DEX's but since they are dependent on protocols that are still experimental, few are in any advanced stage of development of note (certainly more coming).