Skip to content

Add USD price tracking for PLOT token with storyline token value calculation #517

@realproject7

Description

@realproject7

Summary

Add USD price display for mainnet PLOT and storyline tokens. Reference Dropcast's lib/usd-price.ts for the price fetching pattern.

Architecture

  • Only need to track USD price for the mainnet PLOT token on Base mainnet
  • Testnet / PL_TEST USD pricing is out of scope for this issue
  • All storyline token values derive from PLOT price (storyline tokens are priced in PLOT via MCV2 bonding curve)
  • USD value = storyline token price in PLOT × PLOT USD price

Implementation — reference ~/Projects/dropcast/lib/usd-price.ts

  • Create lib/usd-price.ts with fallback chain:
    1. Mint Club SDKmintclub.network('base').token().getUsdRate()
    2. GeckoTerminal API — free, covers DEX-traded tokens
    3. CoinGecko API — optional fallback (controlled by env flag)
    4. DB cache fallback — return last known price if all APIs fail
  • Price cache TTL: ~2 minutes
  • Display USD values on: story cards, story page, profile portfolio, token page

Acceptance Criteria

  • Mainnet PLOT USD price fetched with multi-source fallback
  • Storyline token USD values calculated from mainnet PLOT price
  • USD values displayed alongside PLOT prices across the app where mainnet price data is available
  • Price caching to avoid excessive API calls

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