Purchase Options
To a user, the experience of trading on Grix is similar to other DeFi options protocols, but under the hood, there are four layers working in sync to bring the most efficient and secure order executions.
Rather than creating executable on-chain transactions, the user can either market buy an option (with the best pricing solved by the protocol) or create a limit buy order.
Market buy - the user gets an immediate RFQ and the solvers try to best it with optimal routes for the order.
Limit buy - the user submits the order as signed transactions ready to be fulfilled when the price matches the user’s preferences.
Market Buy Order Flow
The main stages a market buy order goes through are as follows:
The user receives an expected price quote for the wanted option from Argus, and chooses the market buy with execution preferences (slippage, unwanted protocols, payment token, etc...).
The user signs a transaction to be executed by Grix’s router and an order is created. (EIP 712)
The order flows to the Optimization Layer to be handled by Socrates and auctioned for the solvers network.
Each solver submits back its answer for the optimal route of the order (splitting orders between protocols and swapping tokens on various DEX).
After verification of each route, the solutions are prioritized (lowest price, minimal gas and follows user's preferences), batched and sent to be executed.
The transaction is built using an open-source library and sent to an automated execution network to be transmitted to the blockchain. The execution is utilized using the Grix router contract, which resolves the order and sends the relative fees to the solver and the protocol.
Limit Buy Order Flow
The main stages a limit buy order goes through are as follows:
The user receives an expected price quote for the wanted option from Argus, and chooses the limit buy with execution preferences (buy price, unwanted protocols, payment token, etc...).
The user signs a transaction to be executed by Grix’s router and an order is created in the . (EIP 712)
All the SOP order book flows constantly to the Optimization Layer to be handled by Socrates and auctioned for the solvers network.
Each solver submits back its answer for the optimal route of the order, in limit orders most of the times there is no immediate execution routes until prices change. The routing might be through DeFi option protocols AMM, or a market sell order made by another user
After verification of each route, the solutions are prioritized (lowest price, minimal gas and follows user's preferences), batched and sent to be executed.
The transaction is built using an open-source library and sent to an automated execution network to be transmitted to the blockchain. The execution is utilized using the Grix router contract, which resolves the order and sends the relative fees to the solver and the protocol.
Buy Order Result
Auctioning the optimal route between solvers ensures that users always receive the best prices for their orders.
Using a network of solvers to compute the route ensures that the order execution is optimal. Otherwise, the next best solver would have won the auction.
Another advantage of using a decentralized solution to compute the best route is that the community of solvers will be actively looking for an edge. Integration of new protocols and strategies will be developed and will increase the amount of integrated protocols with Grix.
Last updated