core icon indicating copy to clipboard operation
core copied to clipboard

confusion about the daodao order book mechanism

Open deso2021 opened this issue 2 years ago • 0 comments

I have a question about the order matching. I hope you can answer it.

The core problem is that the transaction results may be different on different nodes in the concurrent state, and the results can be determined only after the block is generated (it takes several minutes). How to solve this problem now?

eg. sell order book

num price
1 2
1 1

In this example, A and B initiate a buy request at the same time. They both bid price is 2 and the buy quantity is 1. In the daodao node, A's request is processed first and B's request is processed later. Then A's cost is 1 and B's cost is 2. Users perceive the processing results of the daodao node. But at other nodes (such as diamondapp), B's request arrives first for processing. B's cost is 1, and A's cost is 2. If this block is mined by the diamondapp node, does the transaction result displayed on the daodao platform need to be updated? Or order matching can only occur in the daodao node (this is centralization)

deso2021 avatar Oct 13 '22 11:10 deso2021