Skip to content
BaseHub by wbnns Updated

App Integration

Choose the integration that matches your app’s needs and connect through a Flashblocks-aware RPC endpoint.

Use caseRecommended approachDocumentation
Apps needing instant UXFlashblocks-aware RPC with the pending tag.API Reference
Infrastructure providersHost Flashblocks-aware RPC nodes.Enable Flashblocks
Standard appsContinue using regular RPCs.JSON-RPC API Reference

For HTTP and WebSocket endpoint URLs, see the Flashblocks API reference. Public endpoints are rate-limited; for production, route through a Flashblocks-enabled provider such as Alchemy, QuickNode, or dRPC.

MetricValue
Flashblock build time (P50)~10ms
Preconfirmation latency~200ms
Full block time2 seconds
Flashblocks per block10
Reorg rate< 0.1%

The gas budget is cumulative, not per-Flashblock. Each Flashblock unlocks an additional 1/10 of the total block gas:

FlashblockCumulative gas available
11/10 of block limit (~40M gas)
22/10 of block limit (~80M gas)
33/10 of block limit (~120M gas)
10Full block limit (~400M gas)

Implications for large transactions:

  • In practice, gas size is rarely the limiting factor. Base’s per-transaction gas maximum of 16,777,216 gas (~16.7M) is already below Flashblock 1’s ~40M budget, so any valid transaction qualifies for the first Flashblock on size alone.
  • Inclusion timing is governed primarily by priority fee relative to others competing in the same 200ms window, not by transaction size.

Base targets a < 0.1% Flashblock reorg rate — the share of preconfirmations that were streamed but missed inclusion in the final block. This is rare, but apps should plan for it.

If Flashblocks become unavailable, the sequencer keeps running and confirmation falls back to standard 2-second blocks. Apps should handle both modes.

A Flashblocks-aware RPC endpoint is required to use Flashblocks with these libraries.

To use Flashblocks with Wagmi, set the basePreconf chain in the Wagmi config (see config.ts).

import { useSendTransaction, useWaitForTransactionReceipt } from "wagmi";
function SendTransaction() {
const { data: hash, sendTransaction } = useSendTransaction();
const { data: receipt } = useWaitForTransactionReceipt({ hash });
return (
<div>
<button
onClick={() => sendTransaction({
to: "0x...",
value: parseEther('0.0001'),
})}
>
Send Transaction
</button>
{hash && <div>Hash: {hash}</div>}
{receipt && <div>Included on block number: {receipt.blockNumber}</div>}
</div>
)
}
import { createWalletClient, http, parseEther, publicActions } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { baseSepoliaPreconf } from "viem/chains";
// Create client with the Flashblocks-aware chain.
const account = privateKeyToAccount(`0x${process.env.PRIVATE_KEY}`);
const client = createWalletClient({
account,
chain: baseSepoliaPreconf,
transport: http(),
})
.extend(publicActions);
const submissionTime = new Date();
console.log(`Submitting transaction at: ${submissionTime.toISOString()}`);
// Send transaction.
const hash = await client.sendTransaction({
to: "0x...",
value: parseEther('0.0001'),
});
console.log(`Transaction hash: ${hash}`);
// Wait for transaction to be included.
const receipt = await client.waitForTransactionReceipt({ hash });
const confirmTime = new Date();
console.log(`Transaction included at: ${confirmTime.toISOString()}`);
console.log(`Time difference: ${confirmTime - submissionTime}ms`);
const providerA = new ethers.JsonRpcProvider(
"https://sepolia.base.org"
);
const wallet = new ethers.Wallet(process.env.PRIVATE_KEY, providerA);
try {
// Create a simple transaction (sending 0.001 ETH to a random address)
const tx = {
to: "<SOME ADDRESS>",
value: ethers.parseEther("0.0000001"),
};
// Submit transaction
const submissionTime = new Date();
const transaction = await wallet.sendTransaction(tx);
console.log(`Submitting transaction at: ${submissionTime.toISOString()}`);
console.log(`Transaction hash: ${transaction.hash}`);
await transaction.wait(0); // Make sure to set the confirmation count to 0
console.log("Transaction confirmed");
const confirmationTime = new Date();
console.log(`Transaction confirmed at: ${confirmationTime.toISOString()}`);
console.log(`Time difference: ${confirmationTime - submissionTime}ms`);
}

Confirmation times against this endpoint should be substantially lower than the standard RPC.

For feedback, support, or questions about Flashblocks, reach the team in the #developer-chat channel on the Base Discord.