hubiinetwork / nahmii-contracts

Smart contracts for 1st generation Nahmii 2nd layer scaling solution for Ethereum
16 stars 12 forks source link

WIP: Add first iteration of revised trade types lib #420

Open jijordre opened 5 years ago

jijordre commented 5 years ago

Solution to #415.

File TradeTypesLib2.sol was added. Eventually the old schemas in TradeTypesLib.sol will be replaced by the ones in the new file.

One question to keep at the back of your head when reviewing. Struct OrderParty has property balances, so will contain one balance amount value for each of intended and conjugate currencies. We should ask ourselves whether this should be expanded to current and previous balances for each of the two currencies, thus a total of 4 balance values for the order party.

This iteration keeps Trade.transfers for now. This property, however, is likely to be deemed obsolete at the end of updates of DSC and NSC logics (#418).

Also order cancellation should be taken with a huge pile of salt and its more thorough definition deferred to #419.