Skip to content

fix(TPU): add trade fee estimation for TPU code#2624

Open
dimxy wants to merge 45 commits intodevfrom
refactor-TPU-fee-calc
Open

fix(TPU): add trade fee estimation for TPU code#2624
dimxy wants to merge 45 commits intodevfrom
refactor-TPU-fee-calc

Conversation

@dimxy
Copy link
Collaborator

@dimxy dimxy commented Sep 23, 2025

Before this PR, the legacy swap functions were used to estimate trade fees (tx fees) for TPU swaps, so those estimations may not have been quite accurate.

This PR adds trade fee estimation functions for TPU swap steps (like send taker funding, spend taker funding, send maker payment etc).

As refactoring, a new SwapTotalFeeHelper trait is added to abstract getting fees for balance checking in swaps.

TODO: add more tests to validate taker and maker max_volume/trade_preimage estimations for TPU swap fee estimations added in this PR.

@dimxy dimxy self-assigned this Sep 23, 2025
@github-actions
Copy link

@shamardy
Please review it again.

@github-actions github-actions bot added the [] label Nov 30, 2025
@shamardy shamardy removed the [] label Dec 1, 2025
@github-actions
Copy link

github-actions bot commented Dec 3, 2025

@shamardy
Please review it again.

@github-actions github-actions bot added the [] label Dec 3, 2025
@github-actions
Copy link

github-actions bot commented Dec 5, 2025

@shamardy
Please review it again.

@shamardy shamardy removed the [] label Dec 9, 2025
@github-actions
Copy link

@shamardy
Please review it again.

@github-actions github-actions bot added the [] label Dec 11, 2025
@github-actions
Copy link

@shamardy
Please review it again.

19 similar comments
@github-actions
Copy link

@shamardy
Please review it again.

@github-actions
Copy link

@shamardy
Please review it again.

@github-actions
Copy link

@shamardy
Please review it again.

@github-actions
Copy link

@shamardy
Please review it again.

@github-actions
Copy link

@shamardy
Please review it again.

@github-actions
Copy link

@shamardy
Please review it again.

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

@shamardy
Please review it again.

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

@shamardy
Please review it again.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

@shamardy
Please review it again.

@github-actions
Copy link

@shamardy
Please review it again.

@github-actions
Copy link

@shamardy
Please review it again.

@github-actions
Copy link

@shamardy
Please review it again.

@github-actions
Copy link

@shamardy
Please review it again.

@github-actions
Copy link

@shamardy
Please review it again.

@github-actions
Copy link

@shamardy
Please review it again.

@github-actions
Copy link

@shamardy
Please review it again.

@github-actions
Copy link

@shamardy
Please review it again.

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

@shamardy
Please review it again.

@github-actions
Copy link

github-actions bot commented Feb 5, 2026

@shamardy
Please review it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants