Order Submission Process
Last updated
Last updated
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).
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.
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.
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.