Indexed OptimismBlockchain Data
Optimism, branded OP Mainnet, is the reference optimistic rollup on Ethereum and the origin of the OP Stack, the codebase Base, Mode, Zora, Ink and Unichain all run.
How to query Optimism data with SonarX
Instant Data Share
Available todaySnowflake, and file dumps to your object storage
Query Optimism blockchain data with plain SQL from a live database inside your own Snowflake account, populated with the indexed chain dataset. There is no pipeline to build and no second copy to store. The same dataset ships as file dumps to your own object storage for lakes and warehouses that are not Snowflake.
- Full history as a Snowflake data-share
- File dumps to S3 or your own object storage
- Real-time delivery, current to chain tip — on request
Used for:
- Analytics teams already on Snowflake that want Optimism data beside their existing tables
- Fund accounting and treasury reporting that reconciles against a fixed history
- Cross-chain questions answered in one SQL statement instead of one query per chain
- Loading Optimism history into BigQuery, Databricks, Redshift or a Spark lake
- Replacing a self-hosted indexer and the engineering time that keeps it running
- Serving one governed dataset to several desks without copying it per team
Kafka Streaming
Enabled on requestEvent stream
Consume Optimism activity as a continuous stream of normalized records, produced as the chain is indexed instead of polled for.
Used for:
- Trading and execution systems that act on Optimism activity within seconds
- Fraud and anomaly detection that has to fire before settlement
- Live dashboards and alerting on Optimism wallet or protocol activity
- Feeding a stream processor that already reads from Kafka
- Keeping an internal store hot without waiting for a batch window
- Event-driven services that would otherwise poll on a timer
Curated Datasets
Available todayPurpose-built tables
Protocol-level Optimism datasets modelled for one job, so the decoding and the joins are done before the data reaches you.
- DeFi
- Tokens and payments
Used for:
- Position-level Optimism lending, swap and liquidity analysis
- Reward, delegation and validator reporting without rebuilding the model
- Token distribution, holder and payment-flow reporting
- Risk and exposure work that needs protocol state, not raw logs
- Skipping the decoding layer an in-house team would have to maintain
- Extending an existing Optimism share with a modelled slice
Balances
Available todayTables and REST
Read what a Optimism address held, either as it stands now or exactly as it stood at a past block or timestamp.
- Point-in-time balance tables, as at any block or timestamp
- Real-time balances API for latest and historical balances
- Batch API for wallets, tokens and balances in bulk
Used for:
- Reconstructing Optimism portfolios and NAV as at a reporting date
- Audit and reconciliation work that has to be repeatable months later
- Wallet and portfolio products that render Optimism balances on page load
- Compliance checks that read one Optimism address at one block height
- Refreshing holdings for a whole book of accounts on a schedule
- Tax and cost-basis workflows that need holdings at each event
Realtime API
Available todayREST over the indexed dataset
Query indexed Optimism records over REST, reading the same dataset the share reads, with no warehouse in the path.
Used for:
- Applications that need one answer rather than a table scan
- Customer-facing screens where query latency is visible to a user
- Services that have no data warehouse and do not want to run one
- Prototyping against production data before committing to a share
- Backend checks that run per request instead of per batch
- Teams that want indexed Optimism data behind their own API layer
Optimism data: frequently asked questions
What is Optimism?
Optimism, branded OP Mainnet, is an optimistic rollup that has been producing blocks on top of Ethereum since 2021. It runs no consensus of its own. A sequencer orders transactions and posts them to Ethereum in batches, Ethereum holds the canonical record, and fault proofs with a challenge window stand behind withdrawals. Execution is EVM-equivalent, so the same twenty-byte accounts, the same opcodes and the same contract bytecode work unchanged. Gas is paid in ETH; OP is a separate governance token, distributed from 2022 and used to vote in the Optimism Collective rather than to pay fees. The Bedrock upgrade of June 2023 replaced the chain’s client software, fixed block time at two seconds and turned deposits from Ethereum into a typed transaction that appears inside L2 blocks. Bedrock’s other legacy is the OP Stack, the codebase Base, Mode, Zora, Ink and Unichain all run.
Optimism data on SonarX
SonarX indexes Optimism as the EVM chain it is: blocks and headers, transactions and receipts, event logs decoded against contract ABIs, execution traces including internal value transfers, and token transfers and balances. The same normalized model is used on every chain SonarX covers, so an Optimism query and an Ethereum query take the same shape and join without a translation layer.
Full historical coverage is available today as a data-share or a file delivery. Real-time delivery is enabled on request. Point-in-time balance tables, the real-time balances API and the batch wallets, tokens and balances API are all available for Optimism. Kafka streaming can be enabled for Optimism on request.
How SonarX indexes Optimism
Two properties separate a rollup from the L1 it settles to. Cost is not gas used multiplied by gas price: each transaction also pays a share of what the sequencer spends posting its batch, so analysis that reads only the L2 side understates what an application spent. And the chain has two heads. Blocks the sequencer publishes are provisional until the batch containing them is derived from Ethereum, so an indexer has to be able to withdraw an unsafe block. Bedrock divides the history as well: before it, every block held exactly one transaction and consecutive blocks could carry the same timestamp, so elapsed time cannot be read from early block numbers.
What teams build with Optimism data
Optimism requests split between funds and the protocol teams building on it. Position-level DeFi analytics is the largest share, because a lending or perpetuals position here is a sequence of decoded events and the true cost of a swap only appears once internal transfers are attached to it. Cost attribution is the one specific to this chain: a team paying to operate an application has to separate L2 execution cost from the L1 data cost of the batch its transactions rode in, and the same question comes up again on Base. Grant and governance accounting is the third, following OP distributed through Collective programs and what recipients did with it afterwards. Treasury reporting and transaction monitoring run on the same indexed tables.
Getting Optimism data from SonarX
Tell us the delivery target, how far back you need and how fresh it has to be, and the share is scoped against that. Optimism history and the balance APIs are available now, and the pre-Bedrock and post-Bedrock eras arrive as one dataset rather than two. The published coverage matrix for every network SonarX indexes lives in the data documentation, and the rest of the catalogue is at all indexed chains.
Is there an Optimism data API?
Yes. Real-time and batch APIs over indexed Optimism data are available today, covering historical and latest balances and wallet, token and balance lookups in bulk. They read from the same indexed dataset as the Snowflake share and the file delivery, so an API answer and a warehouse query agree.
How do I get Optimism data into Snowflake?
SonarX provisions a data-share into your own Snowflake account. The share appears as a database you query with SQL, so there is no pipeline to build and no second copy to store, and it stays current as SonarX advances the indexing pipeline.
How far back does Optimism coverage go?
The historical data-share and file delivery cover Optimism's recorded history, across the Bedrock migration of June 2023 and forward, and are available today. Real-time delivery keeps the same dataset current to chain tip and is enabled on request.
Why does an Optimism transaction have two fee components?
Because the chain pays Ethereum to store its data. A transaction is charged L2 execution gas, and separately a share of what the sequencer spends posting the batch containing it to Ethereum. Gas used multiplied by gas price therefore understates the real cost, and the rule for calculating that second component has itself changed at successive upgrades, so historical cost has to be computed with the rule in force at the time.
Does Optimism data include blocks from before the Bedrock upgrade?
Yes, and the difference is worth knowing about. Before Bedrock in June 2023 the chain ran different client software, put exactly one transaction in each block, and could give consecutive blocks the same timestamp, so time cannot be inferred from early block numbers. SonarX indexes both eras into one continuous history, so a query that spans June 2023 is not split across two sources.
Is Optimism the same thing as the OP Stack or the Superchain?
No. Optimism, branded OP Mainnet, is one chain. The OP Stack is the codebase it runs, which Base, Mode, Zora, Ink and Unichain also run, and the Superchain is the name for that set of chains together. Each is a separate network with its own history, so SonarX indexes and delivers each as its own dataset.