atomiclabs / atomiclabs/hyperdex

Use the concept of "orders" instead of "swaps"

Open
#615 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
151
Forks
55
PR merge metrics
No merged PRs in 30d

Description

mm2 is using a different concept for orders than what we implemented for mm1. For mm1, one order was equal to one swap. In mm2, there's the concept of a order having potentially multiple swaps, and it also has the concept of taker/maker (in mm1 the end-user was always Taker and the server was Maker).

> At the moment we have no concept of orders, we just use the UUID we get from the buy API and wait for it to show in `my_recent_swaps`. Which taker orders always will. But for maker order, we need to track the actual order to check for all swaps that may be started for it. But that won’t work for taker orders because the order is deleted as soon as it's matched, which we can easily miss when it's matched quickly.
> From Artem in Discord, the proper way to currently track both of these use cases is:
We will have to persist the `order_history` sooner or later (https://github.com/KomodoPlatform/atomicDEX-API/issues/451) so it'll be done for sure. As of now you have to follow these steps: create order -> check `order_status` -> if there's no order check `my_swap_status` with same uuid -> if swap is not found there's something unexpected. - @lukechilds

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.