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

Adhere DEX order to limit order behaviour with multiple counter orders support #14

Merged
merged 14 commits into from
Sep 13, 2021

Conversation

greenhat
Copy link
Member

@greenhat greenhat commented May 7, 2020

Branched from #13

Challenge 1.
Figure out how "select" proper counter orders without a 'sort' op. Example:
For older buy order (price 5 ergs, total 15 ergs) which is matched with 2 newer sell orders (price 5, 2 tokens), (price 4, 2 tokens) how to start "selecting" tokens from the second sell order and finish with the first order?
Without the solution, we'd have to limit to 1-1 (single counter order) order matching per swap tx.

Todo:

  • check that counter order are sorted by token price;
  • draft contracts for multiple counter orders;

Continued in https://github.com/ergoplatform/ergo-contracts/milestone/1

@greenhat greenhat marked this pull request as ready for review September 13, 2021 14:00
@greenhat greenhat merged commit 487cdeb into dex-limit-order Sep 13, 2021
@greenhat greenhat deleted the dex-limit-order-multiple-counter branch September 13, 2021 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant