A decentralized exchange (DEX) is another type of exchange most commonly seen with cryptocurrencies. A DEX offers many of the same basic services as a centralized exchange. However, DEXs match buying and selling orders through the use of blockchain technology. In most cases, DEX users don’t need to create an account and can trade directly with one another, without the need for transferring assets onto the DEX.
Trading occurs directly from the traders' wallets through smart contracts. These are self-executing pieces of code on a blockchain. Many users prefer the experience of a DEX as it provides more privacy and freedom than a standard exchange. However, this comes with a tradeoff. For example, the lack of KYC and customer support can be a problem if you happen to have issues.
Some DEXs use an order book model, such as Binance DEX. A more recent development is the Automated Market Maker (AMM) model like Pancake Swap and Uniswap. AMMs also use smart contracts but implement a different model to determine prices. Buyers use funds in a liquidity pool to swap their tokens. Liquidity providers who provide the pool’s funds charge transaction fees for anyone who uses the pool.