Skip to content

[Enhancement] Reader tab: simplify holdings + portfolio boxes, add trade history #772

@realproject7

Description

@realproject7

Changes Required

1. Holdings card: 2 boxes instead of 4

Replace the current 4-box grid (Value, Balance, PnL, First Traded) with 2 boxes:

  1. Value — Current value in USD with % change from cost basis (not 24h change)
    • Value: currentPrice * balanceNum * plotUsd
    • Cost: entryPrice * balanceNum * plotUsd
    • Percent: ((currentValue - cost) / cost) * 100
    • Example: if cost was $1 and current value is $1.30, show "$1.30 +30%"
  2. Balance — Keep as-is (token balance formatted as compact number)

Remove PnL and First Traded boxes entirely.

2. Holdings card: add recent 5 transactions list

Below the 2 boxes, add a simple list view showing the most recent 5 transactions for this story token (buys & sells).

  • Query trade_history for this token address + user address, ordered by block_timestamp desc, limit 5
  • Simple list items (no outlined box), similar to activity items
  • Show: buy/sell indicator, amount, date

3. Portfolio dashboard: 2 boxes instead of 4

Replace the current 4-box grid (PLOT, USD, Holdings, Best 24h) with 2 boxes:

  1. Value — Total portfolio value in USD with % change from total cost basis
    • Sum of all holdings' current values vs sum of all holdings' cost bases
    • Percent: ((totalCurrentValue - totalCost) / totalCost) * 100
  2. Holdings — Keep as-is (count of holdings)

Remove PLOT and Best 24h boxes entirely.

File

src/app/profile/[address]/page.tsx — Portfolio section (~line 1456) and holdings cards (~line 1525)

Branch

task/772-reader-cost-pnl

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/T3Assigned to T3 builder agentbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions