Limit order protocols offer more flexibility and efficiency to DEX traders

Published at: Nov. 13, 2021

As decentralized exchanges (DEXs) evolve, their functionalities become more and more advanced, often matching those of centralized exchanges (CEXs). One such functionality is the ability to place limit orders, which offers more flexibility and efficiency to DEX traders. This article looks at the existing limit order features and their prospective implementations. 

Unlike a market order, which is executed immediately at the last market price with potential slippage, a limit order is executed at a predefined price as soon as it 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 fail due to parameters, such as the maximum price impact.

In turn, limit orders are intended for more advanced traders, since they require analyzing the market situation and assessing the probability of an asset’s price reaching a specific level. Considering filling limit orders on a blockchain also requires taking gas costs into account, which, based on order size, could make the trade more or less profitable.

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

Just like CEXs, a range of decentralized protocols — including SushiSwap, the 1inch Limit Order Protocol and 0x — offer limit order functionality. As a result, advanced features never before seen in DeFi, have been made available, including request for quote (RFQ), dynamic pricing and conditional execution.

Request for quotes

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

An RFQ system aims to make providing significant amounts of liquidity to DEXs easy and profitable while also reducing risks. Because market makers can choose when and with whom they want to transact, they can maximize their ratio of retail order flow to arbitrage flow.

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

If, for instance, a user wants to swap 1,000 Ether (ETH), a limit order protocol reaches out to PMMs, asking them if they’ll do this swap. If they are interested, they send a signed order. Once the order has been executed, a PMM sells the 1,000 ETH on another chain’s DEX at a profit, while the DEX takes advantage of the liquidity brought by the PMM. Thus, PMMs effectively bring CEXs’ and other chains’ liquidity to DEXs.

In addition, RFQ offers better gas efficiency. While the filling of a simple market order would cost 90,000 of gas, an RFQ order would cost just 70,000 of gas (these figures are approximate).

Conditional execution and dynamic pricing

The 1inch Limit Order Protocol’s conditional execution and dynamic pricing features could facilitate a range of functionalities. Thanks to conditional execution, users can maximize their earnings on trades by specifying conditions for order execution. In the dynamic pricing feature, swap prices are calculated by smart contracts, based on demand and supply.

One promising use case for dynamic pricing is auctions. A limit order can be placed in such a way that the price will increase or decrease (as in a Dutch auction). Similarly, the dynamic pricing feature can power initial DEX offerings and other token sales based on the auction model or nonfungible token (NFT) auctions.

Related: How much intrigue is behind Kusama’s parachain auctions?

Stop and trailing stop orders

Another example of the implementation of conditional execution and dynamic pricing features could be stop orders and trailing stop orders.

Stop orders are only placed when specific price conditions are met, with price data provided by oracles. For instance, “Sell wETH at $2,000 when the oracle price is lower than $2,100.” Stop orders can be used in combination with market or limit orders, which offers traders more flexibility and a chance to create more complex strategies.

Basically, the difference between limit and stop orders is that limit orders are placed on the order book, and anyone can see them, while stop orders are only submitted when a preliminarily defined price is reached.

Unlike a stop market order, which would say something like “If the price reaches X, buy/sell immediately,” a stop-limit order would say “If the price hits X, place an order to buy/sell at Y.” X and Y can have the same value, but not necessarily.

A combination of a stop market order and a stop limit order would be, for instance: “If Bitcoin’s oracle price is below $30,500, sell Bitcoin at $30,000.”

A trailing stop, also known as a trailing stop-loss, is a market order that sets a stop-loss at a specific percentage lower than an asset's market price as opposed to a single value. After that, a stop-loss order trails behind the asset as its price changes — hence, the name “trailing stop.” An example of a trailing stop order would be: "Sell wETH if its price falls by $300 from today’s highest price."

Gas efficiency

We have calculated gas usage for RFQ order execution in four versions of the 0 protocol, as well as those of regular limit and RFQ orders in the 1inch Limit Order Protocol.

The chart below summarizes 90th percentile gas usage of these protocols (applying to 90% of transactions). More gas usage data is available here.

