Centralised Exchanges (CEX) are traditionally seen as the leaders in crypto trading since bitcoin’s inception in 2013. However in 2020 this all changed with the DeFi and Decentralised Exchanges (DEXs) boom. DEXs continue to grow and are becoming more popular than ever, with both traditional financial and crypto experts predicting enormous growth, due to it solving intermediary problems, increased anonymity, better security and more accessibility for trading pairs. We take a look at how DEXs operate and why they have seen enormous growth over the past few years, specifically looking at two types of DEX models.
What is an Order Book Model?
An order book model is a traditional approach to a trading exchange where it lists all buy and sell orders created from buyers and sellers. The order book model labels buy orders as bids and sell orders as asks, this is then placed within the exchange system where it organises and matches bid and ask orders to facilitate the exchanging of assets. This means traders on the DEX platform will have their order fulfilled when the matching bid and ask orders have been met.
On the order book model there are two types of orders a trader can create - a market order and a limit order. Market orders allow the trader to buy or sell immediately at the best available price based on current market orders by matching the order at the top of the orderbook at that time.
A limit order creates an order where the price of the asset is manually set by the trader and placed on the order book to wait until the DEX finds a suitable order to match the value i.e. when the current price reaches the set price level of the order. This allows the trader to either buy or sell their asset at the exact price set by them if met.
Advantages of an order book model
- The order book model is a traditional approach to financial exchanges and if there is enough liquidity on the exchange, it can match orders at a fast pace and clearly see the movement in orders and price formation.
- It is a relatively simple model to understand and learn to trade on.
- Maintains low slippage irrespective of trading volume as traders can set limit orders
- It provides traders with many order types, such as limit, stop loss, trailing stop loss, buy-stop, etc
Disadvantages of an order book model
- Order books aren't efficient and can be negative for illiquid markets as it is hard to find matching orders at a fast pace, due to the large spread of bid and ask orders and low trading volumes.
- Market manipulation is an issue when using an order book model.
What is an Automated Market Maker (AMM)?
An Automated Market Maker (AMM) is a bonding curve based exchange which uses a  relatively recent approach to DEXs and is now commonly used on most modern DEXs, having replaced the order book model with liquidity pools. AMMs were created in order to compete with centralised exchanges as they are built on a passive market making model and managed by liquidity pools.
Liquidity pools are created using smart contracts to replace order books to facilitate peer-to-peer trades, as many DEXs wish to achieve autonomy on their platforms. Instead of using the order book system to match orders, AMMs use self-executing algorithms in the form of smart contracts to set asset prices and then provide liquidity for trade execution. These smart contracts are often permionless, meaning anyone can provide liquidity and create their own liquidity pools.
By using liquidity pools, which are groups of two or more assets, it allows traders to trade these same assets on DEXs without the worry of finding matching bid/ask orders, creating a market that is open 24/7.
Advantages
- Providing there is a reasonable amount of assets in liquidity pools, AMMs solve liquidity problems by providing liquidity for illiquid markets.
- AMM DEXs are analogous to decentralisation and digital assets, as there is no entity that controls or manipulates the system.
- Creates an arbitrage market to help stabilise the asset price and incentivise trading to push the AMM DEX price close to the spot price in other exchanges.
Disadvantages
- Most AMM DEXs only offer market orders, it is usually uncommon to have the option of order types such as limit orders, stop losses, buy-stop orders.
- AMMs can result in high slippage for large orders due to small liquidity pools.
- There is a slight risk for liquidity providers such as impermanent loss.
Summary
AMMs provide a solution for one of the main issues revolving around DEXs, that being illiquidity. By creating liquidity for DEXs allows traders to move towards decentralised exchanges and reap the full rewards that come with DEXs, such as reduced cost, more privacy, more control, less manipulation and true-ownership of your assets (non-custodial).
AMMs have improved the capabilities of existing DEXs and thoroughly developed the DeFi space. However like with all exchanges and their models this is not without its limitations, the issues surrounding slippage and potential risk to liquidity pool providers create a smaller set of challenges to navigate.
If you are interested in learning more about DEXs, read our article on DEX vs CEX here.
About Trading Strategy
Trading Strategy is an algorithmic trading protocol for decentralised markets, enabling automated trading directly on blockchains. Learn more about Trading Strategy in the introduction post.
Join Trading Strategy community Discord to discuss decentralised finance, technical analysis and algorithmic trading.