The Blockchain Data Model: How EVM, Solana and Sui Record Data
Vincent Charles
December 1, 2026 · 8 min read

A blockchain stores data as the raw objects each protocol records, not as a ready-made table of balances. On EVM chains those objects are blocks, transactions, receipts and logs, traces, and state. Solana records programs and accounts, and Sui records versioned objects, so anyone doing blockchain data engineering has to start from the model of the chain they are reading.
Most pipeline bugs start from a wrong picture of what the chain recorded. I am Vincent Charles, and this is a short adaptation of Chapter 2, the guide's official free sample.
TL;DR:
- A blockchain stores raw objects, not balances. EVM, Solana and Sui each record a different set of objects, so the same question needs a different pipeline.
- EVM chains produce five raw datasets. Blocks, transactions, receipts and logs, traces, and state.
- Logs do most of the analytics work. Traces fill gaps that logs leave, such as native ETH moved by a contract.
- Solana stores state in accounts. Token balance changes often matter more than program logs.
- Sui stores state as versioned objects. Transactions are grouped into checkpoints, and Move events feel closer to EVM logs.
This article is adapted from the Blockchain Data Engineering Guide. Get the guide. Practice onchain SQL in WizardCamp.
Also on the blog: the onchain pipeline tools and how to become a crypto data engineer.
How is data stored in blockchain?
Data on a blockchain is stored in the protocol's own records: headers, transactions, execution results, and the state those transactions leave behind. There is no single global table of "who owns what." A balance or a transfer is something you reconstruct from those records, and the records differ on EVM chains, Solana and Sui.
The five raw EVM datasets
An EVM chain produces five kinds of raw data. Almost every table you will ever query is derived from them.
| Dataset | What it contains | Typical source | Use it for |
|---|---|---|---|
| Blocks | Header fields: number, hash, parent hash, timestamp, base fee, gas used | eth_getBlockByNumber | Time joins, gas analytics, reorg detection |
| Transactions | Sender, recipient, value, calldata, type, gas settings | Block bodies | Who called what, fees, function calls |
| Receipts and logs | Success flag, gas used, and the events contracts emitted | eth_getBlockReceipts, eth_getLogs | Almost all protocol analytics: transfers, swaps, deposits |
| Traces | Every internal call, contract creation and internal value transfer | debug_traceBlock*, trace_block (archive or trace-enabled nodes) | Internal ETH transfers, contract creations, call graphs |
| State | Balances, storage slots and code at a block | eth_getBalance, eth_getStorageAt, eth_call, state diff traces | Point-in-time balances, protocol parameters |
Logs are the workhorse. A log has the emitting contract address, up to four 32-byte topics, and an unindexed data blob. For a normal (non-anonymous) event, topics[0] is the keccak-256 hash of the event signature, and indexed parameters go into the remaining topics. An anonymous event has no signature topic, so you cannot find it by signature. Indexed dynamic types (string, bytes, arrays, structs) are stored as a hash, so the original value cannot be decoded from the log. Everything that is not indexed is ABI-encoded in data.
Traces fill the gaps that logs leave. On Ethereum mainnet today, native ETH moved by a contract emits no log, and neither does a contract deployed by a factory unless the factory chooses to emit one. Traces are expensive to fetch and store, so many teams only pull them for transactions they already care about.
Solana's accounts, programs and instructions
Solana separates code from state. Programs are stateless code. Accounts hold data and lamports, and every account is owned by a program. A transaction is a list of instructions, each naming a program, the accounts it touches, and an opaque data payload.
What this means for data work:
- There are no events by default. Many analytics read instruction data and balance changes, rather than program logs or Anchor events.
- Inner instructions matter. Ignore the inner calls (cross-program invocations) on an aggregator swap and you miss most of DeFi.
- Token balance deltas are often the fastest path. Subtract
preTokenBalancesfrompostTokenBalancesper token account, then sum per owner and mint. That gives net changes, not which program moved the tokens or the gross volume. - Time is measured in slots. Slot numbers can have gaps. Slot time went from 400 ms to 200 ms, with the last step at the start of epoch 1053 on October 9, 2026, per Edition 2026.11 of the guide. Ingest at
finalized.
Sui's objects and checkpoints
Sui is object-centric. Every asset is an object with an id, a version, and an owner (an address, another object, shared, or immutable). Transactions consume and produce object versions. Move modules emit typed events, and transactions are grouped into checkpoints.
For analytics, Sui feels closer to EVM logs than to Solana, because decoded Move events carry structured fields. Do not build on Sui's JSON-RPC. The Edition 2026.11 guide records that it was disabled on Sui Foundation mainnet full nodes in the week of July 27, 2026, and removed in Mysten's mainnet-v1.82.3 release on October 21, 2026. New pipelines should use gRPC or GraphQL RPC.
How EVM, Solana and Sui compare
| EVM | Solana | Sui | |
|---|---|---|---|
| How state is stored | Contract storage, balances and code at a block | Accounts that hold data and lamports, each owned by a program | Objects with an id, a version and an owner |
| How activity is grouped | Transactions in blocks | Instructions (and inner instructions) in a transaction, in slots | Transactions grouped into checkpoints |
| What analysts usually read | Logs (events) from receipts | Instruction data and pre/post token balance changes | Typed Move events |
| When data is treated as final | Ethereum: the finalized tag, about two epochs (roughly 13 minutes) | The finalized commitment (Alpenglow, live October 21, 2026, targets about 150 ms) | Checkpoint inclusion |
Fluency in more than one of these models is now the default, not a specialty. In Unchain Data's job board snapshot of October 20, 2026, reported in Edition 2026.11 of the guide, 142 roles carry a chain tag and 109 of those are "multi-chain."
Decode an ERC-20 Transfer log
Here is a real USDC Transfer on Base, log index 32 of a transaction in block 52,955,608, as returned by eth_getTransactionReceipt (trimmed to the decoding fields). Check it on Blockscout; the full hash is 0xb4cff99a4a1392d41294d4b5f34966b488db40825bad84d469bb753adef87ef9.
{
"address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000090f2fc66ffe81ed5f028bb46b6089ac5c5b8eb56",
"0x0000000000000000000000007707d707269958e823ca8462d24dbb812a045dce"
],
"data": "0x00000000000000000000000000000000000000000000000000000000004c4b40"
}topics[0]iskeccak256("Transfer(address,address,uint256)"). Any contract emitting this event, including NFTs, produces the same hash. ERC-721 also indexes the token id, so its Transfer log has four topics instead of three. Count topics before you decode.topics[1]andtopics[2]are addresses left-padded to 32 bytes. Take the last 20 bytes.dataholds the unindexedvalue:0x4c4b40is 5,000,000. USDC has 6 decimals, so this is 5 USDC.- The emitting
addressis the token. The same event from a different address is a different token, or a fake one.
The same decode with viem, from the guide's MIT-licensed hands-on/02-decode-logs lab:
import { decodeEventLog, parseAbiItem, formatUnits } from "viem"
const transfer = parseAbiItem(
"event Transfer(address indexed from, address indexed to, uint256 value)",
)
const { eventName, args } = decodeEventLog({
abi: [transfer],
topics: log.topics,
data: log.data,
})
console.log(eventName, args.from, args.to, formatUnits(args.value, 6))Never trust the event name alone. Filter on (address, topics[0]) together, and keep a token allowlist or a verified-contract list. Spam tokens emit perfectly valid Transfer events.
Frequently Asked Questions
What is onchain data?
Onchain data is the raw record a blockchain writes: headers, transactions, execution results, and the state those transactions leave behind. It is not a finished table of balances or volume; those are models you build from the records, and the records differ on EVM chains, Solana and Sui.
Why do traces still matter if I already have logs?
Because many value movements never show up as logs. Native ETH moved by a contract is the classic case, and so is a contract created by a factory that does not emit a creation event.
Is Sui closer to EVM or to Solana for analytics?
Closer to EVM. Decoded Move events carry structured fields, like logs. The state model is still different: objects with versions, not contract storage slots, and the unit of finality is a checkpoint.
Key Takeaways
- Start from the objects the chain records. Balances and volume are models you build on top, not raw fields the chain hands you.
- On EVM chains, learn the five raw datasets. Logs do most analytics work, and traces cover what logs miss.
- Decode logs with the emitting address, not the event name alone. The Base example is 5 USDC only after the token address, the topic hash, and the 6 decimals are checked together.
- Solana analytics often starts from instructions and balance changes. Inner instructions and token balance deltas matter more than a search for EVM-style events.
- Sui pipelines should use gRPC or GraphQL RPC. JSON-RPC was removed from Sui Foundation mainnet full nodes in 2026.
This article is adapted from the Blockchain Data Engineering Guide. Get the guide. Practice onchain SQL in WizardCamp.
Also on the blog: the onchain pipeline tools and how to become a crypto data engineer.
Related
What Is Blockchain Data Engineering? A 2026 Primer
How to Hire a Crypto Data Engineer in 2026: Skills, Interview Questions and Pay
Blockchain Data Engineering Tools: The 2026 Stack by Pipeline Layer
Blockchain Data Engineer Salary 2026: What Verified Pay Ranges Show
How to Hire a Crypto Compliance Officer in 2026: MLRO, CCO and AML Leads

- Founder of Unchain Data
- Former data lead at Morpho Labs and Binance
- Builds Dune dashboards and data pipelines across Ethereum, Solana and Sui
- Advises VC funds and DeFi protocols on data strategy
- Featured on BBC for blockchain data research
Ready to practice what you just read?
WizardCamp has interactive SQL exercises on real blockchain data. Write queries, get instant feedback, earn certificates.
Explore WizardCamp