Skip to main content
OnchainDB is a decentralized database with built-in data monetization. It serves as both a shared data layer for modern applications and a payment infrastructure enabling pay-per-query access and automatic revenue sharing.

Data Layer

A single, queryable database where apps store, share, and join data across applications - enabling collaboration instead of data silos.

Payment Protocol

Native HTTP 402 (Payment Required) support with automatic revenue sharing, pay-per-query reads, and value-based pricing through PriceIndex.

Key Features

Verifiable Storage

All data cryptographically verified with full audit trails

Dual-Key Auth

App keys for writes, user keys for Auto-Pay reads

HTTP 402 Protocol

Pay-per-query monetization for read operations

Advanced Queries

Fluent query builder with complex logical operators

Blob Storage

Upload and retrieve binary files (images, videos, documents)

Multi-Language SDKs

TypeScript, Go, PHP, and Python SDKs available

Architecture

Data Flow

Core Components

  1. Multi-Language SDKs: TypeScript, Go, PHP, and Python with consistent APIs
  2. Dual-Key Auth: App key (X-App-Key) for writes, User key (X-User-Key) for Auto-Pay
  3. Prisma-Style CRUD: Familiar methods like createDocument, findUnique, updateDocument
  4. Query Builder with JOINs: Fluent API with joinOne/joinMany for relational queries
  5. Aggregations: Built-in count, sum, avg, min, max, distinctBy, and groupBy operations
  6. Materialized Views: Pre-computed views with JOINs and GROUP BY aggregations
  7. PriceIndex: Value-based payment model with automatic revenue splitting
  8. x402 Payment Callbacks: Automatic payment flow for store operations
  9. Blob Storage: Upload/retrieve binary files with metadata queries

Use Cases

OnchainDB enables you to build:
  • E-commerce platforms with built-in revenue sharing
  • Ticketing and booking systems
  • Marketplace applications with automatic commission splits
  • Subscription services with verifiable payments
  • Decentralized applications (dApps) requiring transparent data storage
  • Systems needing cryptographic proof of data integrity
  • Applications requiring immutable audit trails

Get Started