How Does a Decentralized Exchanges Work?
Decentralized exchanges use smart contracts (automatic contracts) to facilitate trading between individuals, but do not control their currencies.
DEX handles this in one of three ways: an on-chain order letter, an off-chain order letter, or an automated marketing strategy.
In a chain order book, everything that is done is written in a blockchain. That is not just a real purchase, but also a request to buy or cancel an order. It’s the last resort in real estate, but the need to put everything on blockchain can make it more expensive and slower.