In-database folds
Transformations replace the external indexer’s state layer.
Go from decoded chain events to production dashboards without stitching together a queue, a cache and three databases.
The problem
Web3 data teams inherit the hardest ingestion problem and a strict correctness bar at once: events arrive out of order and get re-delivered, entity state has to be reconstructed from them, and prices have to be derived from many markets.
The usual answer, an indexer plus a warehouse plus a cache, drifts out of sync and answers the same question two ways.
A single engine that folds events into entity state, orders writes by declared coordinates rather than arrival, and derives prices continuously turns the pipeline into a schema.
Where NYXDB fits
Architecture
Decoded events land in one table; transformations fold them into slices of versioned entity tables; a weighted fold derives each token’s price from its markets; AS OF COMMIT rereads any past snapshot.
Decoded events arrive through SQL, write batches or native bulk frames.
Entity state stays current on its own, with CREATE TRANSFORMATION … INTO … ATTRIBUTE GROUP.
A token’s price is one fold output: SUM(price * liquidity) / SUM(liquidity) per token.
Dashboards read keyed state; STREAM SELECT follows it live.
In practice
The examples use the same two tables on every page. See the SQL reference for full syntax.
CREATE TRANSFORMATION balance_activity INTO balances ATTRIBUTE GROUP activity ASSELECT chain_id, recipient AS address, token, COUNT(*) AS transfer_count, MAX(transferred_at) AS last_transfer_at, MAX(_index) AS activity_indexFROM transfersGROUP BY chain_id, recipient, token;Capabilities
Transformations replace the external indexer’s state layer.
Every accepted version is kept, and readable at any commit with AS OF COMMIT.
Weighted prices as one fold output.
Composite primary keys such as (chain_id, address).
Learn more
Explore on-chain analytics or run a node.