Skip to content

[Feature] Add Market Cap sort option to story discovery #957

@realproject7

Description

@realproject7

Problem

Stories on the discover/home page can only be sorted by default order. Users who want to find trending or high-value stories have no way to sort by market cap.

Solution

Add a "Market Cap" option to the sort dropdown on the story discovery page. Stories are sorted by their token's market cap (total supply × price per token × PLOT USD price) in descending order.

Implementation

  • The trade_history table already has price_per_token and total_supply for each storyline token
  • PLOT USD price is available via getPlotUsdPrice()
  • MCap = total_supply × price_per_token × PLOT_USD
  • Add sort option to existing dropdown (alongside "Newest", "Most Plots", etc.)

Files

  • Discover/home page component — add sort option
  • API route for discovery — add sort=mcap query param support

Acceptance Criteria

  • "Market Cap" sort option in dropdown
  • Stories sorted by MCap descending
  • Works on both desktop and mobile

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/T3Assigned to T3 builder agentenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions