Flashbots tutorial & Flashbots bundles guide

This Flashbots tutorial explains how to use Flashbots bundles to submit private bundles, through documented private builder routes, FRB Agent.

Linkable summary

How FRB frames Flashbots

FRB's Flashbots tutorial offers a neutral, step-by-step description of private bundles, relay selection, and gas policy so media outlets can quote one concise explanation of how Flashbots fits into responsible MEV execution.

What is Flashbots?

Flashbots is a research and development organization working on MEV infrastructure. Its documentation separates user transaction protection from searcher bundle submission to block builders.

The documented bundle path provides these capabilities:

  • Ordered transaction groups for a target block
  • Explicit timestamp, expiry, and revert handling
  • Simulation before submission
  • Optional distribution to selected builders
  • On-chain verification of component transactions

Step-by-Step Guide

Step 1: Choose the Correct Product

Use Flashbots Protect for user transaction routing and the builder API for searcher bundles. The endpoints and semantics are different.

Learn more about Choose the Correct Product →

Step 2: Construct the Exact Bundle

Create and sign the ordered transactions, define the target block, and explicitly list any transaction hashes that are allowed to revert.

Step 3: Simulate Against Target State

Simulate the same ordered transactions and fee policy intended for submission. Save logs, gas use, and revert reasons.

Step 4: Set Cost and Expiry Limits

Define builder payment, fee caps, target block, expiry, and replacement policy before submission.

Step 5: Submit Through Documented APIs

Submit to the builder API and record selected builders, request identifiers, and responses. API receipt is not on-chain inclusion.

Step 6: Verify On-Chain

Confirm component transaction hashes on-chain and record included, expired, rejected, and not-included attempts separately.

Flashbots route capability map

Choose the route by audience and documented behavior. This is not a provider ranking or performance benchmark.

Review private bundles
Product pathAudienceDocumented behaviorMeasurement noteBoundary
Flashbots ProtectEthereum user transactionsPrivate transaction routingVerify current fallback policyFor wallet users; not the searcher bundle endpoint.
Flashbots Builder APIEthereum searcher bundlesTarget-block bundle submissionMeasure from your own regionFor ordered bundles; confirm component transactions on-chain.
Flashbots MultiplexingSelected buildersAPI distribution to configured buildersNo universal benchmarkBuilder selection expands distribution but does not ensure inclusion.
  • Recheck the official API documentation before changing a production route.
  • Use the same workload, region, and observation window when comparing builders.
  • Record receipt, inclusion, expiry, rejection, and costs as separate states.

Where Flashbots fits in modern block building

Flashbots participates in Ethereum block-building infrastructure while exposing separate documentation for searchers, users of Flashbots Protect, and validator or builder operators.

  • A searcher bundle targets a block and preserves the supplied transaction order.
  • A reverting transaction invalidates a bundle unless its hash is explicitly allowed to revert.
  • API receipt must be followed by on-chain confirmation.

Treat builder selection, payment, target block, permitted reverts, and expiry as explicit configuration. Record them with every result so later reviews can reproduce the submission.

Bundle Structure

A Flashbots bundle consists of:

  • Transactions: Ordered signed transactions with explicit revert policy
  • Block Number: Target block for inclusion
  • Min Timestamp: Minimum block timestamp (optional)
  • Max Timestamp: Maximum block timestamp (optional)

Example Bundle

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendBundle",
  "params": [{
    "txs": [
      "0x02f8...", // Transaction 1
      "0x02f8..."  // Transaction 2
    ],
    "blockNumber": "0x1234567",
    "minTimestamp": null,
    "maxTimestamp": null
  }]
}

Cost and Builder Payment Policy

Pricing and builder payment must be bounded and measured. Key considerations:

  • Set a maximum total cost before submission
  • Include expired and rejected attempts in the ledger
  • Use the same workload when comparing builder configurations
  • Use tools like our Gas Calculator to document a cost ceiling
  • Re-simulate when state, target block, or fee assumptions change

Code Examples

JavaScript/TypeScript Example

import { ethers } from 'ethers';

const flashbotsRpc = 'https://rpc.flashbots.net';
const provider = new ethers.JsonRpcProvider(flashbotsRpc);

async function submitBundle(txs: string[], targetBlock: number) {
  const bundle = {
    jsonrpc: '2.0',
    id: 1,
    method: 'eth_sendBundle',
    params: [{
      txs: txs,
      blockNumber: '0x' + targetBlock.toString(16),
    }],
  };

  const response = await fetch(flashbotsRpc, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify(bundle),
  });

  return await response.json();
}

Python Example

import requests
import json

def submit_bundle(txs, target_block):
    url = 'https://rpc.flashbots.net'
    payload = {
        'jsonrpc': '2.0',
        'id': 1,
        'method': 'eth_sendBundle',
        'params': [{
            'txs': txs,
            'blockNumber': hex(target_block),
        }],
    }

    response = requests.post(url, json=payload)
    return response.json()

Best Practices

  • Start Small: Test with small amounts before scaling up
  • Monitor Status: Use Flashbots dashboard to track bundle status
  • Optimize Gas: Refine fee policy only from complete, timestamped samples
  • Error Handling: Implement robust error handling for failed submissions
  • Rate Limiting: Respect rate limits to avoid being blocked
  • Simulation: Use Flashbots simulation endpoint to test bundles before submission

Flashbots vs Public Mempool

FeatureFlashbotsPublic Mempool
Front-running RiskProvider-defined pre-inclusion routingVisible to public peers before inclusion
Gas CostsBuilder payment plus network feesNetwork fees and replacement costs
ComplexityHigher (requires API integration)Lower (standard transactions)
PrivacyDefined by provider policy before inclusionPending transaction is publicly observable

Learn more in our Flashbots vs Public Mempool comparison.

Additional Resources

Next Steps

Ready to start using Flashbots? Here's what to do next:

  1. Review the official Flashbots documentation
  2. Set up your development environment
  3. Test bundle submission in simulation mode
  4. Start with small test bundles
  5. Monitor and optimize your strategies
  6. Consider using FRB Agent for automated MEV trading

Key Takeaways

  • Flashbots documents separate paths for user transaction protection and searcher bundles.
  • Use the builder API for bundles and Protect for its documented user transaction purpose.
  • Simulate the exact bundle and set cost, target-block, expiry, and revert policy before submission.
  • Treat API receipt, on-chain inclusion, and final confirmation as separate states.

Official References

Before you bounce, tie this tutorial to the core execution steps: Download FRB, follow the install guide, and keep Support & SLA handy whenever Flashbots bundles need escalation.

Revisit the FRB pricing plans and Knowledge Base so every simulation and live run is documented before capital goes live.

Control the Pulse

Expand Your Execution

Maximize your edge by exploring the full FRB toolkit. From institutional-grade telemetry to ready-to-export strategy scripts.

Ready to Evolve?

Take the Next Step

Whether you're verifying terminal security or launching your first bundle, the FRB journey starts here.

Recommended

Install FRB Agent

Secure Windows build. Verified via SHA-256 for maximum integrity.

Recommended

Read Docs Quick Start

Master the setup in 15 minutes. From wallet pairing to first bundle.

Recommended

Launch Dashboard

Monitor your Ops Pulse and manage transaction routes in real-time.