Skip to content

confusion about the daodao order book mechanism #405

@deso2021

Description

@deso2021

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions