# 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="https://651401021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY2TowO8fF4a1GlgpRfIZ%2Fuploads%2FwHf2HKKiOFjz1Vh58ru2%2Fimage.png?alt=media&#x26;token=db5fadbc-69fd-43cd-9fa2-eadf0c3a7151" 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 %}
