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

feat: Allow specific order implementations to signal the next checkTime #8

Closed
anxolin opened this issue Aug 22, 2023 · 3 comments · Fixed by #24
Closed

feat: Allow specific order implementations to signal the next checkTime #8

anxolin opened this issue Aug 22, 2023 · 3 comments · Fixed by #24
Assignees
Labels
E:1.2: Watch Tower Service https://github.com/cowprotocol/pm/issues/8

Comments

@anxolin
Copy link
Contributor

anxolin commented Aug 22, 2023

WatchTower default behaviour will check, for every single block, if its time to place an order.

This, doesn't scale well, because each check will require some RPC calls, and validations, and there's situations where this can be avoided.

For example, in TWAP it is deterministic what is the next moment in time where we will be able to place the next discreate order.

This PR is about signaling the watch tower what is the next checkTime, and waiting patiently until the time is right.

@anxolin anxolin self-assigned this Aug 22, 2023
@mfw78
Copy link
Contributor

mfw78 commented Aug 23, 2023

In order to formalise this, I think the poll on the Conditional Order, should return when to poll the conditional order again, based on either:

  1. Timestamp.
  2. Block Number.

This would keep it relatively order agnostic.

@anxolin
Copy link
Contributor Author

anxolin commented Aug 23, 2023

This PR in the SDK will implement the core logic and abstractions for this cowprotocol/cow-sdk#149

@anxolin
Copy link
Contributor Author

anxolin commented Aug 24, 2023

This PR now do the polling, and set up all the structure so this happens:
#16

Left here placeholder to handle it:
https://github.com/cowprotocol/tenderly-watch-tower/pull/16/files#diff-8e2dc90f4a6ebdf01f8603707f37f7794972fdf1827102bfce89497804f72837R100

@mfw78 mfw78 added the enhancement New feature or request label Sep 18, 2023
@mfw78 mfw78 changed the title feature: Allow specific order implementations to signal the next checkTime feat: Allow specific order implementations to signal the next checkTime Sep 18, 2023
@mfw78 mfw78 linked a pull request Sep 18, 2023 that will close this issue
@mfw78 mfw78 added E:1.2: Watch Tower Service https://github.com/cowprotocol/pm/issues/8 and removed enhancement New feature or request labels Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:1.2: Watch Tower Service https://github.com/cowprotocol/pm/issues/8
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants