Introducing Order Protocol

Order Protocol
OrderProtocol
5 min readJul 29, 2021

--

Order Protocol is a decentralized OMS (Order Management System) build on Polygon. Users are able to save orders with algorithmic conditions, and when those conditions are met orders will be sent to DEXs to be executed.

In the example above user is saving an order: “If MATICUSDT is less than 0.8$, SWAP my 5 ETH to MATIC”. Once the user saved this order, he/she can close the screen and leave the rest to OrderProtocol. When the condition is met OrderProtocol will send this order to the chosen DEX.

Users are able to create orders like:

  • IF MATIC<$0.8 , SWAP USDT to MATIC
  • IF MATIC >$2.0, SWAP MATIC to USDT
  • IF ETH/MATIC < 0.1, SWAP USDT to LINK

Let’s say there is a new token called “XYZ” that will be listed on QuickSwap (IDO). Before the listing, users could save their orders on OrderProtocol:

  • IF XYZ/USDT< 1.2$, SWAP MATIC to XYZ

So even before the initial listing, the user could save an order to buy XYZ, only if the price of a single XYZ is less than 1.2$. We believe that this will be a huge weapon for real users against bots on IDOs.

How does it work?

In order for users to use OrderProtocol, first, they need to create an OrderProtocol Account. You could think OrderProtocol Account as a new wallet.

When you create an Account, a smart contract is deployed to Polygon Network where you are the owner of the contract. Only the owner of the Account have rights to:

  • Save an order
  • Delete an order
  • Withdraw MATIC or tokens from the account balance.

So nobody can withdraw your balance, or submit an order for you.

Ok. You created an Account, saved an order. How this order’s condition will be checked and sent to DEX.

OrderRunners

OrderRunners are users that check all OrderProtocol accounts (smart contracts), and trigger them for sending orders to DEXs if the condition is met. Anybody could be an OrderRunner if they hold 10.000 ORDP tokens.

Each OrderProtocol Account smart contract has a sendOrder function. This function could only be triggered if:

  • Order’s condition is met.
  • There is enough balance on the OrderProtocol Account for the swap operation. For example, if there is an order for swapping 100 LINK with MATIC. There should exist 100 LINK token in the account balance.
  • There should exist 0.1 MATIC on the user balance. This amount will be paid to OrderRunner who pays the gas to triggers the user’s order and send it to DEX.
  • The address that triggers this function should hold 10.000 ORDP tokens. (means He/she should be an OrderRunner)

Summary

Let’s summarize the flow again:

There are two types of profiles on OrderProtocol.

  1. Users: they are the main users of OrderProtocol. They save orders.
  2. OrderRunners: they are the ones that trigger OrderProtocol to check orders and submit them to DEX if conditions are met.

For example:

User: John,
OrderProtocol: Michelle

  1. User John created an order “IF MATIC/USDT is less than 0.8$, SWAP 1000 MATIC tokens with USDT.
  2. John deposited 1000 MATIC for swap operation to his OrderProtocol Account.
  3. John deposited 0.1 MATIC as a tip for OrderRunners to his OrderProtocol Account.
  4. OrderRunner Michelle is constantly trying to send John’s order to DEX. But OrderProtocol smart contract only lets the order be submitted if the conditions are met.
  5. Let’s say several days passed and MATIC/USDT really become less than 0.8$. At that moment the Michelle triggered John’s smart contract to send the order will pay the gas fee. And the order will be submitted to DEX to be executed. Since Michelle paid the gas fee for sending John’s order to DEX, he will be tipped 0.1 MATIC from John’s OrderProtocol account balance.
  6. So John didn’t paid a gas fee for sending the order to DEX. Instead, he paid Michelle 0.1 MATIC (tip) for triggering his order.
  7. Michelle earned 0.1 MATIC for submitting John’s order.

So OrderRunners motivations are to earn 0.1 MATIC per order they triggered. And user’s motivations are they will able to create algorithmic orders for Polygon DEXs.

ORDP Token

There are 10.000.000 ORDP tokens. ORDP is an ERC20 token.

It is already created and verified on PolygonScan:

https://polygonscan.com/address/0x6b1636b23c7f7545c6bFFA6EBe5e793cFA80D28A

Token distribution:
%20 is dedicated to the team: 2.000.000 ORDP

We will be distributing %80 of ORDP tokens as airdrop equally to the first 1000 users that participate in our Beta Phase.

We believe OrderProtocol is a tool/project that this ecosystem needs.

Our code is verified on PolygonScan for anyone to check.
https://polygonscan.com/address/0x6b1636b23c7f7545c6bFFA6EBe5e793cFA80D28A
https://polygonscan.com/address/0xc3ef4647D462225D91057D38aACcA78baE33a016

We are more than happy to get feedback and suggestions for improvements. We will be releasing our website (UI) and a nodejs app(for OrderRunners that automatically checks all accounts and trigger orders) on our GitHub page soon. OrderProtocol is a fork project from Algorder. We are bringing conditional orders & limit orders & algorithmic orders to Polygon. Although this is a fork project, we will be focusing on developing different features and move on in a different path. We will be bringing algorithmic orders to DEXs with technical indicators by using ChainLink as a price Oracle.

Beta Phase

Currently, OrderProtocol is live at https://orderprotocol.com We are in the beta phase. So please use it at your own risk. If you see any bugs please report us on our social media platforms.

We will be equally distributing ORDP tokens as airdrop to first 1000 users that created an account on OrderProtocol. Account creation fee will increase as below:

0–50: 10 MATIC,
50–250: 20 MATIC,
250–500: 30 MATIC,
500–1000: 40 MATIC,
1000+ : 40 MATIC . But after 1000 accounts are created users won’t be eligible for the airdrop. Only first 1000 users will earn the airdrop.

Why there is a fee?

Account creation fee is a one time process. This fee will be used for server & rpc.maticvigil.com costs.

We are planning for ending the beta phase on August 31, 2021. Before the beta phase ends, we will release a dashboard for distributing ORDP token airdrop and release our node.js application for OrderRunners on our GitHub page.

This date could change depending on the beta phase feedbacks. We could end sooner or later than this. We will announce it from all of our social media channels if it changes.

Transparency

Our smart contracts are verified on PolygonScan. So all of our smart contracts code is open for anyone to check

OrderProtocol:

https://polygonscan.com/address/0xc3ef4647D462225D91057D38aACcA78baE33a016

OrderProtocol Token (ORDP):

https://polygonscan.com/address/0x6b1636b23c7f7545c6bFFA6EBe5e793cFA80D28A

Our website is a client-side website (javascript) so all of the code is visible for anyone now. We will also publish it on our GitHub page when we completed the documentation.

Before the end of the beta phase, a node.js application for OrderRunners will be published on our GitHub page too.

Thanks

--

--