InfraConversion stage1 min read

How to Configure Flashbots Private RPC to Avoid Sandwich Attacks

Stop getting sandwiched. Step-by-step guide to setting up Flashbots Protect RPC in MetaMask, Foundry, and the FRB Agent.

Outcome

Ship a safer Flashbots route

Updated

1/31/2026

Next step

Launch dashboard & assign node

Schematic view of an encrypted data tunnel protecting transactions from mempool predators
1 min read
#Flashbots#Security#RPC#Tutorial

If you send a transaction on Ethereum Mainnet using the default Infura or Alchemy RPC, you are broadcasting your intent to the entire world before it happens. This "Dark Forest" is where predators live. MEV bots spot your transaction, frontrun it to raise the price, and backrun it to pocket the difference.

The Solution: Flashbots Protect. By using a private RPC, your transaction bypasses the public mempool entirely and goes directly to miners (validators). It cannot be seen, so it cannot be sandwiched.

1. Setting up in MetaMask

This is the easiest win for retail users and manual traders.

  1. Open MetaMask Settings > Networks > Add Network > Manually.
  2. Network Name: Flashbots Protect
  3. RPC URL: https://rpc.flashbots.net
  4. Chain ID: 1
  5. Currency Symbol: ETH
  6. Block Explorer: https://etherscan.io

[!IMPORTANT] Transactions sent here will not show up on Etherscan as "Pending". They will just appear as "Success" or "Fail". Do not panic if you don't see it immediately.

2. Setting up in FRB Agent

The FRB Agent uses private bundles by default, but you can configure specific relays for redundancy.

json
// config.json snippet
{
  "Network": "ethereum",
  "Relays": [
    "https://relay.flashbots.net",
    "https://rpc.titanbuilder.xyz",
    "https://beaverbuild.org"
  ],
  "PrivateRPC": true
}

By adding multiple relays, you increase your inclusion probability. If Flashbots filters your transaction (e.g. for OFAC reasons), Titan might pick it up.

3. Protecting Your Smart Contract Deployments

When deploying a new contract (like a sniper bot or a token), using a private RPC is mandatory. If you deploy via public mempool, bots will analyze your bytecode, simulate it, and if there is an initialization vulnerability or an obvious arbitrage opportunity, they will exploit it in the same block as your deployment.

Foundry Command:

bash
forge script script/Deploy.s.sol --rpc-url https://rpc.flashbots.net --broadcast

fast mode

Flashbots default RPC can be slow because it guarantees no reverts. If you prioritize speed over revert protection (e.g. for minting NFTs), use the fast endpoint: https://rpc.flashbots.net/fast

Summary

Privacy is not optional in 2026. It is the baseline for security. Whether you are trading Uniswap manually or running an automated bot, check your RPC endpoint. If it says "Infura", you are the prey. Change it today.

Step after reading

Launch FRB dashboard

Connect your wallet, pair the node client with a 6-character PIN, and assign the contract mentioned above.

Need the signed build?

Download & verify FRB

Grab the latest installer, compare SHA‑256 to Releases, then follow the Safe start checklist.

Check Releases & SHA‑256

Related

Further reading & tools

Comments

Omar N.

The TL;DR makes it easy to share with teammates.

Victor M.

Hope to see more examples on Polygon.

Kenji M.

I tried this with a canary size and it worked as expected.

Lucas B.

Can you add guidance for BNB-specific routing?

Chen H.

This helped me fix my inclusion issues last week.

Elena T.

Would love a follow-up on simulation best practices.

Ravi P.

Would love a video walkthrough for setup.

Mia D.

Any tips for tuning slippage caps on volatile pairs?

Ethan J.

Great primer on private bundles and risks.

Ava G.

The checklist was super helpful—please add a section on reorgs.

Karim S.

Could you compare relay options in more detail?

Tommy L.

Benchmarks vs public PGA would be amazing.

Noah V.

I set tighter caps and avoided a big loss—thanks!

Amina Z.

Could you share recommended WSS providers?

Julia F.

Please cover bundle failure modes and retries.

Olivia K.

Inclusion rate improved after moving to private bundles.

Be respectful. Comments are stored locally on your browser.

Blog → App bridge

Apply this playbook inside the dashboard, assign the route, and watch Ops Pulse update live.