Limit order protocols offer DEX traders more flexibility and efficiency

In the course of the further development of the decentralized exchanges (DEX), their functionalities become more and more advanced and often correspond to those of the centralized exchanges (CEX). One of these features is the ability to place limit orders, which gives traders using DEX more flexibility and efficiency. This article examines the existing functions of limit orders and their possible implementations.

In contrast to a market order, which is executed immediately at the last market price with possible slippage, A limit order is executed at a predefined price as soon as this is reached. Market orders are used by default in all automated DEX based on market makers. They are simple and straightforward for beginners. A market order is guaranteed to be executed or fails based on parameters such as the maximum price impact.

For his part, Limit orders are intended for advanced traders as they need to analyze the market situation and assess the likelihood that the price of an asset will reach a certain level. Taking into account the fulfillment of limit orders on a blockchain also requires taking into account gas costs, which can make operations more or less profitable depending on the size of the order.

Limit order protocols offer DEX traders more flexibility and efficiency
Limit order protocols offer DEX traders more flexibility and efficiency

Still, limit orders are a great tool for professional market makers that can greatly increase the profitability of trades.

Like CEXs, a number of decentralized protocols such as SushiSwap, the 1inch Limited Command Protocol, and 0x offer limited command functions. As a result, unprecedented advanced features have been made available in DeFi, such as: B. Request for Quotation (RFQ), dynamic pricing and conditional execution.

Quotation requests

Requests for quotations can be viewed as over-the-counter systems for decentralized trading that enable market makers to bridge the liquidity of CEXs to users of DEXs. In this way, better prices are achieved for large and medium-sized companies.

An RFQ system aims to make it easier and profitable to provide significant amounts of liquidity to DEX while reducing risk. Because market makers can choose when and with whom to trade, they can maximize their relationship between trade order flow and arbitrage flow.

The RFQ feature enables Primary Market Makers (PMMs) who normally trade crypto assets on CEX or OTC options to trade large amounts of low risk cryptocurrencies on DEX. Thanks to the RFQ, PMMs bring significant liquidity from CEXs to DEXs.

For example, if a user wants to exchange 1,000 ethers (ETH), a limit order log comes to the PMMs and asks them if they will do this exchange. If you are interested, send a signed order. As soon as the order has been executed, a PMM sells the 1,000 ETH in the DEX of another chain for a profit, while the DEX uses the liquidity provided by the PMM. In this way, PMMs effectively bring liquidity from CEXs and other chains to DEXs.

What’s more RFQ offers higher gas efficiency. While a simple market order would cost 90,000 gas to execute, an RFQ order would only cost 70,000 gas (these numbers are approximate).

Conditional execution and dynamic pricing

The conditional execution and dynamic pricing of the 1inch Limited Orders Protocol could facilitate a number of features. Conditional execution allows users to maximize their profit from trades by setting conditions for order execution. Dynamic pricing feature calculates stock market prices through smart contracts based on supply and demand.

Auctions are a promising use case for dynamic pricing. A limit order can be placed to make the price go up or down (like in a Dutch auction). Similarly, the dynamic pricing feature can support initial DEX offers and other token sales based on the auction model or non-fungible token auctions (NFT).

Stop and trailing stop orders

Another example of the application of the conditional execution and dynamic pricing functions could be stop and trailing stop orders.

Stop orders are only placed when certain price conditions are met, with price data provided by Oracle. For example, “Sell WETH for $ 2,000 if the oracle’s price is less than $ 2,100.” Stop orders can be used in combination with market or limit orders, giving traders more flexibility and the ability to create more complex strategies.

Basically, the difference between limit orders and stop orders is that limit orders are placed in the order book and can be viewed by anyone, while stop orders are only presented when a previously defined price has been reached.

As opposed to a market stop order which would say something like “When price hits X, buy / sell immediately”, a stop-limit order would say, “When price hits X, place a buy / sell. Sell ​​order at Y “. X and Y can or do not have to have the same value.

A combination of a market stop order and a limit stop order would be for example“If the price of the bitcoin oracle is below $ 30,500, sell bitcoin for $ 30,000.”

A trailing stop, also known as a trailing stop-loss, is a market order that places a stop-loss at a percentage below the market price of an asset, rather than on an individual value. From there, a stop-loss order follows the asset as its price changes, hence the name “trailing stop”. An example of a trailing stop order would be, “Sell WETH if the price falls $ 300 from today’s high.”

Gas efficiency

We have calculated the gas consumption for the execution of RFQ orders in four versions of the 0x protocol, as well as that of the regular limited orders and RFQ in the 1inch limited order protocol.

The following table summarizes gas consumption in the 90th percentile of these logs (which applies to 90% of transactions). Further information on gas consumption can be found here.

DEXs claim to offer the same functionality as CEXs but in a decentralized environment. And in some ways DEXs have already outperformed CEXs, such as MMAs. The limit order functionality is an important tool moving the segment forward and narrowing the gap between the options offered by CEXs and DEXs.

This article does not provide investment advice or recommendations. Every step of trading and investing involves risk, readers should do their own research when making a decision.

The views, thoughts, and opinions expressed herein belong solely to the author and do not necessarily reflect the views and opinions of Cointelegraph.

Anton Bukov is co-founder of 1inch Network, a distributed network of decentralized protocols. Anton worked as a C ++ developer and iOS developer and later contributed to cryptocurrency projects such as MultiToken, NEAR and Synthetix. Anton was also a co-host of a YouTube show, KryptoManiacs. At a 2019 hackathon, Anton and Sergej Kunz, who later co-founded the 1inch network, developed a prototype of a cryptocurrency exchange aggregator that formed the basis for the entire network.

Similar Posts