Decentralized exchanges have emerged as a robust alternative to traditional crypto exchanges, letting you swap tokens directly with other people. Decentralized exchanges are one of the key building blocks of the decentralized finance (DeFi) ecosystem. A DEX is a platform where users can trade cryptocurrency directly with each other, without using a middleman. A traditional centralized exchange like Binance, for example, acts as a custodian on your behalf, with any trading taking place on Binance’s database, rather than directly on the blockchain itself.
source