Limit Orders Released on PlasmaSwap!

A true implementation of Limit Orders on a DEX

PlasmaPay
Plasma Finance
5 min readMay 19, 2021

--

As we highlighted in a previous blog post, there is one major feature we believe is the most overlooked in popular DeFi DEXs: the ability to use limit orders in trading or swapping.

We’re pleased to say that this will no longer be the case with PlasmaSwap, which now has native Limit Order capabilities — so DeFi traders can finally enjoy one of the key features that traditional traders use to professionalize and, more importantly, automate their trading experience.

Here’s how it works

Put simply, a limit order allows traders to set the maximum or minimum price at which they are willing to buy or sell their digital assets. This is very different from the typical market order style of current DEXs that executes a swap on the spot (hence the term spot market).

When swapping at AMMs like SushiSwap or Uniswap, you are forced to take the rate that is currently available — you can still set a maximum slippage tolerance, but this still means you have to execute the order there and then, at whichever market rate is available.

On PlasmaSwap, you can still use market orders, but you now can also access two types of Limit Orders on PlasmaSwap:

  • A buy limit order that executes only at the limit price you set or lower, if available.
  • A sell limit order that executes only at the limit price you set or higher, if available.

Here are the steps to set a limit order:

  1. Go to PlasmaSwap or PlasmaFinance and connect your wallet.
  2. Select the asset you want to sell and enter the amount you want to sell. If you can’t find the asset, simply search for the token and add it first to your wallet.
  3. Next, select the currency/asset you want to receive for selling. Then, a Current Rate value will appear that is based on the current market rate. The Output you see in the Buy field will be the amount of currency you receive from selling your asset.
  4. Adjust the Limit Rate or Output to set the desired price you want. These fields will adjust themselves as you adjust the values, as they are dependent on each other. Additionally, a message may appear in this format: “Order XX% above/below market”. This indicates that the rate you set is a certain percentage above or below the current market price on PlasmaSwap.
  5. Click the Place Order button to place your limit order. You will need to sign the confirmation prompt to authorize the order. When confirmed, your limit order is placed!
  6. After successful placement of your limit order, you will see it in your history tab and you can close this order anytime you want and receive back the asset that you wish to sell.

What happens next? Under the hood, relayers will begin to check if your limit order can be executed on conditional smart contracts:

  • They will check on PlasmaSwap to see if the Output received from a swap will be equal to or greater than the value you set.
  • If so, they then check if the transaction cost (relayer swap fee and gas costs). This cost is then deducted from the Output value.
  • If Output — cost ≥ Output value, then the limit order is executed!

Of course, if your order value is too small or too big, this can also affect the execution. If too small, the cost of execution may actually cancel out the trade, or if too large, you can have a price impact due to liquidity.

Either way, if conditions are not right, your limit order will exist perpetually until executed or until you withdraw or cancel it. The tokens that you want to swap out will also be locked in the limit order smart contract so you won’t be able to use them until the limit order is executed or canceled by you manually.

Note:

  • You need to pay a transaction fee only to open or close your limit orders as the execution of your limit order will be paid by smart contracts using the instant gas fee.
  • As PlasmaSwap is a DEX, your order is not filled by the set price as usually happens on a CEX. Instead, the order will be executed in full by market price. That also mean that the bigger your order in terms of price impact, than the bigger the variance from the price you set, to compensate price impact.
  • On CEXs, you will always get the exact amount of asset by limit order price. With our DEX limit order, you always get at least the minimum amount expected, but will usually get more at slightly better rates than what you set.

Why Use a Limit Order?

With Limit Orders, there are many benefits (details in this blog post):

  1. Never miss opportunities: Limit Orders automatically fill orders at your desired price.
  2. Stress-free trading: PlasmaFinance connects to all major networks so your Limit Orders can fill on any connected network, not just PlasmaSwap but including every other platform we connect to in the future!
  3. No need to be at your computer: There’s more to life than watching your screen. Set your Limit Orders and let smart contracts do the monitoring!

Professional traders use Limit Orders for these use cases:

  • Take profit: automatically execute your buy limit order when the price of your asset reaches a target price that is higher than the current price, to take a profit from your position.
  • Stop losses: automatically execute your sell limit order when the price of your asset reaches a target price that is lower than the current price, to prevent bigger losses.
  • Future IDO tokens purchase: you can set a limit order for non-existent token pairs, essentially placing orders on future token purchases and become the first token buyer after the pool is eventually launched on PlasmaSwap.

Limit Orders on DEXs are a big deal!

Decentralized exchanges or DEXs have thus far exhibited great success in solving one of the early challenges in maintaining a healthy market for swapping or exchanging on crypto exchanges, especially those working on the automated market maker (AMM) models.

Whereas early DEXs suffered from a lack of liquidity, thus attracting few traders, modern DEXs like Uniswap and our own PlasmaSwap have incentivized individuals to provide their own liquidity, in return for swap fees and other rewards, usually in the form of liquidity provider (LP) token staking rewards.

But because DEXs have never had Limit Order capabilities, professional traders and institutional funds have shied away from this and continued to trade on CEXs that allowed them more implicit fund management and trade portfolio strategies.

This can now all change with Limit Orders on DEXs and we’re very proud to pave the way for professional DeFi trading with PlasmaSwap’s Limit Orders.

Plasma Wallet | Plasma.Finance DeFi| Telegram | Twitter | Reddit | Github

For SpacePort:

Website | Telegram | Twitter | Substack | Launchpad Alliance

--

--

PlasmaPay
Plasma Finance

First crypto/fiat payment platform. Made by @ilyamk