Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB models #4

Open
posgnu opened this issue Dec 6, 2018 · 0 comments
Open

DB models #4

posgnu opened this issue Dec 6, 2018 · 0 comments
Labels

Comments

@posgnu
Copy link
Contributor

posgnu commented Dec 6, 2018

A back-end of the DEX should be able to relay orders and keep them until the taker who wants to fill or partially fill the order appears. We need a model for orders which will be referred to an order book.

Order
  makerAsset: String,
  takerAsset: String,
  amount: Bigint,
  rate: Double,
  makerAddress: String,
  assetList: JSON
  order: JSON
  marketId: number

Except for the transaction field, other fields are only for querying transaction. These are also in the transaction.
Also, a model for the history of completed transactions is needed for future reference.

Deal
  maker: String,
  taker: String,
  makerAsset: String,
  takerAsset: String,
  makerAmount: Integer,
  takerAmount: Integer,

DB have to be changed according to changed matching scheme

@posgnu posgnu added the design label Dec 6, 2018
@posgnu posgnu added db and removed design labels Dec 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant