Links

Frontrunning Protection

Send private transactions on Ethereum Mainnet transaction or semi-private transactions on BSC & Polygon to protect your transaction from frontrunning bots.

Ethereum Mainnet

The 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 an additional four parameters used in MEV bundle submission. Searchers who submit requests with inaccurate values will be penalized.
Pricing: Private txs no longer require extra payments to bloXroute and can be used by all tiers (similar to blxr_tx) for free. In addition, private txs are automatically enrolled in the BackRunMe service and will pay back searchers 40% of the profit.

REQUEST

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

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.
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.
mev_builders
[Optional, default: bloxroute builder, flashbots builder] A dictionary of MEV builders that should receive the private transaction. Please provide empty string as signature for each builder. Possible MEV builders are:
Traders can refer to List of External Builders page for a full list.

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",
"frontrunning": false,
"params": {
"transaction": "f86b0184...e0b58219",
"frontrunning": false,
"mev_builders": {
"bloxroute": "",
"flashbots": "",
"builder0x69": "",
"beaverbuild": "",
"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,
"mev_builders": {
"bloxroute": "",
"flashbots": "",
"builder0x69": "",
"beaverbuild": "",
"all": ""
}
}
}

RESPONSE

Result Fields

Result Field
Description
tx_hash
Transaction hash

Examples

Cloud-API
{
"jsonrpc": "2.0",
"id": "1",
"result": "0xffd59870844e5...bfa54a69"
}
​
Other than not broadcasting Private Transactions, builders 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 so they are successfully added to the block.
Users can develop strategies for the waiting period between sending a Private Transaction and sending a public transaction. One possible strategy is to use the timeout parameter to instruct the BDN how long to wait for the Private Transaction to execute before sending it publicly.
Participating builders 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.

BSC & Polygon

For front-running protection when sending BSC & Polygon transactions users should send transactions using the blxr_tx method, adding the next_validator parameter, thus making the transaction a semi-private transaction.
When adding the next_validator to the blxr_tx request, the transaction will be sent directly to participating validators. Since the validator's node will propagate the transaction to the public network, the transaction will eventually become public (hence the name "semi-private").
Additional details can be found in the semi-private transactions page.