MEVBlocker Compatible (V3)

The V3 WebSocket is an extension of the V2 Websocket so please refer to that for core functionality this page highlights the differences / additions.

During the initial development of Blink, searchers will need to be onboarded for access. Searchers should reach out to contact@blinklabs.xyz for access.

You can connect to Blink's WebSocket via wss://ethauction.blinklabs.xyz/ws/v3/{$API_KEY}

V3 Differences

Below are the differences between the V3 and V2 websockets.

1 . Websocket Subscriptions

The V2 websocket auto-subscribed you to the transaction flow. V3 will require eth_subscribe to have been called to begin streaming data.

The are 2 flows you can subscribe to, transactions and "originator bundles".

"Originator Bundles" are non-searcher bundles, an example of one would be a telegram bot that is sending a bundle with an approve ERC-20 & swap ERC-20 so that can be executed sequentially in the same block [ approveTx, swapTx] .

Transaction Subscription

Transactions can be subscribed to using either

{"method":"eth_subscribe","params": ["blink_partialPendingTransactions"]}

or

{"method":"eth_subscribe","params": ["mevblocker_partialPendingTransactions"]}

Originator Bundle Subscription

Originator bundles can be subscribed to using either

{"method":"eth_subscribe","params": ["blink_partialPendingBundles"]}

or

{"method":"eth_subscribe","params": ["mevblocker_partialPendingBundles"]}

Multiple Subscriptions

You can also subscribe to multiple data streams at once

{
    "method":"eth_subscribe",
    "params": [
        "blink_partialPendingTransactions",
        "blink_partialPendingBundles"
    ]
}

2. Access to Originator Bundles

The V3 websocket gives you access to originator bundles data streams that can be searched on. The same principles apply as with individual txs, the searcher tx must go after the "originator bundle".

The MEVBlocker Schema will again be used for exposing the data with one slight change. Result will change from a single tx JSON object to an array of tx JSON objects.

Here's an example

{
    "jsonrpc": "2.0", 
    "method": "eth_subscription", 
    "params": {
        "subscription": "0xd58bbbc0f5190962eff01b6f0ec17724", 
        "result": [
            {
                "chainId": "0x1", 
                "to": "0x6215589d293fdf52886484f46f0d6a11c76b4a7e", 
                "value": "0x4fefa17b724000", 
                "data": "0x", 
                "accessList": [], 
                "nonce": "0x10", 
                "maxPriorityFeePerGas": "0x0", 
                "maxFeePerGas": "0x7e1c65b04", 
                "gas": "0x5208", 
                "type": "0x2", 
                "hash": "0x5f08dd372fce1a44dda27bed60ca036acb4979fad6ca37b9c388e351a870fe4c", 
                "from": "0xcb1588f3f7e92a1278c68a6aed4bdcbc68534b29"
            },
            {
                "chainId": "0x1", 
                "to": "0x8765589d293fdf52886484f46f0d6a11c76b4a7e", 
                "value": "0x0", 
                "data": "0x", 
                "accessList": [], 
                "nonce": "0x11", 
                "maxPriorityFeePerGas": "0x0", 
                "maxFeePerGas": "0x7e1c65b04", 
                "gas": "0x5208", 
                "type": "0x2", 
                "hash": "0x3456dd372fce1a44dda27bed60ca036acb4979fad6ca37b9c388e351a870fe4c", 
                "from": "0xcb1588f3f7e92a1278c68a6aed4bdcbc68534b29"
            },
        ]
    }
}   

Originator Bundle Bids

The bidding process is the same as for a normal transaction, you can submit via

{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "eth_sendBundle",
    "params": [
        {
            "txs": [ 
                "approveTxHash",
                "swapTxHash",
                "searcherRawTxHex"
            ],
            "blockNumber": "0x779352"
        }
    ]
}

The corresponding bundle will be found and the searcher txs will be appended before being sent to the builders.

Last updated