Skip to content

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

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

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

Conversation

@dimxy

@dimxy dimxy commented Sep 23, 2025

Copy link
Copy Markdown
Collaborator

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

github-actions Bot commented Jan 8, 2026

Copy link
Copy Markdown

@shamardy
Please review it again.

29 similar comments
@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

github-actions Bot commented Feb 5, 2026

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

github-actions Bot commented Feb 7, 2026

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

github-actions Bot commented Mar 3, 2026

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

github-actions Bot commented Mar 5, 2026

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

github-actions Bot commented Mar 7, 2026

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@shamardy
Please review it again.

@github-actions

Copy link
Copy Markdown

@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