Conventional cryptoasset exchanges usually involve a centralized operating entity that enables liquidity by bringing together reliable market makers and takers. Customers generally benefit from this market matchmaking when their orders are quickly filled, a convenience for which users pay a significant fee. This centralized approach also comes with risks posed by information asymmetries—the exchange operator may have a privileged degree of control over the order books and can therefore front-run user’s trades, anticipating the change in the traded asset prices and profiting duly.
Decentralized exchanges (DEXs) potentially stand to remove this potential for manipulation. DEX's are attractive because users remain in control of the private keys associated with their cryptoassets. Since users of centralized exchanges often transfer their assets to an address belonging to the exchange before the exchange can move funds and service orders, they effectively hand over responsibility for managing funds to the party operating the exchange. By contrast, DEX's enable the owner of the cryptoasset to have full independence over their funds, but still trade them as needed.
The drawbacks of DEX's is that they often suffer from less liquidity than centralized exchanges, which leads to slow order filling. DEX's also exist in uncertain regulatory territory, and without a clear framework for operating, may intentionally or unintentionally violate laws in certain jurisdictions. Additionally, DEXs aren not entirely immune to front-running or similar practices; for instance, orders submitted to the Ethereum mempool can be publicly visible to miners, so an astute party can front-run pending orders by submitting an appropriate transaction with a higher gas price such that miners will prioritize it and the perpetrator will stand to gain an advantageous rate relative to the market.