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

Maker #972

Closed
11 tasks done
bonomat opened this issue Jul 12, 2023 · 9 comments
Closed
11 tasks done

Maker #972

bonomat opened this issue Jul 12, 2023 · 9 comments
Labels
Milestone

Comments

@bonomat
Copy link
Contributor

bonomat commented Jul 12, 2023

The maker hedges his position on bitmex. Any matched order received from the coordinator, will simply get created as position skipping the dlc setup. That simplifies the overall process and safes costs, as the maker and the coordinator are anyways both in control of 10101.

sequenceDiagram

participant b as BitMex
participant m as Maker
participant c as Coordinator
participant o as Orderbook
participant t as Taker


m ->> o: create limit order

t ->> o: market order
o -->> o: match maker and taker

o ->> c: execute match


c -> t: Setup DLC channel

c ->> m: Inform match

m ->> m: Adapt hedge position

m ->> b: Update order

Loading

Optional

  1. Stale maker
  2. Stale maker
@holzeis holzeis changed the title Hedging on Bitmex Maker Jul 21, 2023
@holzeis holzeis transferred this issue from another repository Jul 21, 2023
@holzeis holzeis transferred this issue from another repository Jul 21, 2023
@holzeis holzeis added the epic label Jul 21, 2023
@holzeis holzeis added this to the 1.2.0 milestone Jul 21, 2023
@da-kami
Copy link
Contributor

da-kami commented Jul 28, 2023

Note (nothing to action here):

As the sequence diagram outlines, the maker is only notified once the match with trader was executed (i.e. the DLC is successfully set up between coordinator and the taker).
Note that this step will eventually be obsolete - once the maker reasons about it's own position (and sets up DLCs with the coordinator) the coordinator will not have to notify the maker at this point, but the maker is consuming order matches from the orderbook as the taker does.
You might want to capture the eventual complete flow somewhere separate as well so it is clear how this should evolve.

@bonomat
Copy link
Contributor Author

bonomat commented Jul 28, 2023

Note that this step will eventually be obsolete - once the maker reasons about it's own position (and sets up DLCs with the coordinator) the coordinator will not have to notify the maker at this point, but the maker is consuming order matches from the orderbook as the taker does.

This is what was meant with the step inform match: the orderbook notifies the maker-daemon about a match being found. The maker can then assume that the DLC protocol will be successful and can start hedging.

@da-kami
Copy link
Contributor

da-kami commented Jul 28, 2023

Note that this step will eventually be obsolete - once the maker reasons about it's own position (and sets up DLCs with the coordinator) the coordinator will not have to notify the maker at this point, but the maker is consuming order matches from the orderbook as the taker does.

This is what was meant with the step inform match: the orderbook notifies the maker-daemon about a match being found. The maker can then assume that the DLC protocol will be successful and can start hedging.

OK, the diagram is not precise enough ;)
Initially I had written up a proposal to change the flow so the coordinator would contact the maker about a successful execution, so the maker can be sure the position is captured correctly.
You can also assume that every match will result in a successful execution. I don't have a feeling for how many failures we see after a successful match.

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Sep 28, 2023
@bonomat
Copy link
Contributor Author

bonomat commented Sep 28, 2023

still valid and almost done.

@github-actions github-actions bot removed the Stale label Sep 29, 2023
@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Oct 29, 2023
@bonomat bonomat removed the Stale label Oct 29, 2023
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Nov 29, 2023
@bonomat bonomat removed the Stale label Nov 29, 2023
@holzeis
Copy link
Contributor

holzeis commented Dec 2, 2023

@bonomat all tickets are closed or done. Can we close this epic?

@bonomat
Copy link
Contributor Author

bonomat commented Dec 2, 2023

This epic is done. We will need a follow-up ticket to make the maker feature complete.

@bonomat bonomat closed this as completed Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants