Links

Bundle-Validation

The Bundle Validation utility allows traders to ensure that they are constructing their bundle correctly.
Use the request format below to simulate and validate the bundle. The response will include:
  1. 1.
    The request in the format that should be used when submitting a bundle to CloudAPI
  2. 2.
    Details about the bundle such as total gas price, bundle hash and details about the transactions in the bundle - if they are valid.
  3. 3.
    If an error was returned when validating or simulating the bundle, information about the error.

REQUEST

browser
curl
# eth example
https://tools.bloxroute.com/bundlevalidation?transaction=<TX_RAW_DATA_LIST>&auth_header=<AUTH_HEADER>&block_number=<BLOCK_NUMBER>
# bsc example
https://tools.bloxroute.com/bundlevalidation?transaction=<TX_RAW_DATA_LIST>&auth_header=<AUTH_HEADER>&block_number=<BLOCK_NUMBER>&blockchain_network=BSC-Mainnet
#eth example
curl \
-X GET \
-H "Content-Type: application/json" \
-H "Authorization: <AUTH_HEADER>" \
"https://tools.bloxroute.com/bundlevalidation?transaction=<TX_RAW_DATA_LIST>&auth_header=<AUTH_HEADER>&block_number=<BLOCK_NUMBER>"
#BSC example
curl \
-X GET \
-H "Content-Type: application/json" \
-H "Authorization: <AUTH_HEADER>" \
"https://tools.bloxroute.com/bundlevalidation?transaction=<TX_RAW_DATA_LIST>&auth_header=<AUTH_HEADER>&block_number=<BLOCK_NUMBER>&blockchain_network=BSC-Mainnet"
Parameters
Name
Description
Options & Additional notes
transaction
A string containing a list of raw transaction bytes without a 0x prefix, separated by comma.
block_number
Block number of a future block to include this bundle in, in hex value.
state_block_number
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”.
Optional.
Default: “latest”
timestamp
Simulation timestamp, an integer in unix epoch format.
Optional.
Default: None

Bundle submission requests components

Name
Description
Options & Additional notes
transaction
A string containing a list of raw transaction bytes without a 0x prefix, separated by comma.
block_number
Block number of a future block to include this bundle in, in hex value.
reverting_hashes
A list of transaction hashes within the bundle that are allowed to revert. the whole bundle would be excluded if any transaction reverts.
Optional. Default: empty list.
mev_builders
A dictionary of MEV builders that should receive the bundle. For each MEV builder, a signature is required. Possible MEV builders are:
  • bloxroute: bloXroute internal builder
  • flashbots: flashbots builder
all: all builders
Optional.
Default: bloxroute builder and flashbots builder
frontrunning
A boolean flag indicating if the MEV bundle executes frontrunning strategy (e.g. generalized frontrunning, sandwiching). Some block builders and validators may not want to accept frontrunning bundles, which may experience a lower hash power.
Optional.
Default: True
min_timestamp
The minimum timestamp that the bundle is valid on, an integer in unix epoch format.
Optional.
Default: None
max_timestamp
The maximum timestamp that the bundle is valid on, an integer in unix epoch format.
Optional.
Default: None
uuid
A unique identifier of the bundle. This field can be used for bundle replacement and bundle cancellation. Some builders like bloxroute, builder0x69 and flashbots support this field. After receiving a new UUID bundle, the builder would replace the previous bundle that has the same UUID. When the list of transactions is empty in new UUID bundle, the previous bundle associated with the same UUID would be effectively canceled. The response is empty/null instead of bundle hash when UUID is provided in the request.
Optional.
Rate Limits and Restriction
Bundle-Validation is limiting requests if they exceed 1 requests per second. In addition, each tier has a limit to how many requests per day are allowed.
Below are the tiers limits:
Plan
Bundle Validation Limit per Day
Ultra and Enterprise-Elite
30 requests per day
Enterprise
10 requests per day
Professional and Introductory
2 requests per day

RESPONSE

Examples
for a valid transaction:
{
"request": {
"method": "blxr_submit_bundle",
"params": {
"transaction":["f864808405f5e100832dc6c0948915a2d490e7a985c79aee594f00e6f660e06c78808026a052bb095e88e4539fbd710471fac9bd511eb64e5ec0bf28f17ed3067edac2fb6aa03d2638b1855834fc45e960df8f6af51d855972bdd4d1c904e0aabb68b8a61288",
"f8640184059a5380832dc6c0948915a2d490e7a985c79aee594f00e6f660e06c78028026a049b8a9ca95d3a03feb0e72718e1319fb2a0cbbb73bfeb76749bd25065c41b485a04fe076ca77c8461e620e31221b921babb82c7690268a5738d3dea136b82a0b7a"],
"block_number": "0xba10d0",
"reverting_hashes": [],
"frontrunning": true,
"mev_builders": {
"bloxroute": "",
"flashbots": ""
},
"min_timestamp": 0,
"max_timestamp": 0,
"uuid": ""
},
"id": 0,
"jsonrpc": "2.0"
},
"bundleSimulateData": {
"id": "0",
"result": {
"bundleGasPrice": 97000000,
"bundleHash": "0x746482f3880be3238d777137dc60e4c622282796193e9b10d293d327edfa6605",
"coinbaseDiff": 4074000000000,
"gasFees": 4074000000000,
"stateBlockNumber": 17306021,
"totalGasUsed": 42000,
"results": [
{
"gasUsed": 21000,
"txHash": "0xc6e1d10a0b83416703dc7ae5c9d94cb80a95e3ef423142d1e4994f6e74258e73",
"value": "0x"
},
{
"gasUsed": 21000,
"txHash": "0x9e8b8edc85f0f61c6dbfc4d78e11ee4435b986af74b680be0748c0f26e4b3a90",
"value": "0x"
}]
}
}
}
for an invalid transaction - nonce too low for the second transaction:
{
"error": {
"code": 0,
"message": "jsonrpc2: code -32000 message: err: nonce too low: address 0x8915A2d490E7A985c79aee594f00E6F660e06C78, tx: 0 state: 1; txhash 0x4d5c21867425b6f42a5642f3958d6eadbe80a9875e343b24a558f77e62e48a0d - Data: ",
"data": null
},
"request": {
"method": "blxr_submit_bundle",
"params": {
"transaction": ["f864808405f5e100832dc6c0948915a2d490e7a985c79aee594f00e6f660e06c78808026a052bb095e88e4539fbd710471fac9bd511eb64e5ec0bf28f17ed3067edac2fb6aa03d2638b1855834fc45e960df8f6af51d855972b0d4d1c904e0ec776ab8a68a88",
"f8698084059a5380832dc6c0948915a2d490e7a985c79aee594f00e6f660e06c7885e8d4a510008026a07a164c00d51977df09bf61b93e41b7d585907af2fed508a9d6d32d2d86811312a047b116e29197adf4298de6e34781f2c99f4142ea54f3090fbf843368f1f2da98"],
"block_number": "0xba10d0",
"reverting_hashes": [],
"frontrunning": true,
"mev_builders": {
"bloxroute": "",
"flashbots": ""
},
"min_timestamp": 0,
"max_timestamp": 0,
"uuid": ""
},
"id": 0,
"jsonrpc": "2.0"
},
"bundleSimulateData": {
"id": "0",
"result": {}
}
}