Skip to content

fix: bToASim saved sign + Gains walletStats netCostUsdc - #2093

Merged
Flotapponnier merged 1 commit into
devfrom
fix/fee-compare-sim-signs
Aug 26, 2026
Merged

fix: bToASim saved sign + Gains walletStats netCostUsdc#2093
Flotapponnier merged 1 commit into
devfrom
fix/fee-compare-sim-signs

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Bugs fixed

  • bToASim saved sign: was stats.fees - equivFees (inverted) → now equivFees - stats.fees. When venueB is cheaper, saved is now correctly positive and shows venueB advantage (not venueA).
  • bToASim HL→Gains saved: was bNetCost - aEquiv → now aEquiv - bNetCost (same inversion).
  • bToASim effectiveRateNote: was showing bFees/notional (trading only) → now bNetCost/notional (net including funding), consistent with venueA label.
  • walletStats Gains fees: was feesUsdc (trading only) → now netCostUsdc (total cost), consistent with HL using netCostUsd.

These bugs caused the comparison direction to flip when only venueB had wallet data.

- bToASim saved: aEquiv - bNetCost (was reversed, caused wrong advantage display)
- bToASim HL effectiveRateNote: use bNetCost not bFees for net bps label
- walletStats gains: fees = netCostUsdc (trading + funding + borrowing, consistent with HL)
@Flotapponnier
Flotapponnier merged commit 9b43d5a into dev Aug 26, 2026
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.

1 participant