Using custom MEV Relays
What is a MEV Relay?
MEV (Maximal Extractable Value) relays on Ethereum are tools or services designed to help miners and other network participants capture the value generated from ordering and selecting transactions within a block. MEV is the measure of the total value that miners can extract by reordering, censoring, or including specific transactions in the blocks they propose.
MEV relays are important because they help create a more efficient and fair environment for transaction ordering in Ethereum. They consist of two main components:
MEV Relay: This is the infrastructure that aggregates and organizes the transaction bundles submitted by users and other network participants. It collects, sorts, and communicates the information required to optimize the transaction ordering and selection process.
MEV Strategies: These are algorithms or strategies created by developers, traders, and other ecosystem participants. They are designed to identify and capture MEV opportunities by optimizing transaction ordering and inclusion in a block. The strategies can involve arbitrage, liquidations, or other DeFi-related opportunities that have value.
MEV relays help in reducing the negative effects of MEV on Ethereum, such as network congestion and gas price manipulation. They also promote a more competitive and transparent ecosystem for capturing MEV, benefiting both miners and users. Some popular MEV relays include Flashbots and KeeperDAO, which offer tools and services for miners and other network participants to capture MEV efficiently.
How MEV Relays Work
MEV relays are blockchain services that help users transfer their transactions faster by paying a small fee to miners. They work by:
Users send their transactions to the MEV relay instead of directly to the network.
The MEV relay then bundles multiple transactions together into a single block proposal.
This block proposal is sent to miners, who can choose to include it in a block in exchange for the fees from the bundled transactions.
Miners who include the MEV relay's block proposal earn the fees from all the bundled transactions. Users get their transactions processed faster.
The MEV relay takes a small cut of the fees for providing this bundling service.
This allows users to circumvent the normal transaction queue and have their transactions processed faster by leveraging the fees they pay. Miners are incentivized to include these block proposals because they earn higher fees. MEV relays provide a market-based solution to prioritize certain transactions.
The downside is that MEV relays centralize transaction ordering and bundling to some extent. They also raise the barrier to direct transaction inclusion for regular users. But they do help improve overall block space utilization and transaction speeds.
How to connect a MEV Relay with Sedge
By default, if MEV is supported by the network, Sedge will connect to mev relay by default. If you want to connect to a specific MEV relay, you can do so by specifying the flag that might depend on the command you are using, but will look like:
- Generating a full node:
sedge generate full-node --relay-urls=https://firstname.lastname@example.org,https://email@example.com
- Generating a mev-boost node:
sedge generate mevboost --relay-urls=https://firstname.lastname@example.org,https://email@example.com