OnchainDB: A Case Study in Celestia's "Everything Markets" Vision

OnchainDB: A Case Study in Celestia's "Everything Markets" Vision

Celestia’s Vision 2.0 outlined three bandwidth regimes in blockchain history. The first era at 10KB/s enabled AMMs. The second at 1-10MB/s made onchain orderbooks viable for crypto trading. But the third era, targeting 1 Tb/s with the Fibre upgrade, is designed to put every market onchain. Celestia has identified "onchain data markets" as one of these new categories: databases where you pay per query, monetised through every read and write operation.

When every API call is a transaction

Within the next decade, a majority of economic activity will be machine-to-machine, with AI agents trading with each other at API speed, making autonomous decisions about data access, compute, and services. These agents need HTTP-level latency and reliable micropayments for every interaction. The HTTP 402 protocol (and its successor x402) outline a possible standard for this, but would require blockchain infrastructure capable of handling millions of tiny transactions without congestion or prohibitive fees. Traditional blockchains are generally not designed to economically support a world where every API call triggers an onchain payment.

OnchainDB, an independent project building on Celestia, is one of the first designed for this future. It's a pay-per-query database that stores application data on Celestia's data availability layer, with native micropayment integration via x402. Developers can create collections, store records, and query data, all with application-defined revenue sharing (e.g., a 70/30 split between app and platform in the current design) on every read and write operation. Rather than paying monthly cloud bills, developers earn money when their data is accessed.

Data as a monetisable asset

OnchainDB serves any application that wants to monetise its data. A prediction market can charge for historical odds data. A social platform can let third parties pay to query its social graph. An analytics provider can sell access to aggregated metrics. Most importantly, OnchainDB acts as a discovery layer for AI agents, enabling them to find relevant datasets, pay per query, join information across multiple apps, automatic revenue-split, and use the results, all programmatically without human intervention. This creates a foundation for what OnchainDB calls a "Collective Intelligence Database" where siloed application data becomes a composable, monetisable resource that AI agents can tap into seamlessly.

OnchainDB also enables a composable data economy. An actor (human or AI agent) can query existing datasets, combine and process raw data into something more useful, and publish the refined output back to OnchainDB. The original data providers get paid for every read, and the curator who created the refined representation earns whenever someone queries their work. This creates a value chain where raw data providers, data refiners, and end consumers all participate, with revenue flowing automatically to everyone who contributed. 

Why OnchainDB uses Celestia

OnchainDB relies on Celestia for every write operation, posting the writer's data to Celestia whether it's a new entry or an update to existing records. Celestia's data availability guarantees make it possible to verify that the data stored in OnchainDB is exactly what the writer posted, ensuring data integrity without requiring readers to trust OnchainDB’s word for it.

OnchainDB reads hit materialised views that are kept in sync with that canonical onchain state. This gives applications blockchain guarantees (immutability, cryptographic verification, and decentralisation) while the indexing layer provides fast query performance. Celestia is the source of truth; the database is the interface.

Why this only works on Celestia

OnchainDB’s prospective high throughput requirement is non-negotiable. A database that charges per read and per write, serving potentially thousands of AI agents making queries every second, generates an enormous volume of transactions. At current Ethereum blob prices and capacity, this would be economically impossible. Blockspace must be cheap enough that micropayments for data access remain viable, and fast enough that queries feel instant.

This is precisely the gap Celestia Fibre addresses. At 1 Tb/s scale, a database like OnchainDB can write every transaction onchain without batching compromises or fee spikes during demand surges. The cost per byte is low enough that a fraction-of-a-cent payment for a database read still covers the onchain cost with margin left over. Celestia offers a combination of throughput, cost, and reliability that makes this class of application viable.

Infrastructure for the agentic economy

OnchainDB represents a new category of application that can only exist because Celestia Fibre-scale throughput enables it. It's not a DeFi protocol or an NFT marketplace. It's infrastructure for the agentic economy, where data itself becomes a first-class asset with permissionless access and programmatic monetisation. If our vision is correct and markets are what will consume the next generation of blockspace, then databases like OnchainDB are among the first concrete examples of what those markets look like.

Disclaimer

This post is for informational and discussion purposes only and does not constitute legal, financial, investment, or regulatory advice. The Celestia Foundation supports the development, furtherance and maintenance of decentralized software architectures and protocols or similar new open technology structures, in particular the Celestia network and protocol, and Celestia Labs provides blockchain infrastructure and software only and does not operate, sponsor, control, or intermediate any markets, trading venues, orderbooks, or financial products referenced herein. Any applications, markets, or protocols built using Celestia Labs’ technology are developed and operated by independent third parties, who are solely responsible for compliance with applicable laws and regulations.

Nothing herein constitutes an offer or solicitation to buy or sell any asset or to participate in any market. References to potential use cases involving financial instruments, real-world assets, derivatives, or other regulated activities are illustrative and aspirational only and do not imply regulatory approval or permissibility in any jurisdiction.

Statements regarding performance characteristics, scalability, throughput, latency, benchmarking results, or future capabilities reflect testing environments, design goals, and forward-looking expectations, not guarantees. Actual performance may vary materially depending on network conditions, configuration, and deployment context.

Forward-looking statements involve known and unknown risks, uncertainties, and assumptions, and actual results may differ materially. Readers should conduct their own independent evaluation and seek professional advice as appropriate.