The three data services
Step 1: Maintain a live holder registry
The cap table is the foundation - every downstream service (dividends, reporting, compliance) reads from it. Stream transfers of the tokenized stock and keep a running balance per holder.holder-registry.yaml
id (-in/-out suffix) so the landing table never dedupes distinct transfers, and the zero address is excluded so mints and burns adjust only the real holder. Filter out balance = 0 rows when you read the holdings table to get the live holder set.
For ERC-3643 securities, decode the
raw_logs instead and also capture identity events (IdentityRegistered) so your registry links each holder to a verified identity, not just an address. A Subgraph is often the cleaner home for a registry you query by holder - it gives you a GraphQL API for statements and positions with no extra service. Confirm the dataset slug for your chain in the Datasource explorer.Step 2: Publish a 24/7 price feed
Tokenized equities trade around the clock, so the “closing price” is a live figure. Index trades from the venue (a DEX pool or the chain’s matching contract) and roll them into OHLC/VWAP. This is the DEX trades pattern applied to a stock token; write to ClickHouse for fast time-series queries, or maintain a live last-price with the PostgreSQL aggregate sink.Step 3: Distribute dividends and corporate actions
This is where the cap table pays off - literally. A Compose task reads the holder registry at a record-date block and pays each holder their pro-rata dividend in a standard ERC-20 stablecoin, recording the batch in your ledger for reconciliation.src/tasks/pay-dividend.ts
Step 4: Reconcile with your transfer agent
Because the registry lives in your database, reconciling the on-chain holder list against your books of record is a query, not a project - the same real-time reconciliation pattern, applied to positions instead of payments. Breaks (an address holding tokens with no matching book entry, or vice versa) surface immediately.Business outcomes
- A real-time cap table replaces end-of-day position files.
- A market that never closes gets a price feed that never closes.
- Automated, auditable corporate actions - dividends and splits execute as code, with a trace for every payment.
- Chain-agnostic - the same pattern covers Robinhood Chain, ERC-3643 securities on Ethereum/Polygon, and RWA chains like Plume and Mantra.