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: [ON HOLD] Differentiate TWAP limit orders in autopilot #2091

Closed
1 task
sunce86 opened this issue Nov 28, 2023 · 3 comments
Closed
1 task

feat: [ON HOLD] Differentiate TWAP limit orders in autopilot #2091

sunce86 opened this issue Nov 28, 2023 · 3 comments
Labels
E:4.2 Protocol Fee Implementation See https://github.com/cowprotocol/pm/issues/29 for details

Comments

@sunce86
Copy link
Contributor

sunce86 commented Nov 28, 2023

Problem

TWAP limit orders need to have a different protocol fee treatment within driver. For example, initial (default) way of calculating protocol fees for regular limit orders will be based on price improvement while for TWAP limit orders will be based on fixed fee.

Suggested solution

If protocol fee parameters are defined per order, than the driver can be oblivious if the limit order is regular or TWAP. Only the autopilot would have to know so it could define fee parameters for each order in the auction before sending it to the driver. Based on my latest learnings, currently autopilot doesn't know if the order is TWAP or not, so this should be implemented in this issue (probably via appdata).

Acceptance criteria

  • Autopilot knows if the limit order is regular limit order or TWAP
@sunce86 sunce86 added the E:4.2 Protocol Fee Implementation See https://github.com/cowprotocol/pm/issues/29 for details label Nov 28, 2023
@fleupold
Copy link
Contributor

Can we scope out TWAP fees into a somewhat different epic/milestone? While useful for the design, I don't think we should put any work into TWAP fees before limit order fees are live as this will just distract and delay us (cc @olgafetisova)

@sunce86
Copy link
Contributor Author

sunce86 commented Nov 29, 2023

Can we scope out TWAP fees into a somewhat different epic/milestone? While useful for the design, I don't think we should put any work into TWAP fees before limit order fees are live as this will just distract and delay us (cc @olgafetisova)

I think this makes sense a lot.
I will go with the simplest initial implementation supporting only general limit orders with out-of-market price.

@sunce86 sunce86 changed the title feat: Differentiate TWAP limit orders in autopilot feat: [ON HOLD] Differentiate TWAP limit orders in autopilot Dec 2, 2023
@sunce86
Copy link
Contributor Author

sunce86 commented Jan 15, 2024

For the same reason as in https://github.com/cowprotocol/services/issues/2115#issuecomment-1892233770, nothing to do for this issue.

@sunce86 sunce86 closed this as completed Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:4.2 Protocol Fee Implementation See https://github.com/cowprotocol/pm/issues/29 for details
Projects
None yet
Development

No branches or pull requests

2 participants