Unichain Data: Index Swaps, Liquidity, and DeFi Markets
Index Unichain's swap events, pool activity, and decoded transactions in one pipeline, delivered to your own database. Real-time and complete historical data, no node to run.
Unichain calls itself the DeFi chain, an OP Stack Layer 2 built by Uniswap Labs and part of the Optimism Superchain. It is tuned for onchain markets: 1-second blocks with 200ms Flashblocks preconfirmations sequenced inside trusted execution environments, ETH as the gas token, and a stated mission of making swaps, liquidity provision, and yield strategies faster and cheaper than they are on L1. You can read how the team frames it at unichain.org.
That speed is the data problem. Unichain emits swap events, pool state changes, and decoded calls at a sub-second cadence, and the trading workloads built on top of it want that data in near real time. Indexing Co covers Unichain in a single pipeline, decodes the raw chain into the shape you want, and delivers it to your own PostgreSQL, warehouse, or webhook. Real-time and full history, with no node to operate.
Why Unichain data is hard
What Indexing Co delivers for Unichain
Stand up and maintain the whole stack yourself.
- Run a Unichain archive node or wire up a third-party RPC.
- Fetch and decode logs, traces, and receipts against the right ABIs.
- Track v4 hooks, proxy upgrades, and per-protocol event schemas by hand.
- Build backfill, reorg handling, and sub-second real-time delivery from scratch.
One pipeline sources, decodes, and delivers Unichain to your store.
- Unichain swap events, token transfers, and decoded txs in a single pipeline.
- Decoded data, shaped by your JavaScript transform.
- Lands in your PostgreSQL, BigQuery, warehouse, or webhook.
- Real-time delivery plus complete backfilled history. No node, no RPC babysitting.
What you can index
| EVM data type | On Unichain, for example |
|---|---|
| Contract events and logs | Uniswap v4 swaps, pool initializations, hook callbacks |
| Token transfers (ERC-20, ERC-721) | USDC and ETH transfers, LP position NFTs |
| Decoded transactions and traces | Router multicalls, smart-wallet user operations |
| Protocol and account state | Pool reserves and liquidity, trader positions and balances |
A transform, not a subgraph
You write the transform in JavaScript, not AssemblyScript, and change it without re-indexing from block zero. Indexing Co runs your function over each block server-side: decode the logs you care about and return rows for your destination.
// Indexing Co transform: reshape each block into rows for your database
function transform(block) {
const results = [];
const signatures = [
'event Transfer(address indexed from, address indexed to, uint256 value)'
];
for (const tx of block.transactions || []) {
for (const log of tx.receipt?.logs || []) {
const event = utils.evmDecodeLogWithMetadata(log, signatures);
if (!event) continue;
results.push({
chain: block._network,
block: Number(block.number),
tx_hash: tx.hash,
contract_address: log.address?.toLowerCase(),
from: event.decoded.from,
to: event.decoded.to,
value: event.decoded.value,
});
}
}
return results;
}
Unichain with Indexing Co
You want full control of node infrastructure and have the team to operate a Unichain archive node, decode every pool and hook's ABIs, and build backfill, reorg handling, and sub-second delivery in-house.
You want Unichain swap events, token transfers, and decoded transactions delivered to your own database, with real-time plus complete history and no infrastructure to run.
Related Reading
- DeFi Data Infrastructure
- Perpetual Markets Data Infrastructure
- Subgraph Migration: Moving Off The Graph's Hosted Service
- Indexing Co vs Subgraphs
FAQ
Do I need to run a Unichain node?
No. Indexing Co sources Unichain blocks, logs, and traces for you, including full historical data, so you never operate an archive node or babysit an RPC endpoint.
Can I index Uniswap v4 pools and hooks on Unichain?
Yes. Point a pipeline at the PoolManager, any hook contract, or your own deployments, and we decode swaps, liquidity changes, and hook callbacks against the right ABI.
Does Indexing Co keep up with Unichain's sub-second blocks?
Yes. The pipeline is built to stay at the chain head through 1-second blocks and Flashblocks preconfirmations, delivering swap events in real time without dropping or duplicating them.
Where does the Unichain data go?
Into your own destination: PostgreSQL, BigQuery, a warehouse, or a webhook. You define the output schema and own the storage.
Can I get complete historical Unichain data?
Yes. We backfill from your chosen start block and merge it with real-time data, so your Unichain dataset is gap-free from genesis forward if you want it.
Get Started
Index Unichain in minutes. Set up your first Unichain pool or token pipeline without running a node.