Skip to main content
Flashblocks is a block builder sidecar for OP Stack chains that delivers sub-second transaction confirmations - 250 ms on OP Mainnet, configurable down to 200 ms. By streaming pre-confirmations, “signals” that arrive before the next block is finalized, Flashblocks make OP Stack chains up to 10x faster, unlocking seamless user experiences without compromising security guarantees. Built for developers who need lightning fast UX, flashblocks are ideal for DeFi apps, payments, games, and real-time interactions where instant is the only answer.
  • Payments: Instant payment confirmations
  • DeFi: Swaps and positions that update immediately
  • Marketplaces: Fast, frictionless checkout flows
  • Games: Real-time actions with no waiting between moves

How it works

By default, blocks are produced every 1–2 seconds. Flashblocks break that window into smaller intervals so instead of waiting the full block time to execute all transactions, the execution client continuously creates and broadcasts a “flash” block every few hundred milliseconds. Each flashblock includes all transactions processed so far, along with updated balances and contract states. Apps can query this near-real-time state using RPC providers (Ankr, QuickNode, Alchemy, etc) and deliver the speed their users expect.

Integrate Flashblocks

Integration is designed to be simple and low-friction. Most apps benefit with minimal code changes.
  • In production, point your app to a a Flashblocks‑aware RPC endpoint from your provider of choice. If your provider doesn’t support flashblocks yet, let us know on Discord and we’ll work with them to get it added.
  • Alternatively, you can run your own flashblocks-aware node using Base’s reth image.

Supported RPC methods

Developers can access Flashblocks using the same familiar Ethereum JSON-RPC calls. The difference is using the “pending” tag to query the pre-confirmed state instead of the last finalized block.
  • eth_getBlockByNumber: Use the pending tag to retrieve the latest flashblock snapshot.
  • eth_call: Use the pending tag to execute calls against the most recent pre-confirmed state.
  • eth_getBalance / eth_getTransactionCount: Use the pending tag to fetch balances or transaction counts as they evolve within the block window. Other methods, like eth_getTransactionReceipt and eth_getTransactionByHash, return data from pre-confirmed transactions without requiring the pending tag. Consult the specs (insert link) for more details on each of these methods.

Libraries

You will need a Flashblocks‑aware RPC endpoint to use the following libraries:

Viem

import { createPublicClient, createWalletClient, http, parseEther } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { opSepolia } from 'viem/chains';
import { publicActionsL2, walletActionsL2 } from 'viem/op-stack';

const account = privateKeyToAccount(`0x${process.env.PRIVATE_KEY}`);

const walletClient = createWalletClient({
  account,
  chain: opSepolia,
  transport: http("https://sepolia.optimism.io"),
}).extend(walletActionsL2());

const publicClient = createPublicClient({
  chain: opSepolia,
  transport: http("https://sepolia.optimism.io"),
}).extend(publicActionsL2());

const submissionTime = new Date();
const hash = await walletClient.sendTransaction({
  to: '0x...',
  value: parseEther('0.0001'),
});

// Wait for pre-confirmation
const receipt = await publicClient.waitForTransactionReceipt({ hash });
const confirmTime = new Date();
console.log('pre-confirmed in ms:', confirmTime.getTime() - submissionTime.getTime());

Ethers

import { ethers } from 'ethers';

// Here, provider is a Flashblocks-enabled RPC provider
const provider = new ethers.JsonRpcProvider("https://sepolia.optimism.io");
const wallet = new ethers.Wallet(process.env.PRIVATE_KEY as string, provider);

const tx = { to: '0x...', value: ethers.parseEther('0.0001') };
const submission = new Date();

const sent = await wallet.sendTransaction(tx);

await sent.wait(0);
const confirmed = new Date();

// should represent the transaction (pre)confirmation faster than standard RPC
console.log('Pre-confirmed in ms:', confirmed.getTime() - submission.getTime()); 

// validates the transaction hash returned by the pre-confirmed transaction above
const receipt = await provider.getTransactionReceipt(sent.hash);
console.log('Receipt validated in ms:', validated.getTime() - submission.getTime());
console.log('Transaction receipt:', receipt); 

Flashblocks FAQ

Block building and availability

High availability and safety

Pre-confirmations and reorgs

Next steps

I