bid-scraper

December 16, 2025 ยท View on GitHub

bid-scraper is service that connects to relays using different methods and publishes the seen bids. All the configuration comes from a config file so the command line is super simple:

bid-scraper config.toml

Cfg

NameTypeComments
log_jsonboolJSON vs Raw
log_levelenv/stringDefines the log level (EnvFilter) for each mod. See https://docs.rs/tracing-subscriber/latest/tracing_subscriber/index.html for more info on this.
Example: "info"
log_colorbool
publisher_urlstringWhere we publish the bids. Example:"tcp://0.0.0.0:5555"

A list of publishers configurations follows. Each publisher is prefixed with [[publishers]]. Every publisher has the following fields:

NameTypeComments
typestringtype of publisher to create.
Valid values:
- "relay-headers"
- "relay-bids"
- "ultrasound-ws"
- "bloxroute-ws"
See below for specific parameters for each type.
namestringUnique name identifying this particular instance.Eg: "ultrasound-us","ultrasound-eu","relay-headers"

The type field defines the specific publisher type

Publishers

  • Relay pollers

    Fields common to both publishers
    NameTypeComments
    eth_provider_uristringEndpoint for an EL client. Example:"ws://127.0.0.1:8545"
    relays_filestringjson file containing the list of relays. Example:"ws://127.0.0.1:8545"
    Sample json file:
    {
    "flashbots": "https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net",
    "happy relay": "https://happy.com"
    }
    request_start_sfloatWhen should start to query (in seconds) for bids in each slot. It's then shifted using time_offset_index/time_offset_count. Example: 5.0
    request_interval_sfloatHow often query for bids (in seconds), once we started. Example: 1.0
    time_offset_countintSee time_offset_index. Example: 1
    time_offset_indexintInt between [0; time_offset_count) . We'll initiate our requests at exactly this time proportionally in the slot. Imagine you have 3 instances in 3 servers, you pass --time-offset-count 3 and then the first instance will have --time-offset-index 0, the second 1, and the third 2.. Example: 0
    • Relay get headers (type = "relay-headers") This publisher polls /eth/v1/builder/header/ on the configured list of relays to get the current top bid. Don't instantiate more than once.

      Fields
      NameTypeComments
      beacon_node_uristringEndpoint for an CL client. Example:"ws://127.0.0.1:8545"
    • Relay get bids (type = "relay-bids") This publisher polls /relay/v1/data/bidtraces/builder_blocks_received on the configured list of relays to get all the bids. Don't instantiate more than once. No extra fields needed.

  • Ultrasound websocket (type = "ultrasound-ws") This publisher connects to a relay using ultrasound websocket top bid protocol.

    Fields
    NameTypeComments
    ultrasound_urlstringUrl to connect to. Example: "ws://relay-builders-eu.ultrasound.money/ws/v1/top_bid"
    relay_namestringBe sure to use unique names. Maybe we can take it from the ultrasound_url?
    builder_idoptional stringUsed as header X-Builder-Id, for use with ultrasound builder direct endpoint
    api_tokenoptional stringused as header X-Api-Token, for use with ultrasound builder direct endpoint
  • Bloxroute websocket (type = "bloxroute-ws") This publisher connects to a relay using bloxroute websocket bids protocol.

    Fields
    NameTypeComments
    bloxroute_urlstringUrl to connect to. Example: "wss://mev-eth.blxrbdn.com/ws"
    relay_nameBe sure to use unique names. Maybe we can take it from the bloxroute_url?
    auth_headerstring or env varAdded as "Authorization" header. Example: "env:BLOXROUTE_AUTH_HEADER"
  • Titan websocket (type = "titan-ws") This publisher connects to a relay using titan websocket top bid protocol (almost identical to Ultrasound).

    Fields
    NameTypeComments
    titan_urlstringUrl to connect to. Example: "ws://us.titanrelay.xyz/builder/top_bid"
    relay_namestringBe sure to use unique names. Maybe we can take it from the titan_url?
    api_tokenstringMandatory auth used as header X-Api-Token