mistX integrates Limit Orders utilizing Gelato Network

Alchemist
5 min readApr 6, 2022

Limit orders are here! mistX Labs are excited to announce that as of today this new feature is now live on mistX.io.

Utilising Gelato Network’s technology, users can set limit orders directly from the DEX for any token available on Uniswap v2.

This latest integration marks a major milestone in our roadmap and we’re pleased to bring extra functionality to mistX users. Ever since we launched V2 in January, the team has continued to work non-stop on further optimizing the DEX and building new features. Stay tuned for some further releases coming soon!

mistX v2 roadmap 2022

Enabling limit orders is an important step in empowering users of mistX to have more tools at their fingertips. At mistX Labs we endeavour to build products for the end-user to navigate the world of DeFi easily and safely.

What is a limit order?

The usual method of trading on a DEX is called market orders and this is when you want to execute the trade in the quickest time possible at whatever the current market rate is. Limit orders allow you to set the price you’re willing to buy or sell and it will automatically carry out the trade once the price meets your order.

How to use it on mistX

When you open the swap interface on mistX click on the ‘LIMIT’ tab near the top. It will look quite similar to the usual swap panel but with a few more additions.

  1. Choose the tokens you want to trade.
  2. Enter the amount you’d like to buy or sell
  3. Once you enter an amount you’ll notice the rest of the fields auto-populate.
  4. Next, in the price field is where you enter the limit price you want to trade at.
  5. You can use the rate switcher to help determine the price and whether it is a sell or buy order
  6. You’ll see a label appear displaying the percentage difference compared to the current price
  7. The amount of the tokens you’ll receive will update based on the order price
  8. Once you’re happy, authorize the token and then click ‘Place Limit Order’
  9. Review your order and sign the transaction on your Metamask
  10. You can view your orders by going to the ORDERS tab
  11. This is where you can also cancel your order

In the example shown in the screenshot below, it is to place a limit order to swap 0.5 ETH if ETH’s market value becomes 4,000 USDC which is 17% above the current market price.

How it works

As per Gelato Network’s example: Let’s say currently 1 ETH is worth 2,200 USDC. If you want to sell 1 ETH for an exact 2,500 USDC, i.e. after a ~ 14% increase in price, you input 1 ETH and set the “Price” to 2,500 USDC and verify that the “output field also says 2,500 USDC (should be handled automatically).

Gelato will automatically execute your order once 1 ETH equals 2,500 USDC + the gas cost that the Gelato bots will pay on your behalf to execute the price. Gas costs are around e.g. $50 and paid by the bots, so realistically, they will execute your order once 1 ETH equals 2,550 USDC. You only pay for the gas it takes to initially submit the order.

Note that the “Real Execution Price” that appears in the review panel indicates what price the order will be executed at. This includes gas necessary to execute and guarantees the rate is fulfilled, this fluctuates with the volume of the trade and gas prices. Typically the larger the order is, the better the execution price will be. If you see larger differences in the execution price with small order amounts this is not a bug.

FAQ

Do I need to pay a gas fee to place an order?

Yes, you’ll need to pay a gas fee.

Am I still protected from MEV using Flashbots?

Yes, your transactions are still private and protected from MEV, they are not sent to the mempool and Flashbots is used to handle the transaction.

What pools are supported?

Currently Uniswap v2 is supported by Gelato Network and we will look to expand the range of limit order liquidity pools in the near future.

Do I need to pay the gas fee to execute the order once the limit price is met?

No, Gelato’s bots take care of the execution fees as it will execute your trade once the market price reaches your desired limit price + fees.

Can I cancel my order before it gets executed?

You can cancel your order by going to your Orders panel. You will be asked to pay a small gas fee, and your tokens will be returned.

Why hasn’t my order been executed though the market price is above my limit?

Non-execution of transactions is mostly due to high network fees on Ethereum. The market price needs to be above (buy) or lower (sell) than the limit price plus the execution fees. It could also be due to a very small trade amount, for which limit orders are not recommended on Ethereum network.

How long will it take to execute my order?

It depends on when the price moves over or under the threshold that you defined. This is up to the crypto markets themselves. It might take days for that to happen.

I’ve got a couple of orders pending. Is there a time limit or are the orders valid until executed?

There is a 3 month expiry date from when you place the order, this is mainly a spam feature.

Expired orders will display on mistX.

Can I use my hardware wallet? [IS THIS CONFIRMED?]

You can use your hardware wallet like Ledger. We highly recommend you connect with MetaMask.

Can I earn ETH cashback rewards on limit orders like on the usual mistX swaps?

No, cashback rewards are only available when swapping normally.

Make sure to join the Alchemist Discord to be a part of the community and to reach out for any queries: discord.alchemist.wtf

--

--