Skip to main content

Quick Start

This quickstart guide contains all the information necessary to get up and running as a searcher on Flashbots. If you have any questions, do not hesitate to ask in the '#🐣 newcomers' or '#🤖 searchers' discord channels, or in the Searcher Self-Support Forum.

See you on-chain! ⚡🤖

Bundle Relay URLS

NetworkURL
Mainnethttps://relay.flashbots.net
Goerlihttps://relay-goerli.flashbots.net
Sepoliahttps://relay-sepolia.flashbots.net

Who should use Flashbots Auction?

  1. Ethereum bot operators (we call them "searchers") looking for fast, and risk free access to blockspace (for example, arbitrage and liquidation bots)
  2. Ethereum users looking for frontrunning protection on their transactions (for example, Uniswap traders)
  3. Ethereum Dapps with advanced use cases like account abstraction or gasless transactions

How does Flashbots work for searchers?

Flashbots provides a platform that connects searchers with validators, bypassing the public transaction pool. Searchers create 'bundles' of transactions they wish to send and forward these to block builders, such as Flashbots. The builder then simulates these bundles to ensure they won't revert and constructs a full block using the available bundles and transactions. Through the use of mev-boost and a network of relays and builders, these blocks are delivered to validators while preserving pre-trade privacy.

Getting onboarded to Flashbots is easy for searchers; you simply need to update how you send transactions.

How to send your first Flashbots bundle

To access the Flashbots network you will need three things:

  1. A unique ECDSA-secp256k1 key pair for Flashbots to identify you
  2. A method to communicate with the Flashbots network
    • Alchemy provides a convenient way to dispatch individual transactions to Flashbots.
  3. A "bundle" comprising your transactions

When you send bundles to Flashbots, they are signed with your key, which allows us to confirm your identity and accumulate your reputation over time. Reputation system is set up to protect the infrastructure from attacks like DDoS. Searcheres with higher reputation will have better access to the network especially during times of high congestion.

It's crucial to understand that this key does not manage any funds and does not have to be the main Ethereum key used for authenticating transactions. Its only function is to establish your identity with Flashbots. You can use any ECDSA-secp256k1 key for this purpose.

Next, you need a means to communicate with the Flashbots network. The Flashbots builder accepts bundles at relay.flashbots.net, and there are specific RPC endpoints that you must use to transmit transactions to us. To simplify this process, we've integrated with several widely-used developer tools such as Ethers.js and web3.py. Below are some examples of how to configure a Flashbots provider:

const ethers = require("ethers.js");
const {
FlashbotsBundleProvider,
} = require("@flashbots/ethers-provider-bundle");

// Standard json rpc provider directly from ethers.js. You can use Infura, Alchemy, or your own node.
const provider = new ethers.providers.JsonRpcProvider({
url: ETHEREUM_RPC_URL,
});

// `authSigner` is an Ethereum private key that does NOT store funds and is NOT your bot's primary key.
// This is an identifying key for signing payloads to establish reputation and whitelisting
const authSigner = new ethers.Wallet(
"0x0000000000000000000000000000000000000000000000000000000000000000"
);

// Flashbots provider requires passing in a standard provider and an auth signer
const flashbotsProvider = await FlashbotsBundleProvider.create(
provider,
authSigner
);

Now that we have a private key to identify ourselves with and a Flashbots provider we can create and send a bundle. Here's an example in node.js

const ethers = require("ethers.js");
const {
FlashbotsBundleProvider,
} = require("@flashbots/ethers-provider-bundle");
const provider = new ethers.providers.JsonRpcProvider({
url: ETHEREUM_RPC_URL,
});

const authSigner = new ethers.Wallet(
"0x2000000000000000000000000000000000000000000000000000000000000000"
);
const flashbotsProvider = await FlashbotsBundleProvider.create(
provider,
authSigner
);

const signedBundle = await flashbotsProvider.signBundle([
{
signer: SOME_SIGNER_TO_SEND_FROM,
transaction: SOME_TRANSACTION_TO_SEND,
},
]);

const bundleReceipt = await flashbotsProvider.sendRawBundle(
signedBundle,
TARGET_BLOCK_NUMBER
);

That's it!

Next steps

Congrats! You should now have everything you need to start sending transactions to the Flashbots network.