Bundle Simulation

REQUEST

Method: blxr_simulate_bundle

Simulate the execution of a MEV bundle

Parameters

Parameter

Description

transaction

A list of raw transaction bytes without a 0x prefix.

block_number

Block number of a future block to include this bundle in, in hex value.

state_block_number

[Optional] Block number used as the base state to run a simulation on. Valid inputs include hex value of block number, or tags like β€œlatest” and β€œpending”. Default value is β€œlatest”.

timestamp

[Optional] Simulation timestamp, an integer in unix epoch format. Default value is None.

blockchain_network

[Optional] Blockchain network name. Possible options are "Mainnet" and "BSC-Mainnet". Default value is "Mainnet" for Ethereum Mainnet.

Example

curl https://mev.api.blxrbdn.com \
    --insecure \
    -X POST \
    -H "Content-Type: application/json" \
    -H "Authorization: <YOUR-AUTHORIZATION-HEADER>" \
    -d '{"method": "blxr_simulate_bundle", 
         "id": "1", 
         "params": {
            "transaction": ["ab..ab", "cd..cd"],
            "block_number": "0xba10d0",
            "state_block_number": "latest",
            "timestamp": 1617806320,
            "blockchain_network": "Mainnet"
         }
        }'
     

RESPONSE

Example

{
    "jsonrpc": "2.0",
    "id": "1",
    "result": {
        "bundleGasPrice": "20000000000",
        "bundleHash": "0x11aa...",
        "coinbaseDiff": "150840000000000000",
        "ethSentToCoinbase": "150000000000000000",
        "gasFees": "840000000000000",
        "results": [
            {
                "gasUsed": 21000,
                "txHash": "0xaac...",
                "value": "0x..."
            },
            {
                "gasUsed": 21000,
                "txHash": "0x123...",
                "value": "0x..."
            }
        ],
        "stateBlockNumber": 12188038,
        "totalGasUsed": 42000
    }
}

Last updated