Blockchain & on-chain analytics
Decode raw blocks into typed, queryable relations and keep counts that are exact — never approximate, never wrong.
The problem
Why this is hard today
On-chain pipelines start with the messiest input in the industry: raw, RLP-encoded blocks and logs that mean nothing until they are decoded against ABIs, reorged when the chain reorganizes, and reconstructed into the entity state a product actually queries.
Teams bolt this together from an indexer, a queue, a transform layer, and a warehouse — and then discover that "how many holders does this token have" returns a different number depending on which copy answered, because approximate counts crept onto the critical path.
For financial-grade on-chain data, the reconstruction has to be temporal (state as of any block), the counts have to be exact, and the decode pipeline has to run inside the database rather than beside it.
Architecture
How NYXDB does it
Raw events append; continuous transforms decode them into typed state tables; attribute tables reconstruct per-entity state as of any block. This is the chainflow shape — decode-to-state pipelines that live in the engine.
- 01
Ingest raw
Blocks and logs append to a source table, durably journaled.
- 02
Decode (transform)
CREATE TRANSFORM … INTO a typed state table decodes and normalizes as events arrive.
- 03
Reconstruct
Attribute tables hold per-entity attributes; FOR SYSTEM_TIME AS OF reconstructs state as of a block.
- 04
Query exactly
Keyed collapse gives exact holder counts and balances; temporal reads answer point-in-time questions.
Real SQL
In practice
CREATE TABLE token_state ( chain_id UInt64, address Bytes, name String, holders UInt64);CREATE TRANSFORM curve_progress INTO bonding_curve_progress ASSELECT chain_id, address, holdersFROM token_state;SELECT chain_id, name, holdersFROM token_stateFOR SYSTEM_TIME AS OF 42;Every statement follows the engine’s own test SQL shapes. See the SQL reference for full syntax.
Capabilities
What you get
High-throughput ingest
Sized for full-chain and multi-chain decode volumes.
In-database decode
CREATE TRANSFORM runs decode pipelines inside the engine — no external indexer.
Temporal reconstruction
Attribute tables + AS OF reconstruct wallet/contract state as of any block.
Exact holder counts
Keyed latest-per-key collapse — counts that are never wrong.
Reorg-friendly
Sequence-numbered ordering underpins deterministic replay.
Deploy anywhere
One 154MB image from a laptop to production.
Proof
Measured where it counts
holder counts, recomputed not sampled
keyed collapse (ADR-078)
point-in-time state per block
attribute tables (ADR-071)
decode throughput class
placeholder — not yet substantiated
▲Figures marked TODO-verify are placeholders pending a published, reproducible benchmark; substantiated numbers cite their source.
From raw blocks to exact answers
Stand up a decode pipeline and query state as of any block.