Skip to content

fix: fee-compare HL funding projection + UX labels - #2212

Merged
Flotapponnier merged 1 commit into
devfrom
feat/fee-compare-fixes
Aug 30, 2026
Merged

fix: fee-compare HL funding projection + UX labels#2212
Flotapponnier merged 1 commit into
devfrom
feat/fee-compare-fixes

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Summary

  • computeHlFunding now returns signed net (positive = pays, negative = receives) instead of zero when positions are on the receiving side of HL rates
  • HL card: renamed "Volume" to "Total position value" (consistent with Gains card)
  • Gains card: added "(vault)" label to Borrowing fees to clarify what it is
  • Cross-sim: funding line now shows green "received" when the wallet would receive funding on HL, previously showed nothing

Why

The boss flagged two issues: (1) HL card missing funding cost, (2) "Volume" label vs "Total position value" on Gains. The old Math.max(0, cost) in computeHlFunding silently dropped the funding impact when the user was on the receiving side, making HL look more expensive than it actually is.

Test plan

  • Gains→HL comparison: if positions are long and HL rates were negative during the period, cross-sim should now show a green "received" funding line reducing HL projected cost
  • HL card shows "Total position value" label
  • Gains card shows "Borrowing fees (vault)"
  • TypeScript compiles clean (verified locally)

@Flotapponnier
Flotapponnier merged commit 12bcb86 into dev Aug 30, 2026
1 check failed
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