Introducing chainstar: on-chain data as a star schema, from one command
chainstar turns raw Ethereum, Base, Bitcoin and Solana data into clean fact and dimension tables in DuckDB or Postgres. It is open source, runs on your own…
Blockchain data is public, but it is not usable as it comes. Blocks arrive as nested JSON, token transfers are hidden inside event logs, amounts are 256-bit integers without their decimals, and every chain does all of this differently. Before you can ask a simple question ("how much USDC moved today?"), you have to build a pipeline.
chainstar is that pipeline, in one command.
uv tool install git+https://github.com/Bit-Primitive/chainstar
chainstar quickstart
It reads the latest blocks from a chain, decodes them, and builds a small, tested star schema in a DuckDB file on your machine. You can open the result in a spreadsheet or query it with SQL.
What you get
Six tables, the same on every chain:
- fct_transfers: every value movement. ERC-20 transfers on Ethereum and Base, transaction outputs on Bitcoin, and SPL, Token-2022 and native SOL transfers on Solana.
- fct_fees: what every transaction paid, in the chain's smallest unit and in its native coin.
- dim_wallets, dim_tokens, dim_contracts and dim_dates: the things those facts point at.
Every key starts with its chain, so Ethereum, Base, Bitcoin and Solana sit side by side in one warehouse. dbt tests check every key and join on every run. On Bitcoin, a test also checks each computed fee against the fee the node reports.
Honest by design
A few decisions matter more than they look:
- Amounts are never rounded away.
amount_rawkeeps the exact integer as text, because a 256-bit token amount fits no numeric type that DuckDB and Postgres share.amountis the decimals-adjusted number, for everyday use. - Nothing is guessed. A Bitcoin transaction funded by several addresses has no single sender, so
from_addressis empty andinput_address_countsays how many there were. Solana token names live in separate metadata programs that chainstar doesn't read yet, so they are empty rather than invented. - Symbols are not identities. Our sample data has several unrelated tokens calling themselves USDC. chainstar identifies tokens by contract address, and so should you.
- Your RPC stays yours. You can bring your own endpoint, or try chainstar on free public ones. Either way, chainstar redacts the URL in all output and sends no telemetry.
Try it without installing anything
The live demo loads real chainstar output from all four chains into DuckDB, running inside your browser. Pick a question or write your own SQL, and click a transfer to see the rows it joins to.
The data portal publishes the same kind of output as open datasets under CC BY 4.0: ERC-20 transfers on Ethereum and Base, Bitcoin outputs, Solana transfers, Ethereum fees and a token directory. Each one is documented, checksummed and previewable with SQL in the browser.
For anyone, not only engineers
chainstar quickstartasks two questions and does the rest.chainstar export transfers --output transfers.xlsxgives you a spreadsheet.chainstar wallet 0xYourAddress --chain base --recent 1000gives you one address's history.- A Docker image bundles everything, including cryo, so Windows and macOS need neither Rust nor Python.
The full documentation starts at Get started in 2 minutes.
What's next
Swaps (fct_swaps), more EVM chains, Solana token metadata, and BigQuery and Snowflake through dbt adapters. chainstar is Apache-2.0 and on GitHub; issues and ideas are welcome.