Skip to content

Architecture

FlowCash runs in the browser today, with an optional desktop app to come. A browser can read and control some things (idle time, power, CPU use through workers) but not others (GPU, storage, bandwidth), so the work is split between the website, an optional desktop app, a service and the user's own wallet.

 Your computer                      FlowCash service               Supported workloads
┌──────────────────────┐  status   ┌──────────────────────┐ jobs  ┌─────────────────────┐
│ FlowCash desktop app │ ────────► │ matching, metering,  │ ◄───► │ networks that pay   │
│ measures, enforces   │           │ revenue attribution  │       │ for capacity        │
└─────────┬────────────┘           └──────────┬───────────┘       └─────────────────────┘
          │ local bridge                      │ USDG payouts
          ▼ (127.0.0.1)                       ▼
┌──────────────────────┐  connect  ┌──────────────────────┐ sign  ┌─────────────────────┐
│ FlowCash website     │ ────────► │ Your wallet          │ ────► │ Robinhood Chain     │
│ dashboard, split     │           │ self-custody         │       │ USDG, Stock Tokens, │
└──────────────────────┘           └──────────────────────┘       │ ETH                 │
                                                                  └─────────────────────┘

Responsibilities

Website — Earn Mode in the browser (live)

  • Reads idle time, power, battery and system load through standard browser APIs.
  • Evaluates Earn Mode with the shared evaluateEarnMode.
  • Enforces a CPU limit with Web Worker threads and measures real compute capacity.
  • See Earn Mode in the browser.

Desktop app (later, optional)

  • Detects available resources and measures how much of each the owner isn't using.
  • Monitors device state: idle time, power source, battery level, GPU usage.
  • Evaluates Earn Mode and applies resource limits.
  • Starts and stops workloads.
  • Reports status and earnings, and links the device to the owner's wallet.
  • Serves the local bridge the website uses to show device status.

FlowCash service (in development)

  • Authenticates devices and matches available capacity with supported workloads.
  • Meters contribution and attributes revenue to the wallet that owns the device.
  • Settles payouts in USDG on Robinhood Chain.
  • Implements FlowCashAccountApi in shared/src/api.ts.

Website (live)

  • Explains the product; shows the dashboard.
  • Reads device status only through the local bridge, after the person pairs the browser.
  • Stores the person's allocation; reads balances from Robinhood Chain.
  • Builds conversion transactions from live routes. The person signs every one.

Wallet — the person's own self-custody wallet. FlowCash never holds keys.

Robinhood Chain

Every onchain interaction uses Robinhood Chain (chain ID 4663), an Arbitrum Orbit layer 2 that settles to Ethereum and uses ETH for gas. It's where Stock Tokens are issued, which is why FlowCash uses it and nothing else. Network details are in shared/src/chain.ts.

Repository layout

/flowcash
  /website     Next.js app: marketing pages, dashboard, API routes for market data and routing
  /desktop     Desktop app (to be built). README describes its scope and the protocol it must implement
  /shared      Types, protocol schemas, configuration and pure logic used by website and desktop
  /contracts   Solidity: AllocationRegistry (optional onchain copy of a person's split)
  /docs        These documents. The website renders them at /docs

What lives in shared

Module Contents
chain.ts Robinhood Chain definition, explorer links
tokens.ts, assets.ts USDG, ETH, asset definitions, TradingView symbol map
market.ts Schemas for Robinhood's Stock Token API and quote mapping
device.ts Device snapshot model
earn-mode.ts Earn Mode policy, ranges, capabilities, evaluation
earnings.ts Earnings and payout structures
allocation.ts Allocation model, validation, exact splitting
bridge.ts Local bridge protocol: routes and validated schemas
api.ts Account service interface
transactions.ts Transaction phases and error classification

The desktop app should import these rather than re-declare them, so both sides agree on shapes and rules — for example, evaluateEarnMode is the single implementation of Earn Mode's decision.

Data sources

Data Source Where it's fetched
Stock Token list, addresses, multipliers Robinhood Stock Token API /rhj/assets Server (no CORS)
Stock Token quotes Robinhood Stock Token API /rhj/prices Server, cached 15 s
ETH price and 24 h change Coinbase Exchange public stats Server, cached 15 s
Charts TradingView widgets Browser
Balances Robinhood Chain RPC (multicall) Browser
Conversion routes LI.FI API Server proxy with validation
Device status, earnings Desktop app over the local bridge Browser, after pairing