Bid on transactions

The private mempool broadcasts an auction for every transaction it receives. The auction reveals certain parts of the transaction that searchers can use to post a backrun bid.

MEVBlocker Bots: Migrating from MEVBlocker to Merkle auctions is described here: MEVBlocker websocket

1. Listen for Pending Auctions

Auctions are streamed over the following websocket:

wss://mempool.merkle.io/stream/auctions

Here is an example of an what an auction looks like:

{
  "chain_id": 1, // 1 (ethereum), 56 (bsc) or 137 (polygon)
  "id": "6397ad29b5c6edb1a7eeea18",
  "fee_recipient": "0x1E8e81dC3B221885b386e3d1c9efe93fc2863B24",
  "transaction": {
    "data": "0502b1c500000000000000000000000004969cd041c0cafb6ac462bd65b536a5bdb3a67000000000000000000000000000000000000000000002f38ca25d4a70c3ab633d000000000000000000000000000000000000000000000000282a2d9685378c260000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000003b6d0340b767c20d9773adce84d0f0a5bc64e2f114ad3076e26b9977",
    "from": "0x37a89da7BfF274F9E773418ef49caA2aFe393D70",
    "gas": 355000,
    "hash": "0xe3f7d4b7eb34b37e47bd54cd225c79f579d2b52869d87e7b288062ef817e9445",
    "to": "0x1111111254EEB25477B68fb85Ed929f73A960582",
    "value": "0",
    "function_selector": "0x0502b1c5",
    "logs": [
      {
        "address": "0x0319000133d3AdA02600f0875d2cf03D442C3367",
        "data": "0x",
        "topics": [
          "0x5f6ebb64ba012a851c6f014e6cad458ddf213d1512049b31cd06365c2b059257",
          "0x000000000000000000000000c5017be80b4446988e8686168396289a9a62668e",
          "0x0000000000000000000000000f0a35351b1c5512e50c1c7410c59d5bc52bfe37"
        ]
      }
    ]
  },
  "closes_at": "2022-12-12T22:37:32.937Z",
  "created_at": "2022-12-12T22:37:28.937Z"
}

2. Submit Bids

Bids can be submitted using any Flashbot client with the relay url:

POST https://mempool.merkle.io/relay

However, the first transaction needs to be the hash of the target transaction, since the full transaction data is not available to you.

Bid payment is different based on chains:

  • Ethereum: Bids can either be paid by transfer to the block builder (block.coinbase) or transfer to the fee recipient.

  • BSC: Bids must be paid via fee recipient transfer.

To recap, a bid is a bundle with 2 transactions:

  • The hash of the target transaction

  • A backrun transaction

For example, if we wanted to bid on the auction above, the bundle would be:

[
    "0xe3f7d4b7eb34b37e47bd54cd225c79f579d2b52869d87e7b288062ef817e9445", // hash of the transaction
    "0x.....", // my backrun
]

The full request would for this example would be:

// POST https://mempool.merkle.io/relay

{
    "method": "eth_sendBundle",
    "jsonrpc": "2.0",
    "params": [
        {
            "txs": [        
                "0xe3f7d4b7eb34b37e47bd54cd225c79f579d2b52869d87e7b288062ef817e9445", // hash of the transaction
                "0x.....", // my backrun
            ] 
        }
    ]
}

The API responds with a bid id:

{
    "jsonrpc": "2.0",
    // bid uuid
    "result": "0000-0000-0000-0000"
}

Check the status of your bid using the Bid status API endpoint.

Last updated