Frontrunning Protection
This endpoint protects your Ethereum Mainnet transaction from frontrunning bots.
This blxr_private_tx endpoint allows users to send a single transaction that is added directly to the blocks from bloXroute's builders. Post-Merge (Ethereum), this request includes additional four parameters used in MEV bundle submission. Searchers who submit requests with inaccurate values would be penalized. Please contact bloXroute support first before starting using new parameters frontrunning , effective_gas_price, and coinbase_profit.
backrun_private_tx endpoint allows users to safely submit private transactions (e.g. protection against frontrunning and sandwich attacks) while participate in the BackRunMe program, allowing searchers to backrun the transaction via MEV if it produces an arbitrage profit. Most importantly, BackRunMe gives a portion of this additional profit back to the user.
Pricing: Private transactions cost an additional fee based on the transaction's gas fee. The price is 15% of the transaction's gas fee. To use private transactions, you must load a balance that will be charged based on usage.

REQUEST

Method: blxr_private_tx, backrun_private_tx
Method
DNS
Request Type
blxr_private_tx
api.blxrbdn.com
HTTPS POST, WSS
backrun_private_tx
backrunme.blxrbdn.com
HTTPS

Parameters

Parameter
Description
transaction
[Mandatory] Raw transaction bytes without 0x prefix.
timeout
[Optional] An integer value that represents the time, in seconds, needed to wait for a Private Transaction to be included in a block. If omitted, it defaults to 0. If timeout is not 0 and the transaction is not mined after the timeout value, it will be sent publicly. If the timeout is 0, no public transaction will be sent.
optional_providers
[Optional blxr_private_tx argument] Default value is ["flashbots"].
​
A list of optional providers that the trader wish to forward private transactions to. Valid providers include flashbots and eden. To send private transactions to both flashbots and eden, use ["flashbots", "eden"] in the request.
Please note that the two optional providers may broadcast the transaction publicly under some circumtances.
frontrunning
[Optional, default: True] 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.
effective_gas_price
[Optional, default: 0] An integer representing current bundle's effective gas price in wei.
coinbase_profit
[Optional, default: 0] An integer representing current bundle's coinbase profit in wei.
mev_builders
[Optional, default: bloxroute builder] A dictionary of MEV builders that should receive the bundle. For each MEV builder, a signature is required. Possible MEV builders are bloxroute , flashbots and all . For bloxroute builder and all builder, please provide empty string as signature. For flashbots builder, please provide the signature used in X-Flashbots-Signature header.

Examples (Cloud API)

HTTPS Post
wscat
curl https://api.blxrbdn.com \
--insecure \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: <YOUR-AUTHORIZATION-HEADER>" \
-d '{
"id": "1",
"method": "blxr_private_tx",
"params": {
"transaction": "f86b0184...e0b58219",
"frontrunning": false,
"effective_gas_price": 30592000000,
"coinbase_profit": 192503000000000000,
"mev_builders": {
"bloxroute": "",
"flashbots": "<signature>",
"all": ""
}
}
}'
​
wscat -c wss://api.blxrbdn.com/ws --header "Authorization: <YOUR-AUTHORIZATION-HEADER>" --no-check
> {
"jsonrpc": "2.0",
"id": 1,
"method": "blxr_private_tx",
"params": {
"transaction": "f86b0184...e0b58219",
"frontrunning": false,
"effective_gas_price": 30592000000,
"coinbase_profit": 192503000000000000,
"mev_builders": {
"bloxroute": "",
"flashbots": "<signature>",
"all": ""
}
}
}

RESPONSE

Result Fields

Result Field
Description
tx_hash
Transaction hash

Examples

Cloud-API
{
"jsonrpc": "2.0",
"id": "1",
"result": "0xffd59870844e5...bfa54a69"
}
​

NOTES

All Users

The bloXroute Private Transactions Program is available for Enterprise tier users. In order to send Private Transactions, you need to load a balance. Enterprise and Enterprise Elite plans include a credit of $250 and $500, respectively, for Private Transactions (must be used within the month). Additional credits can be purchased through the Account Portal.
The average time for Private Transactions to be included in a block is affected by the hash rate of the mining pools participating in the program. Currently, the hash rate is above 80%.
Other than not broadcasting Private Transactions, mining pools are likely to treat private transactions the same as public transactions. It is the user's responsibility to submit Private Transactions with the proper gas price to be successfully mined.
Users can develop strategies for the waiting period between sending a Private Transaction and sending a public transaction. Note that if a user decides to send the transaction publicly, it is advantageous to replace the transaction with a higher fee. bloXroute conveniently only charges for Private Transactions that are mined. Users can also use the timeout parameter to instruct the BDN how long to wait for the Private Transaction to execute before sending it publicly
Participating mining pools agree not to broadcast Private Transactions to the peer-to-peer network, however there are still scenarios that Private Transaction can be exposed to the public before confirmation: for example, in circumstances where the block containing the Private Transaction becomes an orphan or uncle block. By using the Private Transactions Program, users understand that it is not guaranteed that Private Transactions will always be kept private.
​
​
Copy link
On this page
REQUEST
RESPONSE
NOTES