Related: Ethereum Improvement Proposal 1559: Is the squeeze worth the juice?

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

This article does not contain investment advice or recommendations. Every investment and trading move involves risk, and readers should conduct their own research when making a decision.

The views, thoughts and opinions expressed here are the author’s alone and do not necessarily reflect or represent the views and opinions of Cointelegraph.

Anton Bukov is the co-founder of the 1inch Network, a distributed network of decentralized protocols. Anton worked as a C++ developer and iOS developer and later contributed to crypto projects including MultiToken, NEAR and Synthetix. Anton also co-hosted a YouTube show, CryptoManiacs. At a 2019 hackathon, Anton and Sergej Kunz, the 1inch Network's eventual co-founder, developed a prototype crypto exchange aggregator that became the basis of the entire network.
Tags
Related Posts
What are the best altcoins you can buy for under $3? | Find out now on The Market Report
“The Market Report” with Cointelegraph is live right now. On this week’s show, Cointelegraph’s resident experts discuss the best altcoins to buy for under $3. But first, market expert Marcel Pechman carefully examines the Bitcoin (BTC) and Ether (ETH) markets. Are the current market conditions bullish or bearish? What is the outlook for the next few months? Pechman is here to break it down. Next up: the main event. Join Cointelegraph analysts Benton Yaun, Jordan Finneseth and Sam Bourgi as they discuss the best altcoins to buy for under $3. First up, we have Bourgi with his first pick of …
Decentralization / March 29, 2022
SushiSwap CTO resigns citing internal structural chaos
Late Wednesday, Joseph Delong, chief technology officer of SushiSwap, the 13th largest decentralized exchange, or DEX, by trading volume, tendered his immediate resignation from the role. Explaining his decision, Delong gave the following statement: "I wish Sushi the best and am saddened that Sushi is so imperiled within and without. The chaos that is occurring now is unlikely to result in a resolution that will leave the DAO as much more of a shadow than it once was without a radical structural transformation." In the interest of the Sushi Community I am resigning as CTO effective immediately. I very much …
Decentralization / Dec. 9, 2021
Uniswap builds interface to swap altcoins into ETH donations for the Ukrainian people
On Tuesday, decentralized exchange, or DEX, Uniswap launched an interface that directly converts ERC-20 tokens, such as Aave, Chainlink (LINK), and Decentraland, to Ether (ETH). These coins are then sent to the official crypto wallet addresses of the Ukrainian government, all in a single transaction. In explaining the rollout, Uniswap claimed that the address shared by the Ukrainian government is located on a centralized exchange and only accepts ETH and Tether (USDT). Thus, the feature simplifies the donation process for anyone holding ERC-20 tokens on Uniswap's list and who wishes to donate by connecting their wallet to the DEX. 2/ …
Decentralization / March 1, 2022
BREAKING: Curve Finance team warns users to avoid using site until further notice
On Aug 9, automated market maker Curve Finance took to Twitter to warn users of an ongoing exploit on its site. The team behind the protocol noted that the issue, which appears to be an attack from a malicious actor, is affecting the service’s nameserver and frontend. Don't use https://t.co/vOeMYOTq0l site - nameserver is compromised. Investigation is ongoing: likely the NS itself has a problem — Curve Finance (@CurveFinance) August 9, 2022 Curve stated via Twitter that its exchange — which is a separate product — appeared to be unaffected by the attack, as it uses a different DNS provider. …
Decentralization / Aug. 9, 2022
NFT Steez and Lukso co-founder explore the implications of digital self-sovereignty in Web3
Sovereign identity has been a hot topic in blockchain and cryptocurrency, especially with the rise of the creator economy. Currently, there are two types of digital identities— federated and centralized whereby data is in the control of the service provider. Self-sovereign digital identity is often cited as a human right that can reclaim agency using blockchain technology, but what frameworks exist that aid in governing it? On Aug. 2, NFT Steez, a bi-weekly Twitter Spaces hosted by Alyssa Expósito and Ray Salmond, met Marjorie Hernandez, the co-founder of LUKSO and The Dematerialized to discuss the state of blockchain-based identities and …
Decentralization / Sept. 2, 2022