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

deal maker cli #3

Open
2 tasks
techland opened this issue Oct 16, 2020 · 0 comments
Open
2 tasks

deal maker cli #3

techland opened this issue Oct 16, 2020 · 0 comments

Comments

@techland
Copy link

This serves as a service backbone for the DEX proposal to help package the orders that are matched. The protocol is designed to incentivize the deal makers who are looking for arbitrage profit among the live orders while aiming to bring in competition among them to achieve better efficiency in completing deals.

Original Requirement

https://nervos.quip.com/vh8zAVnCOmbp/-ckb-DEX#NdGACAJvrNN

Diagram

https://nervos.quip.com/vh8zAVnCOmbp/-ckb-DEX#NdGACAaT4yY

Features

  1. Able to listen for new orders
  2. Able to cache the orders and update them when necessary in a data store.
  3. Able to package the order cells as a transaction to achieve swap actions in a batch.
  4. Able to console log the key metrics in real-time:
  • total attempts (total number of attempts in submitting transactions)
  • successful deals
  • failure deals (could be due to front-running or contract rejections in verifying calculations for the swaps)
  • total profit
  1. Able to configure the wallet account for the deal maker, such as the private key

For simplicity, this CLI client can only have one command dex-miner start at the beginning, which should start itself as a process to listen to and handle for the orders until ctrl-c is triggered.

Tech Stack

These are just some suggestions, please feel free to choose the stack that you are comfortable with.

Definition of done

  • Implemented the features outlined above.
  • Unit tests covering various use cases for making the deals for the orders.
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

No branches or pull requests

1 participant