1inch founder Anton Bukov: How does limit order trading enhance flexibility and efficiency for DEX?

OdailyNews
2021-12-05 02:47:00
Collection
In some ways, DEX has surpassed CEX.

Source: 1inch

Stop Loss

With the development of decentralized exchanges (DEX), their functionalities have become increasingly advanced, gradually rivaling centralized exchanges (CEX). One such feature is the limit order. In this article, we will discuss the current state of limit order protocols and analyze their advantages and disadvantages.

Unlike market orders that are executed immediately at the last market price, limit orders are executed immediately once the predetermined price is reached. Most DEXs based on automated market makers (AMM) default to a market order system, which is simple and easy to understand for newcomers. A market order is either executed or fails due to parameters (such as maximum price impact).

Another idea proposed by Paradigm is to use a time-weighted AMM, which gradually executes trades over a period of time (see: https://www.paradigm.xyz/2021/07/twamm/).

It can also be said that limit orders are designed for more advanced traders, as they require analyzing market conditions and assessing the likelihood of asset prices reaching specific levels. At the same time, limit orders are a great tool for professional market makers (PMMs), significantly enhancing trading profitability. Filling limit orders on the blockchain also needs to consider gas fee costs (which are based on order size).

Just like CEXs, there are decentralized protocols that offer limit order functionalities, such as SushiSwap and 0x.

This summer, 1inch launched a limit order protocol that includes several advanced features. The following chart compares the differences in limit order functionalities offered by three mainstream DEXs:

Stop Loss

In terms of trading costs, the 1inch limit order protocol is more advantageous than its competitors due to the absence of additional fees. 0x used to charge fees for limit orders in V3 and V4. However, due to issues raised by the EIP-1559 proposal on the Ethereum network, the 0x community voted to choose zero fees. Now, the protocol does not charge any fees beyond network fees. SushiSwap does not charge any fees, but users' orders can only be filled by SushiSwap's own market orders. This means that arbitrage will become more difficult, and orders will only be executed when price overlaps are more severe.

Additionally, the 1inch limit order protocol offers advanced features never seen before in DeFi, including dynamic pricing and conditional execution, as well as a request for quote (RFQ) feature.

Request for Quote (RFQ)

The RFQ feature can be seen as an over-the-counter trading system for decentralized trading, allowing market makers to transfer liquidity from CEX to DEX users. This provides better pricing for medium to large trades.

CEX and cross-chain liquidity are already connected to 1inch, which is more convenient than any so-called "cross-chain swap."

The purpose of the RFQ system is to make it easy and profitable to provide large amounts of liquidity to DEX while also reducing risk. Since the RFQ system allows market makers to choose when and with whom to trade, they can maximize the ratio of retail order flow to arbitrage flow.

The RFQ feature enables professional market makers, who typically trade crypto assets on CEX or OTC options, to trade large amounts of cryptocurrency on DEX with low risk. With the RFQ feature, professional market makers transfer large amounts of liquidity from CEX to DEX.

Professional market makers can trade across various protocols, including 0x. For example, if a user wants to swap 1000 ETH, the 1inch RFQ order protocol will contact professional market makers to ask if they are willing to make the swap. If they are interested, they will send a signed order. Once the order is executed, a professional market maker sells 1000 ETH on a DEX on another chain for profit, while the DEX benefits from the liquidity brought by the professional market maker. Thus, professional market makers effectively transfer liquidity from CEX and other chains to 1inch.

Moreover, the RFQ system provides better gas efficiency. While filling a simple market order may cost 90k gas fees, a RFQ order in the 1inch limit order protocol will cost 70k gas fees.

Conditional Execution

With conditional execution, users can maximize their trading profits by specifying the conditions under which orders are executed. The conditional execution features of the 1inch limit order protocol help specify fully dynamic conditions, such as those relying on oracles. Specifically, stop-loss orders are based on oracle prices.

Dynamic Pricing

In the dynamic pricing feature, swap prices are calculated by smart contracts based on supply and demand. This differs from other limit order protocols, where users indicate they want to swap X tokens of A for Y tokens of B. With dynamic pricing, the smart contract will tell users how many tokens of B they will receive based on the amount of token A.

A promising application of dynamic pricing is auctions. Limit orders can be structured in such a way that prices will increase or decrease. Similarly, dynamic pricing functionality can support other token sales based on auction models or NFT auctions.

Stop Orders and Trailing Stop Orders

Conditional execution and dynamic pricing features can facilitate a range of functionalities. For example, stop orders and trailing stop orders.

Stop-loss orders are only issued when specific price conditions are met, with price data provided by oracles. For example, "Sell wETH at $2000 when the oracle price is below $2000." Stop-loss orders can be used in conjunction with market or limit orders, providing traders with greater flexibility and opportunities to create more complex strategies.

Essentially, the difference between limit orders and stop orders is that limit orders are on the order book and can be seen by anyone, while stop orders are only submitted when the initially determined price is reached.

Unlike stop orders, stop orders require "if the price reaches X, buy/sell immediately," while stop-limit orders require "if the price reaches X, buy/sell at Y," where X and Y can have the same value but do not have to.

For instance, a combination of a stop order and a stop-limit order could be: "If the oracle price of Bitcoin falls below $30,500, then sell Bitcoin at a price of $30,000."

A stop loss is a market instruction that sets a stop-loss price at a specific percentage below the asset's market price, rather than a single value. After this, as the asset price changes, the stop-loss instruction tracks in real-time, hence the term "trailing stop." An example of a trailing stop instruction is: "Sell the product if its price drops $300 from today's highest price."

Due to conditional execution and another unique feature of the 1inch limit order protocol, dynamic pricing, trailing stop orders are feasible.

These functionalities provided by the 1inch limit order protocol can later be developed by third parties, as the protocol is open-source and can be combined/extended.

Gas Efficiency

In the four versions of the 0x protocol, we calculated the gas usage for executing RFQ orders, as well as the gas usage for regular limit and RFQ orders in the 1inch limit order protocol.

The chart below summarizes the gas usage at the 90th percentile for these protocols (applicable to 90% of trades).

Stop Loss

It turns out that 1inch RFQ orders consume the least gas, making them the most profitable orders for traders in terms of total price.

Multi-Chain Support and Integration

Another advantage of the 1inch limit order protocol is its multi-chain support. The protocol is deployed on Ethereum, Binance Smart Chain, Polygon, and Arbitrum networks, extending limit order functionalities beyond the Ethereum ecosystem.

The 1inch limit order protocol is extremely versatile. Therefore, it can be easily integrated into any other DeFi protocol, serving as a foundation for building various complex products on top of it.

The developer documentation describes the main operational principles for limit and RFQ orders. If you are a developer interested in building a specific solution on the protocol, you can use this form to apply for funding from the 1inch Foundation, including stop-loss orders, trailing stop orders, or Aave/Maker liquidation auctions.

Summary

The goal of DEX is to provide the same functionalities as CEX, but in certain aspects of the decentralized environment, DEX has already surpassed CEX, such as with automated market makers. The limit order functionality is a key tool driving the sub-market forward and narrowing the gap between the options offered by CEX and DEX.

ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
banner
ChainCatcher Building the Web3 world with innovators