0x achieves this decentralized exchange functionality using a collection of open-source.
What is 0x?
0x is an infrastructure protocol that allows users to easily trade ERC20 tokens and other assets on the Ethereum blockchain without relying on centralized intermediaries like traditional cryptocurrency exchanges.