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: uni-directional trading pair taker fee support #510

Merged
merged 2 commits into from
Sep 11, 2024

Conversation

cryptomatictrader
Copy link
Collaborator

@cryptomatictrader cryptomatictrader commented Sep 11, 2024

This commit builds on the work done in PR 8344.

Now, the taker fee can be set independently for each trade direction. For example, in a trading pair (A, B), the taker fee for A → B can be P, while the fee for B → A can be Q. With this change, there’s no need to lexicographically sort the pair denominations before storing or retrieving taker fee data. Instead, the taker fee map will now contain two separate entries: one for the pair (A, B) with value P, and another for the pair (B, A) with value Q.

Additionally, adjustments have been made to the node-side logic, where the ingester prepares data for SQS. For more details, refer to PR 8690.

Tested in v26 with the following scenario:

  1. Create v26 in-place testnet node
  2. Start v26 node
  3. Start v26 sqs
  4. Run make sqs-update-mainnet-state in sqs project to capture updated taker fee data for step 5.
  5. Run 'make test-unit` in sqs

@cryptomatictrader cryptomatictrader self-assigned this Sep 11, 2024
@cryptomatictrader cryptomatictrader marked this pull request as draft September 11, 2024 19:40
Copy link

sonarcloud bot commented Sep 11, 2024

@cryptomatictrader cryptomatictrader changed the title feat: bidirectional taker fee support feat: uni-directional trading pair taker fee support Sep 11, 2024
@cryptomatictrader cryptomatictrader marked this pull request as ready for review September 11, 2024 20:11
Copy link
Member

@mattverse mattverse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cryptomatictrader cryptomatictrader merged commit ee28800 into v26.x Sep 11, 2024
9 checks passed
@cryptomatictrader cryptomatictrader deleted the calvin/bidirectional_taker_fee_support branch September 11, 2024 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants