RPC and indexed data for a payments blockchain
What is RPC and indexed data for a payments blockchain?
RPC and indexed data for a payments blockchain is the data access a payments company arranges for a chain it runs, also called a stablecoin chain.
The operator needs it twice over: partners and app builders need RPC and queryable data to build on the chain, and the operator’s own finance and operations teams need every payment in the systems that book it.
Goldsky serves RPC through Edge RPC, decodes events into the operator’s database with Turbo Pipelines and hosts subgraphs for partners, while the operator runs the chain, its ledger and its partner program.
You can provide RPC and indexed data for a fintech chain two ways: serve RPC, stream payments to your back office and host subgraphs for partners, or serve RPC and stream everything into your own database behind your own partner API.
Who uses RPC and indexed data for a payments blockchain?
Payments companies, stablecoin issuers and brokerages that run their own chain for settlement and want partners building on it.
How a fintech chain serves its partners and its back office
The diagram follows payments from settling on the fintech’s chain to the operator’s back office booking them and partners building apps on the same data. Your setup may differ.
Ways to provide RPC and indexed data for a fintech chain
Partners index their own contracts in hosted subgraphs one way; the other way, they call an API your team runs on its own copy of the chain.
- Best for
- An operator that wants partners to index their own contracts
- What you run
- Your own client code
- What you write
- JSON-RPC calls, and the decoding of what comes back
- Where your data lives
- Read from the chain
- How results reach you
- Returned when you call
- Best for
- An operator that owns all indexed data and its partner API
- What you run
- The destination: your database, queue or bucket, or a Postgres database Goldsky hosts
- What you write
- Pipeline YAML and SQL; TypeScript transforms when needed
- Where your data lives
- In your own database or systems
- How results reach you
- Pushed to you
| Usual setupOption 1: RPC and hosted subgraphs | Option 2: RPC and your own database | |
|---|---|---|
| Best for | An operator that wants partners to index their own contracts | An operator that owns all indexed data and its partner API |
| Products | EdgeTurboSubgraphs | EdgeTurbo |
| What you run | Your own client code | The destination: your database, queue or bucket, or a Postgres database Goldsky hosts |
| What you write | JSON-RPC calls, and the decoding of what comes back | Pipeline YAML and SQL; TypeScript transforms when needed |
| Where your data lives | Read from the chain | In your own database or systems |
| How results reach you | Returned when you call | Pushed to you |
Settle payments on your chain
The chain is where payments between your customers and partners become final, so it’s the source every other record follows.
Each payment is recorded in a block, and for a short time the newest blocks can still be replaced. Your back office and your partners both need to treat a payment as final only once your chain’s finality rule says so.
Serve RPC to your apps and partners
Handled by Goldsky EdgeWallets, partner apps and your own services read balances and send payments through RPC.
The endpoint has to serve current and historical blocks and stay up when a node fails. If it goes down, partners’ apps stop showing balances and their customers call your support line.
Edge RPC serves your chain with automatic failover across upstream nodes and cross-checks responses so stale or partial data doesn’t reach apps.
How Edge RPC handles failover (opens in a new tab)Decode payments into your database
Handled by Goldsky TurboYour finance and operations teams need each payment as a row with a sender, recipient, amount and reference, not as raw chain logs.
The payment contracts’ events have to be decoded with their ABI (the contract’s description of its events) and written to tables your back office reads. Whether you do this is your choice, and if you skip it, someone has to rebuild payments from raw logs before they can be booked.
With Goldsky, a Turbo Pipelines SQL transform can decode your contracts’ events from raw logs using their ABI and write each payment to your database, keyed on a
Decode contract events with an ABI (opens in a new tab)primary_keyso reorg corrections update the same rows.Host indexed APIs for partners
Handled by Goldsky SubgraphsPartners building on the chain need their own contracts’ data in a form their apps can query.
Each partner deploys a subgraph (a schema plus code that turns events into records) and gets a GraphQL endpoint for it. Without hosted indexing, every partner has to run a node and an indexer before they can launch.
Subgraphs supports custom EVM chains, so partners can deploy subgraphs to your chain and query them over GraphQL, with webhooks available for entity changes.
How Subgraphs index a chain (opens in a new tab)Book each payment in your back office
A payment on the chain is only done for your business once your ledger shows it against the right account.
Your systems match each decoded payment to a customer account and post it once. Matching is a join in your own database, and a payment booked before it’s final can need reversing.
Bring partners onto the chain
Partners decide whether to build partly on how fast they can read the chain.
Publish the RPC URL, chain ID and how to deploy a subgraph in your partner docs. Partners then launch apps that read from the same chain your back office books.
What to know about serving partners with hosted subgraphs
- Goldsky runs the RPC layer and hosts partners’ subgraphs; you run the chain, your database and your ledger.
- Partners write and deploy their own subgraphs, so their APIs match their contracts.
- Whether your back office takes a payment stream is your choice; the RPC and subgraphs work without it.
Settle payments on your chain
The chain is where payments become final, so every other record follows it.
Each payment is recorded in a block, and the newest blocks can still be replaced for a short time. Your systems treat a payment as final only once your chain’s finality rule says so.
Serve RPC to your apps and partners
Handled by Goldsky EdgeWallets, partner apps and your own services read balances and send payments through RPC.
The endpoint has to serve current and historical blocks and stay up when a node fails. If it goes down, partners’ apps stop showing balances.
Goldsky’s Edge RPC serves your chain with automatic failover across upstream nodes and routes historical requests to archive nodes.
What Edge RPC serves (opens in a new tab)Backfill the chain into your database
Handled by Goldsky TurboYour ledger and your partner API both need the chain’s history since launch, not only new payments.
The backfill starts at the first block and needs an archive node behind it. A gap shows up later as payments your ledger never saw.
A Turbo Pipelines job with an Edge EVM source can read your chain from
Backfill any EVM chain (opens in a new tab)start_at: earliestto a fixedend_atblock and write it to your database, then exit.Stream new payments as they settle
Handled by Goldsky TurboAfter the backfill, every new payment has to reach your tables while it’s still useful to the back office.
Events have to be decoded into payment rows and corrected when a reorg replaces a block. If corrections aren’t applied, the back office books payments that no longer exist.
Turbo Pipelines can keep a pipeline streaming decoded events into the same tables, and passes reorg corrections through as updates and deletes to sinks with a
How reorgs reach your tables (opens in a new tab)primary_key.Book each payment in your back office
A payment on the chain is only done for your business once your ledger shows it against the right account.
Your systems match each payment row to a customer account and post it once. Matching is a join in your database, and a payment booked before it’s final can need reversing.
Serve partners from your own API
Partners need indexed data for their apps, and in this setup it comes from the tables you already hold.
Your team builds the API, decides what partners can query and keeps it running under their traffic. Partners then launch apps that read from the same data your back office books.
What to know about streaming a fintech chain into your database
- You own the tables and the partner API, and your team runs that API.
- One copy of the data feeds both the back office and partners, so both see the same payments.
- Tables with a primary key take reorg corrections as updates and deletes; a queue or webhook consumer has to apply correction records itself.
What you control
- Your team
- Book each payment in your back office
- Bring partners onto the chain
Security and deployment
- SOC 2 Type IIIndependently audited security controls.
- Dedicated infrastructureSingle-tenant options for production workloads.
- Data residencyCloud, on-premises or co-located.
More use cases that access chains reliably
- Archive node RPCRead any past state through archive RPC.
- Archive RPC and indexing for a new chainGive a new chain archive RPC and indexing from mainnet day one.
- Improve RPC uptime and reliability with failoverRun a second data provider behind the incumbent and fail over when it drops data.
- Optimize your RPC endpoints and cut RPC costsAutomatically optimize your RPC endpoints and lower billable calls while keeping your current provider.
- Improve blockchain data API reliability and coverageKeep wallet balances, transfers and token prices arriving when a third-party blockchain data API has an outage, rate limits you, lacks a chain or returns wrong balances.
- Improve subgraph uptime and reliability with failoverKeep app screens up when a hosted subgraph lags, stops syncing or goes down, with a backup to fail queries over to.
- Improve blockchain webhook reliabilityKeep onchain event notifications arriving at your backend, with retries, reorg corrections and a backup feed.
Use cases built the same way
- DeFi data for apps and dashboards: positions, TVL and yieldsShow users their positions, the protocol’s TVL and yields, pool and market data and activity history in a DeFi app’s front end and dashboards.
- Blockchain indexing for app backendsKeep an app’s database in sync with the chain.
- Speed up subgraph indexing and queriesCut the time a subgraph takes to sync, reindex and answer queries.
Provide RPC and indexed data for a fintech chain with Goldsky
We’ll map it to your systems and show you what Goldsky runs, so your team builds the product, not the pipelines underneath it.