That brings us to the end of this chapter. This chapter should help you design decentralized trading exchanges, or exchanges on a distributed blockchain network in general. It should also help you to port concepts of trading, such as orderbooks and matching engines, to blockchain very easily. The example case that we looked at uses only a single orderbook pair, gold versus US dollars, but it can be very easily expanded to support multiple orderbook pairs and assets, and can be scaled into a full-sized exchange with additional components and security checks in place. You can run this on a private blockchain for an enterprise, or deploy it on a public blockchain. Bear in mind that public blockchains will require gas for each transaction, and you might want to club transactions together. Also, your orderbook will be visible to everyone on the public blockchain.
We started...