The decentralized finance (DeFi) industry continues to reach unprecedented highs, with daily volume of transactions increasing on a regular basis. Unfortunately, in spite of the billions of funds currently being crossed back and forth, decentralized exchanges (DEXs) are filled with apparent and invisible costs that are a hindrance to market activity.
Consequently, the future of DeFi requires eliminating the high transaction costs and limited functionality often associated with traditional DEXs. Among them is slippage, the price difference between a cryptocurrency’s quote price and the trader’s actual paid price. This is in addition to limited liquidity, expensive gas costs, lack of control over execution price, and the risk of front-running, which is done by malicious traders placing a transaction ahead of a trader based on insider knowledge of their future trade. Solving these concerns means DeFi could achieve parity to centralized exchanges (CEX), while removing the need for middlemen.
For example, with regards to the order book functionality: centralized trading platforms typically sort limit orders by price, from the highest to the lowest. The order book of BTC/USD trades, to name an example pair, will contain all the purchase and sale orders that have been placed on the exchange at different (limit) prices.
At the top of the book, users can find the highest bid for BTC, and at the bottom, the lowest ask prices; the middle of the book, where bids are closer to asks, will help determine the point at which a new market order will be executed. Slippage occurs when a market trade is larger than the amount available at the first level of the order book, or also when the bid and ask prices change before the exchange can
Read more on cointelegraph.com