Skip to main content

Getting Started

To start searching on MEV-Share, you will first need to connect to a MEV-Share Node. As a reminder, the MEV-Share Node is responsible for receiving transactions and bundles from users, and selectively sharing information ("hints") about them with searchers. When a searcher wants to include a transaction in their bundle, they use that transaction's hash. The MEV-Share Node replaces it with the original transaction before sending the bundle to a block builder.

Connect to MEV-Share Node

Flashbots runs a MEV-Share Node on Ethereum mainnet. The MEV-Share Node has endpoints to receive transactions and bundles, as well as an SSE event stream endpoint which dispatches pending events/transactions to searchers.

The simplest way to connect to the Flashbots MEV-Share Node is to use a client library. For this guide, we'll refer to mev-share-client-ts.

Add library to your project:

yarn add @flashbots/mev-share-client

Import library code (note ALL_CAPS variables are placeholders; replace with your own data):

import { Wallet, JsonRpcProvider } from "ethers"
import MevShareClient, {
BundleParams,
HintPreferences,
IPendingBundle,
IPendingTransaction,
TransactionOptions
} from "@flashbots/mev-share-client"

const provider = new JsonRpcProvider(RPC_URL)
const authSigner = new Wallet(FB_REPUTATION_PRIVATE_KEY, provider)
const mevShareClient = MevShareClient.useEthereumMainnet(authSigner)

Connecting to Goerli:

const mevShareClient = MevShareClient.useEthereumGoerli(authSigner)

Custom params (for developers):

// connect to MEV-Share on mainnet
const mevShareClient = new MevShareClient(authSigner, {
name: "mainnet",
chainId: 1,
streamUrl: "https://mev-share.flashbots.net",
apiUrl: "https://relay.flashbots.net",
})

See the documentation in the mev-share-client-ts repo to learn more.

note A note on other languages

If you're coding in a language that doesn't yet have a MEV-Share Node client library, you can send transactions & bundles directly with the JSON-RPC endpoint. To listen for transactions, all you need is an HTTP client. More details on that in the Event Stream page.


Now you should be connected to the Flashbots MEV-Share Node. Continue reading on the next page to learn how to listen for hints about pending transactions shared by the MEV-Share Node.

A note for experienced searchers getting acquainted with MEV-Share

Searching on MEV-Share is different from searching on the mempool in that only certain parts of a transaction are shared with searchers. On the mempool, we can see all parts of a transaction, such as calldata and logs. But on MEV-Share, a transaction might only reveal its function selector, making a traditional arbitrage calculation infeasible (though this is not necessarily the common case).

That being said, existing strategies can still be employed. Users of MEV-Share have the option to share whichever parts of the transaction they deem appropriate, so strategies which use calldata and/or logs as input are still viable.

To maximally leverage the orderflow on MEV-Share, new searching strategies will have to be implemented to profitably include these transactions in your bundles. More specifically, you may have to reason about markets and/or blockchain state separately from the intra-block context of users' transactions, and leveraging data gleaned from mev-share transactions, probabilistically estimate the parameters of your MEV extraction strategy. A range of probable outcomes may be targeted in parallel, but this must be done efficiently, so as to maintain priority in the MEV-Share Node's priority queues.