# 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.&#x20;

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.

<figure><img src="/files/n7dtyJe0fosuswilwF3S" alt=""><figcaption><p>Simplified Purchasing Options Flow</p></figcaption></figure>

### **Market** B**uy Order Flow**

The main stages a **market** **buy** order goes through are as follows:&#x20;

1. 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...).
2. The user signs a transaction to be executed by Grix’s router and an order is created. ([EIP 712](https://eips.ethereum.org/EIPS/eip-712))
3. The order flows to the Optimization Layer to be handled by Socrates and auctioned for the solvers network.
4. Each solver submits back its answer for the optimal route of the order (splitting orders between protocols and swapping tokens on various DEX).
5. After verification of each route, the solutions are prioritized (lowest price, minimal gas and follows user's preferences), batched and sent to be executed.
6. 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.

<div data-full-width="true"><figure><img src="/files/Ki7kM1UWH4A1T8TtXj3G" alt="" width="342"><figcaption><p>Grix App Simple Trade</p></figcaption></figure></div>

### Buy Order Result

<figure><img src="https://lh7-us.googleusercontent.com/J7wbrNob0_C8km8lfskq98QtoPqCvG5v6c-sFy9GwpSJ9llCgQQDewc5NNjHU5BAfpjm54hLloms3Ae-INYzUCy3rZ0GHb8mV6Y4YSISrkfuqzDuACc5J2okDyLJyLAZ1lGnbqBvu2uYqx-gnU8xYM9VGTtFOzSVI0pbPw6QKZZhDPFwB4KQ7scCk2f_8A" alt=""><figcaption><p>Example of a split transaction</p></figcaption></figure>

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.

### **Limit** B**uy Order Flow**

The main stages a **limit** **buy** order goes through are as follows:&#x20;

1. 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...).
2. The user signs a transaction to be executed by Grix’s router and an order is created in the SOP[^1]. ([EIP 712](https://eips.ethereum.org/EIPS/eip-712))
3. All the SOP order book flows constantly to the Optimization Layer to be handled by Socrates and auctioned for the solvers network.
4. 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
5. After verification of each route, the solutions are prioritized (lowest price, minimal gas and follows user's preferences), batched and sent to be executed.
6. 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.

<br>

[^1]: The Secondary Options Pool is a unique component in Grix, enabling takers and makers to trade on-chain while significantly lowering bid-ask spread and AMM fees.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.grix.finance/grix/grix-protocol/grix-trading/purchase-options.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
