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

Revision of schemas related to trade #415

Open
jijordre opened this issue Jun 19, 2019 · 0 comments
Open

Revision of schemas related to trade #415

jijordre opened this issue Jun 19, 2019 · 0 comments
Assignees

Comments

@jijordre
Copy link
Contributor

jijordre commented Jun 19, 2019

Description

The security of the API requires the addition of string properties in trade and order documents.

It is suggested that property data be added to TradeParty. This property should be populated by concerned wallet.

Struct Order should be revised to be more consistent with Payment of PaymentTypesLib. A new struct OrderParty is suggested. Order should then obtain property OperatorParty party.

Struct OrderParty is suggested to host properties uint256 nonce and address wallet. The corresponding two properties will be removed from Order. In addition OrderParty should include the concerned wallet's balances in the intended and conjugate currencies and string data property.

Property uint256 operatorId of Trade and Order should be replaced by Operator operator, i.e. of the same type as in PaymentTypesLib. The latter string property only should be populated by the operator and part of properties hashed by the operator.

In the same go the global nonce property of trade should be removed both from trade schema as well as from set of properties hashed by the operator. It has no longer any use in smart contracts. Correspondingly fraud challenge smart contracts that trigger on the duplication of global nonce from trade are obsolete and should be removed.

Definition of done

  • Trade schema has been updated
  • Order schema has been updated
  • OrderParty schema has been added
  • Hashing of payments has been updated
  • Relevant fraud challenge contracts have been removed
  • Unit tests have been updated

Details & Questions

Depends on

@jijordre jijordre added this to To do in nahmii contracts via automation Jun 19, 2019
@jijordre jijordre removed this from To do in nahmii contracts Jun 19, 2019
@jijordre jijordre added this to To do in nahmii contracts via automation Jun 19, 2019
@jijordre jijordre assigned jijordre and unassigned jijordre Jun 19, 2019
@jijordre jijordre moved this from To do to In progress in nahmii contracts Jun 19, 2019
@jijordre jijordre self-assigned this Jun 19, 2019
@jijordre jijordre moved this from In progress to In Review in nahmii contracts Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
nahmii contracts
  
In Review
Development

No branches or pull requests

1 participant