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 (sqs ingester) (backport #8690) #8691

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Sep 11, 2024

This commit builds on the work done in PR 8344, but specifically on the data ingester for SQS.

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 sqs-side logic, For more details, refer to PR 510.

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

This is an automatic backport of pull request #8690 done by [Mergify](https://mergify.com).

…8690)

* bidirectional taker fee support on sqs

* lint

* Removed outdated comment in ingest/sqs/pools/transformer/taker_fee.go

Co-authored-by: Matt, Park <[email protected]>

---------

Co-authored-by: Matt, Park <[email protected]>
(cherry picked from commit 9d103ce)
@PaddyMc PaddyMc merged commit 04f534f into v26.x Sep 12, 2024
1 check passed
@PaddyMc PaddyMc deleted the mergify/bp/v26.x/pr-8690 branch September 12, 2024 08:02
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