Limit order protocols offer DEX traders more flexibility and efficiency

189
SHARES
1.5k
VIEWS
ADVERTISEMENT


As decentralized exchanges (DEXs) evolve, their functionalities become more and more advanced and often correspond to those of centralized exchanges (CEXs). One of these features is the ability to place limit orders, which gives DEX traders more flexibility and efficiency. This article looks at the existing limit order features and their likely 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 market maker-based DEXs. 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.

Related articles

Limit orders, in turn, are intended for advanced traders as they require an analysis of the market situation and an assessment of the likelihood that the price of an asset will reach a certain level. Filling out limit orders on a blockchain also requires taking into account gas costs, which, depending on the order size, could make trading more or less profitable.

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

Just like CEXs, offer a number of decentralized protocols – including SushiSwap, the 1inch Limit Order Protocol and 0x – limit order functionality. As a result, unprecedented advanced features have been made available in DeFi, including RFQs (RFQ), dynamic pricing, and conditional execution.

Request for quotation

RFQs can be viewed as over-the-counter (OTC) systems for decentralized trading that allow market makers to bridge liquidity from CEXs to DEX users. That offers better prices for large and medium trades.

An RFQ system is designed to make providing significant amounts of liquidity to DEXs easy and profitable while reducing risk. Because market makers can choose when and with whom to do business, they can maximize their retail order flow versus arbitrage flow ratio.

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

For example, if a user wants to trade 1,000 ethers (ETH), a limit order log will reach out to PMMs and ask them if they are doing that trade. If you are interested, send a signed order. As soon as the order has been executed, a PMM sells the 1,000 ETH at a profit to the DEX of another chain, while the DEX uses the liquidity brought in by the PMM. Thus, PMMs effectively bring liquidity from CEXs and other chains to DEXs.

In addition, RFQ offers better 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 features of the 1inch Limit Order Protocol could enable a number of features. Conditional execution allows users to maximize their income from trades by setting conditions for order execution. In the dynamic pricing function, swap prices are calculated by smart contracts based on demand and supply.

Auctions are a promising use case for dynamic pricing. A limit order can be placed in such a way that the price goes 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 (NFT) auctions.

Similar: How much fascination is there behind Kusama’s parachain auctions?

Stop and trailing stop orders

Another example of implementing conditional execution and dynamic price functions could be stop orders 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 when the oracle price is below $ 2,100.” Stop orders can be used in combination with market or limit orders, which gives traders more flexibility and the ability to develop more complex strategies to create.

Basically, the difference between limit and stop orders is that limit orders are placed in the order book and are visible to everyone, while stop orders are only placed when a previously defined price has been reached.

As opposed to a stop market order that 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.

For example, a combination of a stop market order and a stop limit order would be: “If the oracle price of Bitcoin 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 a percentage lower than the market price of an asset as opposed to a single value. After that, a stop-loss order follows the asset when its price changes – hence the name “trailing stop”. An example of a trailing stop order would be, “Sell WETH if the price is $ 300 off today’s high.”

Gas efficiency

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

The following table summarizes the gas usage of the 90th percentile of these protocols (affects 90% of transactions). You can find more gas consumption data here.

Related: Ethereum Improvement Proposal 1559: Is The Juice Worth The Juice?

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