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

Remove global fee rate values and set all fee rates on a per market basis #336

Closed
bogberry opened this issue Jul 12, 2023 · 1 comment
Closed
Labels
enhancement New feature or request

Comments

@bogberry
Copy link
Contributor

bogberry commented Jul 12, 2023

Currently, there is a fee divisor that is set to 2000 globally for all markets. There should not be any global fee parameters, and all fee rates should be defined on a per market basis.

As discussed in #329, fee rates should be checked against the lot size and the tick size of the market so that any fee calculations do not result in rounding of integer values and discrepancies when comparing the amount of fees that theoretically should be collected to the amount actually collected.

However, because this rate is set globally, this condition must be met for all lot size / tick size combinations across all markets, limiting the values at which we can set fee rates. As we do not wish to impose this constraint, in practice this prevents us from eliminating the accounting errors that may occur as a result of this implementation. There is no rationale for setting this value globally, and switching to setting all fee rates per market would give users additional flexibility in addition to resolving this issue.

Finally, fee rates should not be set as a divisor. This makes it difficult to set a fee of, for example, 0.3%.

@bogberry bogberry added the enhancement New feature or request label Jul 12, 2023
@bogberry bogberry changed the title Remove global fee rate values and make all fees per market Remove global fee rate values and define all fee rates on a per market basis Jul 12, 2023
@bogberry bogberry changed the title Remove global fee rate values and define all fee rates on a per market basis Remove global fee rate values and set all fee rates on a per market basis Jul 12, 2023
@alnoki alnoki closed this as completed Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants