Flashbots Documentation

repository·main·Indexed 42 days ago

https://github.com/flashbots/flashbots-docs

Technical specifications and guides for the Flashbots ecosystem, including details on the Flashbots auction, bundle pricing, and bundle management using eth_sendBundle and eth_cancelBundle. Includes documentation on MEV-Boost, bundle ordering algorithms, and community tools like EigenPhi, libMEV, and Relayscan.

Tokens
71.3K
Snippets
178
Records
329
Agent score
51%

What's inside Flashbots

  1. Ways to use Flashbots Protect

    main

    There are three primary methods to interface with Flashbots Protect:

    1. Wallet Integration: Add the Flashbots Protect RPC directly to your wallet (e.g., MetaMask).
    2. Standard RPC Call: Send transactions to the RPC URL using the eth_sendRawTransaction method.
    3. Private Transaction Call: Send transactions using the eth_sendPrivateTransaction method.
  2. Identify MEV-Boost security and centralization risks

    main

    When operating with MEV-Boost, developers and validators should be aware of the following risk vectors:

    • Builder Centralization: High profitability can lead to market dominance by a single builder, potentially enabling censorship or exclusive access to transaction orderflow. Mitigation relies on encouraging competition and research into techniques like censorship resistance lists (crLists).
    • Builder/Relay Collusion: While relays improve the trust model compared to PoW, collusion between builders and relays remains a risk. This is targeted for resolution in Stage 3 PBS (enshrined) by removing the trusted relay.
    • Malicious Relays: Relays may submit fraudulent bids. Because MEV-Boost provides the highest-value bid to the Beacon Node without a way to verify the actual value claimed, malicious relays can affect profit-switching logic. The relay monitor specification is the primary mechanism for detecting and disqualifying these actors.
    • MEV Hiding: This occurs when node operators (managing third-party stake) are incentivized to hide MEV rewards earned within a block.
  3. Flashbots Prohibited Use Policy

    main

    Users of Flashbots Services and Flashbots Sites (webpages and social media) must adhere to the following restrictions. Engaging in these activities is prohibited:

    Unlawful Activity

    • Violating or assisting in the violation of any laws, statutes, ordinances, regulations, or sanctions programs (e.g., US OFAC or UK OFSI).
    • Involving proceeds from unlawful activity.
    • Publishing or disseminating unlawful material.
    • Misrepresentation, hacks, or theft.
    • Transaction manipulation, including frontrunning transactions, time bandit attacks, or similar activities.
    • Unlawful or unregistered sales/offerings of securities.

    Abusive Activity

    • Imposing unreasonable or disproportionately large loads on Flashbots Services infrastructure.
    • Interfering with, intercepting, or expropriating systems, data, or information.
    • Uploading harmful programs (viruses, trojan horses, worms, etc.).
    • Attempting unauthorized access to Flashbots Services, Sites, or connected networks.
    • Using another party's information to access services.
    • Transferring access or rights to a third party without express permission from FLASHBOTS.

    Abuse of Other Users

    • Interfering with another individual's or entity's access to Flashbots Services.
    • Defaming, discriminating, abusing, extorting, harassing, stalking, or threatening others.
    • Violating legal rights (privacy, publicity, intellectual property).
    • Harvesting information (e.g., email addresses) without consent.
    • Using services for spam, junk email, pyramid schemes, or unsolicited messages.

    Fraud

    • Activities designed to defraud FLASHBOTS, users, or any other person.
    • Providing false, inaccurate, or misleading information to FLASHBOTS.
  4. What is a Relay and how does it work?

    main

    A Relay acts as a doubly-trusted data-availability layer and communication interface between block builders and validators.

    Key Functions:

    • For Builders: Provides fair payload routing.
    • For Validators (Proposers): Ensures block validity, accuracy, and data availability.
    • Aggregation: Relays can connect to multiple builders to aggregate bids. The relay verifies all submitted blocks and only submits the highest valid bid to the validator.
    • Verification: Relays simulate and verify blocks to ensure:
      • Correct fees are paid to the recent validator feeRecipient.
      • Block attributes and transactions are correct.
      • Block gas is within the validator's requested gasLimit.

    Validator Setup: To receive bids, validators must set up mev-boost and add relays to their mev-boost configuration. mev-boost acts as a local relay aggregator that serves the winning bid from all connected relays to the validator.

  5. What is MEV-Boost?

    main

    MEV-Boost is an open-source middleware designed for Ethereum validators to access a competitive block-building market. It implements Proposer-Builder Separation (PBS) for Proof-of-Stake (PoS) Ethereum.

    By using MEV-Boost, validators separate the role of the block proposer from the block builder. This allows validators to access blocks from a marketplace of builders who produce blocks containing transaction orderflow and a fee for the proposer. This separation is intended to promote competition, decentralization, and censorship-resistance.

  6. What is MEV-Share?

    main

    MEV-Share is an open-source protocol designed to allow users, wallets, and applications to internalize the MEV (Maximal Extractable Value) generated by their transactions through an "orderflow auction."

    Key Features:

    • Selective Data Sharing: Users can choose to share specific transaction data with searchers.
    • Bidding Mechanism: Searchers bid to include the shared transactions in bundles.
    • Redistribution Control: Users can decide how the searcher's bid is redistributed among themselves, validators, or other parties.
    • Credible Neutrality: The protocol is designed to be permissionless for searchers and avoids enshrining a single block builder, aiming to reduce the centralizing impact of exclusive orderflow on Ethereum.
  7. What is a MEV-Share Node?

    main

    A MEV-Share Node is a service designed to match user transactions with searcher bundles. The workflow functions as follows:

    1. Submission: Users submit their transactions to the Node.
    2. Information Sharing: The Node shares select information about these transactions with searchers.
    3. Bundle Proposal: Searchers propose transactions to be bundled with the user transactions (currently, only backruns are supported).
    4. Forwarding: The Node forwards these bundles to a block builder.

    Key Requirement: The Node forwards bundles to builders with the strict requirement that the user is paid a refund, which consists of a percentage of the winning searcher's bundle profit.

  8. What is a Block Proposer?

    main

    A block proposer is a validator pseudorandomly selected via the RANDAO mechanism to build a block for a specific slot within an epoch (each epoch contains 32 slots).

    While one validator serves as the proposer for a slot, other validators in the set act as attesters. Attesters vote on the state of the beacon chain, specifically the head of the chain (LMD Ghost), the justified checkpoint, and the finalized checkpoint (Casper FFG).

    Assignment timing:

    • Attesters: Known 2 epochs in advance.
    • Proposers: Known 1 epoch in advance.
  9. What is Flashbots Auction?

    main

    Flashbots Auction is a permissionless, transparent, and fair ecosystem designed for efficient MEV (Maximal Extractable Value) extraction and frontrunning protection. It provides a private communication channel between Ethereum users and validators to communicate preferred transaction ordering within a block.

    In the current Proof-of-Stake (PoS) Ethereum environment, the Flashbots Auction is built on mev-boost, which implements proposer-builder separation.

  10. How the Flashbots Auction architecture works

    main

    The Flashbots Auction architecture is a specialized network composed of four distinct parties that facilitate the flow of MEV-enabled transactions from searchers to the Ethereum blockchain:

    1. Searchers: Users (bots, traders, or Dapps) who create and submit bundles via eth_sendBundle to block builders. They bypass the p2p network to maintain pre-trade privacy and express bids via gas price or direct ETH transfers to the coinbase.
    2. Block Builders: Entities that receive bundles from searchers and transactions from the mempool to construct the most profitable blocks. They then transmit these blocks to validators via relays.
    3. Relays: Secure intermediaries that receive blocks from builders and make them available to validators. Relays select the most profitable block and hold it in escrow, providing only the block header to the validator until a commitment is signed.
    4. Validators (Proposers): Ethereum nodes that use mev-boost to select the most profitable block from various relays to propose to the network.

    This flow ensures that searchers can participate in MEV auctions while validators benefit from increased block profitability.

  11. Understand data handling and license grants for Protected Data

    main

    When using Flashbots Services, your transactions, transaction bundles, or blocks of transactions ("Protected Data") are treated as proprietary and confidential to the extent they are not published to a public blockchain.

    By using the services, you grant Flashbots a limited, non-exclusive license to use, adapt, or reproduce your Protected Data for internal purposes, including:

    • Improving the Flashbots Service.
    • Using it as part of an anonymized, aggregated data set.
    • Deriving and publishing system performance metrics and logs.