DEX Order Books
With extensive experience as an electrical/software/coding engineer along with having a diverse financial background, Thomas Wettermann’s areas of interest include Machine Learning (ML), artificial intelligence (AI), and Financial Technology (FinTech). For the past few years, Thomas Wettermann has focused on the underlying technologies that support and promote all phases of cryptocurrency and metaverse ecosystems.
Example Bitcoin Order Book (source:phemex.com)
What are Order Book Benefits versus Other Types of Exchanges?
DEXs running on Ethereum are currently too expensive or slow to support an order book due to their system limitations. So instead of employing an order book, these exchanges utilize Automated Market Makers (AMMs). But, these AMMs have certain limitations.
What is an AMM?
AMMs are a part of (DEXs) that were introduced to remove any intermediaries in the trading of crypto assets. Basically, an AMM relies on smart contracts to mathematically compute the price of the crypto tokens and also to provide the exchange with liquidity.
How does an AMM work?
Centralized exchanges typically utilize trading pairs such as BTC/USD. In DEXs, these trading pairs are normally referred to as “liquidity pools.” For example, to trade Bitcoin for USD, you would need to find a BTC/USD liquidity pool.
And unlike in a centralized exchange where dedicated market makers provide liquidity, with an AMM, anyone can provide liquidity to these pools. They merely need to deposit the pair of assets within the liquidity pool. For example, if an investor wanted to become a liquidity provider for a BCT/USD pool, the investor would need to deposit a certain predetermined ratio of both BTC and USD.
AMMs use preset mathematical equations to guarantee that the ratio of assets within these liquidity pools is balanced. This reduces any discrepancies in the pricing of pooled assets.
For example, some DEXs use a multiplication A * B = K equation to set the relationship between the two assets held in the liquidity pool. In this equation, A represents the value of the first asset and B represents the value of the second asset, and K is a constant.
Graphically, this equation can be represented as follows:
AMM Asset Ratio Equation (source:CoinDesk.com)
As such, within the liquidity pools, the pools will have the same relative state where the multiplication of the price of the first asset A multiplied by the second asset B equals the constant K.
For example, assume that an AMM defines a liquidity pool with the following BTC/ETH trading pair where BTC is the asset to be purchased. When BTC is purchased, the purchased BTC is removed from the pool, and ETH is added to the pool.
Removing BTC will cause the amount of BTC in the pool to fall, which causes the price of ETH to increase in order to fulfill the balancing effect of A*B=K. In contrast, because more ETH has been added to the pool, the price of ETH decreases. When ETH is purchased, the price of BTC falls in the pool while the price of ETH rises.
When large orders are placed in AMMs and a number of tokens are removed or added to a liquidity pool, this can cause large discrepancies to be generated between the asset’s calculated price within the pool and its market price (the price it’s trading at across multiple exchanges.)
For example, consider a situation where the current market price of ETH is $2,000. However, the price of ETH within the liquidity pool might be less, say $1,800 because a good amount of ETH was added to a pool in order to remove the purchased BTC. Such a scenario would create what appears as a discounted ETH price residing within the liquidity pool.
This creates an arbitrage opportunity, where traders would try to buy ETH on the platform where it’s slightly cheaper and sell it on the platform where its price is slightly higher.
Because an order book relies upon real-time buyers and real-time sellers, order books eliminate such arbitrage opportunities.
Another potential limitation of AMMs is that liquidity pools that are not adequately funded are oftentimes susceptible to slippages. AMMs require high liquidity to promote buying and selling. If the liquidity pool lacks a proper amount of liquidity, this could also introduce high volatility in asset pricing.
DEXs that utilize AMMs are also forced to encourage users to deposit digital assets in liquidity pools to reduce the potential for slippages. To incentivize liquidity providers (LPs), AMM protocols provide paid-out rewards to LPs with a fraction of the fees paid on transactions executed on the pool. However, this places an added burden on AMMs to garner enough liquidity providers and pay out additional LP fees.
In addition, AMMs are also susceptible to impermanent losses. An impermanent loss can occur when the price ratio of deposited tokens changes after they are deposited within the pool. The potential impermanent loss is directly related to the size of the price ratio change. This is why AMMs often work best with token pairs that have a similar value, such as stablecoins.
The use of an order book also eliminates any type of slippage due to inadequately funded liquidity pools and the possibility of impermanent losses since an order book does not utilize any type of liquidity pool.
Another advantage of utilizing an order book versus an AMM is that with an order book, a DEX can provide more advanced trading functions and fill orders at a specific price for buying and selling. For example, one cannot place a limit order with a DEX utilizing an AMM.
In addition, it is also easier for investors to chart and analyze trades using an order book than it is within AMMs.
Conclusion
An order book visually depicts the buy and sell prices in real-time and is arranged at different price levels. Properly read and interpreted, it is an investment tool that allows buyers and sellers to understand market trends and market dynamics. A DEX that utilizes an order book has many advantages over a DEX that relies upon an AMM since there is simply no need for the potential complications that arise from the use of liquidity pools.
All the views expressed on this site are those of Thomas Wettermann and do not represent the opinions of any entity with which Thomas Wettermann has been, is currently, or will be affiliated.
Trading digital financial assets such as cryptocurrencies can carry a high level of risk, and may not be suitable for all investors. Before deciding to invest, purchase, and/or trade cryptocurrency you should carefully consider your investment objectives, level of experience, adversity to risk, and volatilities. The possibility exists that you may sustain a loss of some or all of your initial investment; therefore, you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with cryptocurrency trading, and seek advice from a qualified and independent financial advisor.
Thomas Wettermann is not an independent financial advisor. Any opinions, news, research, analyses, prices, or other information contained on this website is provided as a general market commentary of Thomas Wettermann and does not constitute investment advice. Thomas Wettermann will not accept liability for any loss or damage, including without limitation to, any loss of profit, which may arise directly or indirectly from the use of or reliance on such information. All opinions expressed on this site are owned by Thomas Wettermann and should never be considered as advice in any form.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.