Traceeverynumber.
BlockJuice loads balances, transfers, trades and prices for the wallets and tokens you list into your own Postgres. You can trace any number it gives you back to raw rows, and rebuild it.
For analysts who advise funds, treasuries and protocol teams.
The demo needs only uv and Docker. No keys, no Claude.
LatestHow RN1's Bot Works, Read From 911,860 FillsRead →Own the query.
If you advise funds, treasuries or protocol teams, you know where on-chain work gets awkward. Explorers are fine for a quick look. Shared analytics platforms work until you need to own the query, the join or how long the data is kept.
- 01
You keep the data
Raw rows, marts, run logs and answers live in a warehouse and repo you run. When an auditor or a client asks how a number was built, you can show them the model and the run that produced it.
- 02
You can ask in plain language
The repo’s Claude Code skill (/bj <question>) maps the question onto marts, the finished tables you query, and builds any that are missing. It runs the analysis through bj, the BlockJuice command line, and writes answers/<slug>/ with the value, the checks and the method. From there it can make a PDF, a spreadsheet or a Google Doc.
- 03
Adding coverage doesn’t mean building a platform
To follow another wallet list, EVM chain or protocol, copy a source with bj new-source, add it to dbt and turn on a schedule. The shared library resumes where each run stopped and keeps failed calls to retry, so you spend your time on the question.
- 04
When something breaks, you can see it
bj doctor checks your settings and services before you debug. Grafana shows loading and dbt runs side by side. Failed calls are kept and retried, not dropped.
Back to the rows.
How many Uniswap v3 swaps traded UNI on Ethereum on 2026-10-15, and what was their volume in UNI?
- UNI
- The Uniswap token on Ethereum, 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984.
- swap
- One Swap event of a Uniswap v3 pool whose token0 or token1 is UNI, as a row of dex_trades with version v3.
- volume
- The sum of each swap’s absolute UNI amount, bought or sold, in UNI. Not USD.
A real answer this repo produced: answers/uni-v3-uni-swaps-2026-10-15/
- Answer3529 swaps · 812,886.52 UNI · 21 pools
- Martanalytics.dex_trades
- Sourceevm-uniswap-v3
- RowsEthereum blocks 26194189 to 26201364, the first and last blocks of 2026-10-15 UTC.
How RN1's Bot Works, Read From 911,860 Fills
RN1’s 911,860 fills, and samples of the orders it signed, rebuild the program behind them. Three decisions are measured on chain and fifteen are judged from the evidence; the signed orders for the full window would settle more of them than any other input still to be had.
12 modules. 22 tables.
Each module is a set of mart tables in the analytics schema, built by one pipeline. A source reads only the wallets, tokens, feeds and contracts you list in its addresses.json. Pick a module to see its columns.
Balances
Each wallet’s latest balance of each asset, in base units: wei, lamports, satoshis or token units.
- Tables
- analytics.latest_balances
- Sources
- evm-eth-balances
- evm-erc20-balances
- solana-sol-balances
- solana-spl-balances
- bitcoin-btc-balances
- Chains
- Ethereum, Solana, Bitcoin
- chain
- text
- ethereum, solana or bitcoin.
- wallet
- text
- The address whose balance was read.
- asset_type
- text
- native, erc20 or spl.
- asset
- text
- eth, sol or btc, or the token or mint address.
- block_number
- bigint
- The block, or Solana slot, the balance was read at.
- balance
- numeric
- The amount in the asset’s base units.
Transfers
One ERC-20 Transfer log of a token you list. classified_transfers adds what kind of address each side is, and a category: bridge, exchange, contract, p2p or unknown. A source follows the tokens or the wallets you list. Classification covers Arbitrum and Base, where labels exist. labelled_wallet_flows shows each movement that touches a wallet in seeds/wallet_labels, from the labelled entity’s side.
- Tables
- analytics.erc20_transfers
- analytics.classified_transfers
- analytics.labelled_wallet_flows
- Sources
- evm-erc20-transfers
- seeds/wallet_labels.csv
- Chains
- Ethereum, Arbitrum, Base
- chain
- text
- ethereum, arbitrum or base.
- id
- text
- The log’s place on its chain, <block>:<logIndex>.
- block_number
- bigint
- The block the transfer was in.
- block_timestamp
- timestamptz
- When that block was produced.
- tx_hash
- text
- The transaction the log was in.
- token
- text
- The token’s contract address, lowercased.
- from_address
- text
- The sender, lowercased.
- to_address
- text
- The receiver, lowercased.
- value
- numeric
- The amount in the token’s base units.
- category
- text
- bridge, exchange, contract, p2p or unknown (classified_transfers).
- direction
- text
- inflow, outflow or intra, for the labelled entity (labelled_wallet_flows).
DEX trades
One Uniswap swap: the token the swapper received and the token they paid. Uniswap v2, v3 and v4.
- Tables
- analytics.dex_trades
- Sources
- evm-uniswap-v2
- evm-uniswap-v3
- evm-uniswap-v4
- Chains
- Ethereum
- id
- text
- The Swap log’s place on its chain, <block>:<logIndex>.
- version
- text
- v2, v3 or v4.
- pool
- text
- The pool’s address, or its id in v4.
- block_timestamp
- timestamptz
- When that block was produced.
- tx_from
- text
- Who signed the transaction.
- token_bought
- text
- The token the swapper received.
- amount_bought
- numeric
- How much of it, in base units.
- token_sold
- text
- The token the swapper paid.
- amount_sold
- numeric
- How much of it, in base units.
Bridges
One token move between an L2 and Ethereum through the chain’s own bridge. bridge_pairs matches a withdrawal from one L2 with the deposit into another it could have paid for.
- Tables
- analytics.bridge_transfers
- analytics.bridge_pairs
- Sources
- arbitrum-token-bridge
- evm-op-standard-bridge
- Chains
- Arbitrum, Base
- chain
- text
- arbitrum or base, the L2 the move was read on.
- direction
- text
- to_ethereum for a withdrawal, from_ethereum for a deposit.
- l2_address
- text
- The address on the L2 side.
- ethereum_address
- text
- The address on the Ethereum side.
- ethereum_token
- text
- The token’s address on Ethereum.
- amount
- numeric
- The amount in the token’s base units.
- candidates
- bigint
- How many withdrawals could have paid for the deposit (bridge_pairs).
Labels
What kind of address each listed address is: exchange, contract or eoa.
- Tables
- analytics.address_labels
- Sources
- evm-address-code
- seeds/cex_addresses.csv
- Chains
- Arbitrum, Base
- chain
- text
- arbitrum or base.
- address
- text
- The address, lowercased.
- code_kind
- text
- contract, eip7702_delegation or none.
- exchange
- text
- The exchange that owns the address, from the seed.
- kind
- text
- exchange, contract or eoa.
Tokens
Each listed token’s latest name, symbol and decimals. Symbols repeat, so key on chain and token.
- Tables
- analytics.tokens
- Sources
- evm-erc20-metadata
- Chains
- Ethereum, Arbitrum, Base
- chain
- text
- ethereum, arbitrum or base.
- token
- text
- The token’s contract address, lowercased.
- name
- text
- What name() returned. Null when the call reverted.
- symbol
- text
- What symbol() returned.
- decimals
- integer
- What decimals() returned. Null when the contract has none.
Exchange prices
One candle of one token against one quote asset at one interval, from one exchange.
- Tables
- analytics.token_prices
- Sources
- binance-candles
- coinbase-candles
- Chains
- Binance, Coinbase
- exchange
- text
- binance or coinbase.
- token
- text
- The token’s ticker on the exchange, such as UNI.
- quote
- text
- The asset the prices are in, such as USDT or USD.
- interval
- text
- The candle’s length, such as 1h or 1d.
- open_time
- timestamptz
- When the candle opened.
- close
- numeric
- The last trade’s price.
- volume
- numeric
- How much of the token traded.
Oracle prices
One round of one Chainlink price feed, scaled into a price in quote units.
- Tables
- analytics.oracle_prices
- Sources
- evm-chainlink-price-feeds
- seeds/chainlink_feeds.csv
- Chains
- Ethereum, Arbitrum, Base
- feed
- text
- The feed’s name, such as ETH / USD.
- proxy
- text
- The address the feed is known by.
- round_id
- numeric
- The round’s id as the proxy reports it.
- price
- numeric
- The answer scaled by decimals, in quote units.
- updated_at
- timestamptz
- When the aggregator stored the round.
Polymarket
Polymarket’s prediction markets: markets, maker fills, every fill per wallet with its role, one-minute candles, and each wallet’s cash and PnL per market.
- Tables
- analytics.polymarket_markets
- analytics.polymarket_trades
- analytics.polymarket_wallet_fills
- analytics.polymarket_price_candles
- analytics.polymarket_market_participants
- Sources
- polymarket-markets
- polygon-polymarket-ctf
- polygon-polymarket-ctf-exchange-v2
- Chains
- Polygon
- condition_id
- text
- The market’s condition in ConditionalTokens.
- question
- text
- Gamma’s question.
- maker_side
- text
- buy or sell, for the maker (trades).
- price
- numeric
- usdc / shares, in pUSD per share (trades).
- role
- text
- maker or taker, for the wallet (wallet_fills).
- pnl_usdc
- numeric
- net_cash_usdc + position_value_usdc (participants).
Accounts
The wallets you follow: each top-level transaction sent from or to them, each ETH outflow and where it went, each address’s balance, nonce and code at the blocks read, and the addresses a public body ties to an incident.
- Tables
- analytics.wallet_transactions
- analytics.wallet_eth_outflows
- analytics.account_states
- analytics.address_attributions
- Sources
- evm-wallet-transactions
- evm-account-state
- seeds/attributed_addresses.csv
- Chains
- Ethereum
- chain
- text
- ethereum.
- tx_hash
- text
- The transaction.
- from_address
- text
- The sender.
- to_address
- text
- The receiver.
- value_wei
- numeric
- The ETH sent, in wei. It moved only when succeeded is true.
- succeeded
- boolean
- Whether the transaction succeeded.
- fee_wei
- numeric
- gas_used × effective_gas_price, paid by from_address either way.
- outflow_class
- text
- sold, sent_to_exchange or sent_out (wallet_eth_outflows).
- code_kind
- text
- none, eip7702_delegation or contract (account_states).
- attribution
- text
- The incident a public body ties the address to (address_attributions).
Deployments
One contract-deployment transaction: a successful transaction with at least one create or create2 that stood, and the EIP-8037 state gas its creates and new storage slots would cost, as a lower bound.
- Tables
- analytics.deployment_state_gas
- Sources
- evm-contract-deployments
- Chains
- Ethereum
- chain
- text
- ethereum.
- tx_hash
- text
- The deployment transaction.
- block_number
- bigint
- The block it was in.
- code_bytes
- bigint
- The bytes of code its creates left.
- new_slots
- bigint
- The new storage slots it wrote.
- state_gas
- bigint
- The EIP-8037 state gas, in gas, as a lower bound.
- rule_version
- text
- The rule state_gas follows.
CoW ETH Flow
One CoW Protocol ETH Flow order placed by a wallet you follow, with the settlement that filled it when one did. Amounts in token base units; the ETH sent is in wei.
- Tables
- analytics.cow_ethflow_orders
- Sources
- evm-cow-ethflow
- Chains
- Ethereum
- order_uid
- text
- The 56-byte GPv2 order UID.
- tx_hash
- text
- The transaction that placed the order.
- owner
- text
- The wallet that placed it.
- eth_value_wei
- numeric
- The ETH sent, in wei.
- buy_token
- text
- The token the order buys.
- settled
- boolean
- True when a later GPv2Settlement Trade carries its UID.
- received_amount
- numeric
- The buy token sent to the receiver, in base units. Null when not settled; 0 when nothing came or the receiver isn’t a wallet you follow.
What it reads.
Each table covers the wallets, tokens and contracts you list, not the whole chain. Polymarket covers every market by default. A lit glyph means the module covers that chain. Hover or tap a column.
- Ethereum13 tables
- Arbitrum08 tables
- Base08 tables
- Polygon05 tables
- Solana01 tables
- Bitcoin01 tables
- Binance, Coinbase01 tables
- Balances01 table
- Transfers03 tables
- DEX trades01 table
- Tokens01 table
- Oracle prices01 table
- Accounts04 tables
- Deployments01 table
- CoW ETH Flow01 table
- Transfers03 tables
- Bridges02 tables
- Labels01 table
- Tokens01 table
- Oracle prices01 table
- Transfers03 tables
- Bridges02 tables
- Labels01 table
- Tokens01 table
- Oracle prices01 table
- Polymarket05 tables
- Balances01 table
- Balances01 table
- Exchange prices01 table
Get started.
Try it first
Builds the real balance models from made-up rows in a throwaway Postgres, answers a saved question, checks the answer and writes an XLSX. Needs uv and Docker. No keys, no Node, no Claude.
git clone https://github.com/iankressin/block-juicecd block-juiceRun every command on this page from the block-juice folder.
uv run --project orchestration bj demoRun your own
Needs Node 24, pnpm 10.17 (mise install sets both), uv, and Docker with Compose. About 5 GB free: 1 GB for the checkout, 3.3 GB for the images. Start from the clone above.
Set up the checkout.
uv run --project orchestration bj installCopies each missing .env, installs the Node packages and runs dbt parse. Never overwrites an .env, starts nothing. No value in .env is required.
Start the stack and Dagster. Leave it running.
uv run --project orchestration bj devStarts the Docker stack, runs bj doctor, then Dagster at http://localhost:3000.
In a second terminal, load your first mart.
uv run --project orchestration bj run tokensLoads the names, symbols and decimals of the tokens the default lists name. Schedules start stopped, so nothing loads until you run a pipeline or turn its schedule on.
These ports must be free: 3000, 3001, 4000, 4001, 5432, 8082, 8545, 9090, 9091. To move one, set its *_PORT in .env. Dagster stays on 3000.
/bj needs Claude Code. Start it with claude in the repo, with the stack running. Google Doc reports also need Google credentials in .env.
Apache-2.0 · In active development · Questions and bugs: GitHub issues
See through it.
BlockJuice runs in your environment. It loads chain data into your Postgres, transforms it with dbt and schedules the work with Dagster. Balances, transfers, trades and labels sit next to the rest of your data, under keys and policies you set.
The result is a pipeline an analyst can read, change and hand to a client. Every step is in the repo for anyone to check.
raw.*
Read chains, APIs and SQD Portal; write raw JSON rows into raw.<chain>_<table>, such as raw.ethereum_uniswap_v3.
- evm-eth-balances
- evm-erc20-balances
- solana-sol-balances
- solana-spl-balances
- bitcoin-btc-balances
- evm-erc20-transfers
- evm-uniswap-v2
- evm-uniswap-v3
- evm-uniswap-v4
- arbitrum-token-bridge
- evm-op-standard-bridge
- evm-address-code
- evm-erc20-metadata
- binance-candles
- coinbase-candles
- evm-chainlink-price-feeds
- polymarket-markets
- polygon-polymarket-ctf
- polygon-polymarket-ctf-exchange-v2
- evm-wallet-transactions
- evm-account-state
- evm-contract-deployments
- evm-cow-ethflow
staging
Staging views, then mart tables in the analytics schema. Seeds: cex_addresses, chainlink_feeds, wallet_labels, attributed_addresses, stablecoins, arbitrum_token_gateways, polymarket_contracts.
- balances
- transfers
- dex
- bridges
- labels
- tokens
- prices
- polymarket
- accounts
- deployments
- cow
analytics.*
Your warehouse. Raw rows, marts and the ops.* run log. One job per pipeline. Turn on its schedule and it rebuilds each day at 06:00 UTC.
- analytics.latest_balances
- analytics.erc20_transfers
- analytics.classified_transfers
- analytics.labelled_wallet_flows
- analytics.dex_trades
- analytics.bridge_transfers
- analytics.bridge_pairs
- analytics.address_labels
- analytics.tokens
- analytics.token_prices
- analytics.oracle_prices
- analytics.polymarket_markets
- analytics.polymarket_trades
- analytics.polymarket_wallet_fills
- analytics.polymarket_price_candles
- analytics.polymarket_market_participants
- analytics.wallet_transactions
- analytics.wallet_eth_outflows
- analytics.account_states
- analytics.address_attributions
- analytics.deployment_state_gas
- analytics.cow_ethflow_orders
- 01 / 05Extract + loadTypeScript sourcesingestion/
Read chains, APIs and SQD Portal; write raw JSON rows into raw.<chain>_<table>, such as raw.ethereum_uniswap_v3.
- 02 / 05StorePostgresinfra/postgres/
Your warehouse. Raw rows, marts and the ops.* run log.
- 03 / 05Transformdbttransformation/
Staging views, then mart tables in the analytics schema.
- 04 / 05OrchestrateDagsterorchestration/
One job per pipeline. Turn on its schedule and it rebuilds each day at 06:00 UTC.
- 05 / 05WatchPrometheus + Grafanainfra/
Ingestion and dbt side by side.
Try the commands.
A scripted shell, built from the README and one real answer. Nothing runs here. Type a bj command, or tap one below.