Skip to content

fix: factor HL funding into comparison (use netCostUsd not feesUsd) - #2083

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

fix: factor HL funding into comparison (use netCostUsd not feesUsd)#2083
Flotapponnier merged 1 commit into
devfrom
fix/fee-compare-factor-funding

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Previously funding was only displayed, not factored into the savings calculation.

Now:

  • walletStats for HL returns netCostUsd (fees − funding) instead of feesUsd
  • aToBSim/bToASim feesActual = aFees - fundingUsd so saved = gainsEquiv - netCost
  • walletFees() in client returns netCostUsd → big number shows true net cost
  • Effective bps note: "X.XX bps net (fees + funding)"
  • "bps avg · net of funding" subtitle when funding is non-zero

Gains borrowing fees not included (requires separate GnsRolloverFeeCharged scan).

@Flotapponnier
Flotapponnier merged commit cc68f87 into dev Aug 26, 2026
@Flotapponnier
Flotapponnier deleted the fix/fee-compare-factor-funding branch August 26, 2026 16:22
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