We will examine two types of decentralized exchanges:
- Orderbook DEXs
- AMM DEX
Orderbook DEXs resemble centralized exchanges (CEX) in their interface and operational principles. Trading participants place their orders to buy or sell their cryptoassets on the exchange, and a deal is reached when the stated prices match. The transaction takes place only when there is a counter order for a transaction from another user.
Unlike on a CEX, where the exchange itself serves as the third party and is responsible for processing a transaction, the smart contract, i.e. self-executing software, takes care of this.
AMM DEXs (automated market maker DEXs), in principle, work similarly to currency exchange offices. They don’t use order books (lists of buy and sell orders). Their work is based on liquidity pools. Simply put, a liquidity pool represents cryptoassets offered by liquidity providers to perform a transaction on this kind of exchange for a small fee. Therefore, when you trade on an AMM DEX, you make a deal not with another seller or buyer, but with a smart contract, which withdraws funds from the liquidity pool and sends them over to you in exchange for your funds. In this case, the value of the assets is not determined by the wishes of the traders, but by a mathematical algorithm (naturally, you will see the price before making a transaction). This approach allows for a considerably simpler interface and process – to the user, all of this looks like a regular currency exchange office, when in fact there is a complex set of smart contracts matching the cryptoassets, evaluating their prices, and so on. STON.fi is an AMM DEX.