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: Define protocol fee in autopilot configuration #2083

Closed
1 task
sunce86 opened this issue Nov 24, 2023 · 1 comment
Closed
1 task

feat: Define protocol fee in autopilot configuration #2083

sunce86 opened this issue Nov 24, 2023 · 1 comment
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 24, 2023

Problem

Autopilot should have a set of configuration parameters to define the protocol fee. There are two ways we are considering to take the fee:

  1. A cut from the surplus above best quote
  2. Fixed fee

This task captures the work needed to implement (1).

It should be possible to define parameters

  1. How much percent of surplus above best quote should be taken as a protocol fee
  2. Cap in percent of volume
  3. Cap in absolute value ($).

The default values should be:

  1. 50%
  2. 6%
  3. 1000$

Acceptance criteria

  • Autopilot can be configured with different fee parameters.
@sunce86 sunce86 added the E:4.2 Protocol Fee Implementation See https://github.com/cowprotocol/pm/issues/29 for details label Nov 24, 2023
sunce86 added a commit that referenced this issue Dec 12, 2023
# Description
Tackles #2083 and
#2084.

Defines fee policy configuration parameters. Based on them, we can take
the protocol fee as a cut from price improvement or as a percent of the
order volume (fixed fee in absolute value will be implemented later).
On top of that, we also need two flags, for skipping in-market limit
orders and twap orders, since default initial configuration will be to
run the fee experiment only for out-of-market limit orders.

Note that the quote is not forwarded to the `driver` at this moment,
since it is not needed for out-of-market limit orders.

Also note that I am missing the cap for absolute value of protocol fee
(default value 1000$ or 0.5ETH) but this cap is still discussed (will be
added later if needed).

Skipping forwarding protocol fee parameters for in-market limit orders
will be done in a separate PR.

# Changes
<!-- List of detailed changes (how the change is accomplished) -->

- [ ] Defines basic parameters for protocol fee calculation.
- [ ] Forwards protocol fee parameters to the driver.
@sunce86
Copy link
Contributor Author

sunce86 commented Dec 15, 2023

Closed with #2098

@sunce86 sunce86 closed this as completed Dec 15, 2023
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

1 participant