Skip to content

fix/web: read an LP position's money in USD, not quote units labelled as dollars - #264

Open
lgrawet wants to merge 3 commits into
hummingbot:mainfrom
lgrawet:fix/lp-money-units-usd
Open

lgrawet wants to merge 3 commits into
hummingbot:mainfrom
lgrawet:fix/lp-money-units-usd

Conversation

@lgrawet

@lgrawet lgrawet commented Oct 2, 2026

Copy link
Copy Markdown

Read an LP position's money in USD, not quote units labelled as dollars

The /dex position strip and the portfolio's liquidity rows prefixed every LP money figure with "$", but total_value_quote, fees_earned_quote and net_pnl_quote are denominated in the pair's quote — SOL on an X-SOL range. That mislabelled rather than merely rounded the figure: a 0.163 SOL range worth about $20 read as "$0.16".

Both /dex surfaces already fetch the pool row, so they hold the quote token's USD price (quote_token_price_usd). When it is known the figure is converted and shown in USD; when it is not, the number is left in quote units under the quote's own symbol rather than a dollar it is not. The portfolio table goes through the page's existing display-currency seam (formatValue / formatPnlValue) so it follows the same rule as every other money cell there.

…d as dollars

The /dex position strip and the portfolio's liquidity rows prefixed every
LP money figure with "$", but total_value_quote, fees_earned_quote and
net_pnl_quote are denominated in the pair's *quote* — SOL on an X-SOL
range. That mislabelled rather than merely rounded the figure: a 0.163 SOL
range worth about $20 read as "$0.16".

Both /dex surfaces already fetch the pool row, so they hold the quote
token's USD price (quote_token_price_usd). When it is known the figure is
converted and shown in USD; when it is not, the number is left in quote
units under the quote's own symbol rather than a dollar it is not. The
portfolio table goes through the page's existing display-currency seam
(formatValue / formatPnlValue) so it follows the same rule as every other
money cell there.
@greptile-apps

greptile-apps Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Fixes how LP position money displays in the UI.

The PR appears safe to merge; no outstanding finding or actionable new issue was established.

Summary

The PR converts quote-denominated LP values, fees, and PnL to USD where a pool price is available, labels unconverted amounts in their quote units, and fetches pool prices beyond the former 30-position limit.

  • The portfolio liquidity rows now use the page’s display-currency formatting.
  • The two previous findings are no longer outstanding: the SOL fallback has an explicit quote label, and pool addresses beyond the first 30 are requested in batches.

Reviews (3) · Last reviewed commit: "fix(web): read an LP portfolio past 30 r..."

Comment thread frontend/src/components/portfolio/PositionsTab.tsx
Comment thread frontend/src/hooks/useLpPositions.ts
For a quote with no rate path (SOL, ETH, …) the fallback labelled the
still-quote-denominated figure `$`, so a 0.163 SOL range read `$0.16` — a
dollar it is not. The fallback now keeps the quote's own ticker, suffixed
where the /dex surfaces already put it, while a quote the dashboard has a
symbol for (or a USD-pegged stablecoin) keeps its prefix.
The pool query sliced to the first 30 addresses on GeckoTerminal's request
cap, so a portfolio of more than 30 ranges left the rest without a pool row
— and, now that the /dex cards and the portfolio price in USD, in quote
units. The cap is per request, not per portfolio: the backend already splits
on the same bound, so the hook chunks each network's addresses into
30-address requests instead of truncating.
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