---
# System prepended metadata

title: MEV-Boost config generator proposal

---

# MEV-Boost config generator proposal

## Problem breakdown

Recently Lido introduced `MEV Boost Relay Allowed List` (https://docs.lido.fi/contracts/mev-boost-relays-allowed-list) contract that contains a list of allowed relays to be used in Node Operators MEV-Boost instances. The number of relays and relay urls in the contract are **subject to change**. 

After The Merge and MEV integration Node Operators should maintain an up to date list of relays urls in their infrastructure. 

For now, it could be done by manually copying one or more relays from the contract to application configurations that works with MEV, like Vouch and MEV-Boost.

**The Problem**: The list of allowed relays in the contract can be changed frequently, so Node Operators will have to manually change (or re-deploy) their application configurations.

## Solution:

It will be good to have a tool that will:

1. Simplify MEV-Boost configuration for NOs teams.
2. Help for NOs to maintain an up to date list of MEV Boost relays urls in their infrastructure from `MEV Boost Relay Allowed List` contract without user interaction.

The tool will ask for `selected` relay names (that NO wants to select from the contract) and/or `excluded` relay names (if NO wants to include everything except excluded relay names).

## Possible CLI arguments:

* `mode` -- interactive or non-interactive mode
* `rpc` -- RPC url to read from the contact
* `network` -- network (`mainnet`, `goerli`, `etc..`)
* `format` -- type of the output (`mev-boost`, `vouch`, `json`, `yaml`, `dotenv`, `docker-env`)
* `relays` -- relay names to select from the contract (may be ampty)
* `exclude-relays` -- relay names to exclude when reading from the contract (may be empty)
* `id` --  Node operator `ID` to be included in the relay url at the end (optional)
* `extra-args` -- extra arguments for MEV-Boost of Vouch (optional)

## Possible implementations

A tool can have two modes:

### 1. automatic mode (non-interactive)

In non-interactive mode tool will:
* grab RCP and other args from CLI
* get full list of allowed relay urls from Lido `MevBoostRelayAllowedList` contract
* select needed (or exclude not needed) relays according to args from CLI
* will output one of the following:
    * string with full set of arguments for running a single MEV-boost instance.
    * json with Vouch configuration
    * string with Docker environment variables for MEV-Boost
    * `.env` file for MEV-Boost or Docker
    * json/yaml with selected relay urls

Plain JSON can be handy for automatic generation of mev-boost-related configs other environments.


For now there are 5 possible relays in the contract
* flashbots (https://0xa..10@builder-relay-goerli.flashbots.net)
* blocknative (https://0x8..d0@builder-relay-goerli.blocknative.com)
* bloxroute (https://0x8..16@bloxroute.max-profit.builder.goerli.blxrbdn.com)
* eden (https://0xa..7b@relay-goerli.edennetwork.io)
* manifold (https://0x8a..a3@goerli-relay.securerpc.com)


#### 1.1 Example for MEV-boost:

when only 2 relays are selected:
* flashbots
* bloxroute

command:```./mev-boost-config-generator --rpc=<url> --mode=noninteractive --network=goerli --format=mev-boost --mev-boost-version=1.3.8 --relays=bloxroute,flashbots --id=nop --extra-args="-relay-check"```
##### will output arguments for MEV-Boost:
```./mev-boost -mainnet -relay-check -relay https://0xa..10@builder-relay-goerli.flashbots.net?id=nop,https://0x8..16@bloxroute.max-profit.builder.goerli.blxrbdn.com?id=nop```

#### 1.2 Example with plain JSON mode:

when no relays are selected, two relays are excluded:
* flashbots
* manifold

command: ```./mev-boost-config-generator --rpc=<url> --mode=noninteractive ---network=goerli --format=json  --exclude-relays=flashbots,manifold --id=nop```
##### will output all relay urls, except exluded:
```json 
{
    "relays": [
        "https://0x8..d0@builder-relay-goerli.blocknative.comid=nop",
        "https://0x8..16@bloxroute.max-profit.builder.goerli.blxrbdn.com?id=nop",
        "https://0xa..7b@relay-goerli.edennetwork.ioid=nop"
    ]
}
```
#### 1.3 Example for Vouch:

when only 2 relays are selected:
* flashbots
* bloxroute

command: ```./mev-boost-config-generator --rpc=<url> ----mode=noninteractive --network=goerli --format=vouch  --fee_recipient="0x1111…1111" --relays=bloxroute,flashbots --id=nop```
##### will output part of the Vouch config:
```json 
{
  "proposer_config": {
    "0xaaaa…aaaa": {
      "fee_recipient": "0x1111…1111",
      "builder": {
        "enabled": true,
        "relays": [
          "https://0xa..10@builder-relay-goerli.flashbots.net?id=nop",
          "https://0x8..16@bloxroute.max-profit.builder.goerli.blxrbdn.com?id=nop"
        ]
      }
    }
  }
}
```

### 2. manual mode (interactive)

Basically a wizard to output the configuration.

In interactive mode the tool will:
* ask user multiple questions (example images attached) and also grab relay urls from Lido `MevBoostRelayAllowedList` contract.
* will output one of the following:
    * string with full set of arguments for running a single MEV-boost instance.
    * json with Vouch configuration
    * string with Docker environment variables for MEV-Boost
    * `.env` file for MEV-Boost
    * json/yaml with selected relay urls

#### Example with a wizard:

command: `./mev-boost-config-generator --rpc=<url> --mode=interactive`

![](https://i.imgur.com/rFnr9en.png)

![](https://i.imgur.com/WK9Kb0C.png)

![](https://i.imgur.com/BMmAtdz.png)


## Links

1. MEV-Boost https://boost.flashbots.net/
2. PBS https://ethresear.ch/t/proposer-block-builder-separation-friendly-fee-market-designs/9725
3. Flashbots implementation https://github.com/flashbots/mev-boost/
4. Vouch manuals https://github.com/attestantio/vouch/blob/master/docs/execlayer.md#mev-configuration