# Order Submission Process

When a user places an order, whether it's to buy or sell on Yamata, the system begins by submitting the order. This submission process has two paths that happen simultaneously: one is **off-chain** (very fast) and the other is **on-chain** (slower).

<figure><img src="/files/bpiFSMFdbxi0JROKNFSI" alt=""><figcaption><p>Order Submission Flow</p></figcaption></figure>

### **Submission A:&#x20;*****Off-Chain (Fast)***

As soon as the user clicks "Buy" or "Sell," the order is quickly submitted to an off-chain matching engine or service through a WebSocket or REST API. This allows for instant order processing, which means the order can be executed almost immediately. This approach is fast because it relies on a single, central system to handle the order.

### **Submission B:&#x20;*****On-Chain (Slower)***

At the same time, the order is also sent through a decentralized route. In this process, the order gets submitted to a distributed storage system, such as **IPFS** (InterPlanetary File System), which ensures transparency. The decentralized method generates a **CID (Content Identifier)**, a unique code that links to the order data stored publicly. This process takes longer than the centralized route but ensures that the order is fully visible and verifiable on a public blockchain.

{% hint style="info" %}
The idea behind having these two paths is to balance **speed** and **transparency**. The centralized system handles the fast execution of orders, while the decentralized path ensures that the order is publicly recorded, providing a permanent and transparent record of the transaction.
{% endhint %}


---

# 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.yamata.io/yamata-nodes/transaction-processing/order-submission-process.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.
