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

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.
- Open MetaMask Settings > Networks > Add Network > Manually.
- Network Name: Flashbots Protect
- RPC URL:
https://rpc.flashbots.net - Chain ID:
1 - Currency Symbol:
ETH - 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.
// 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:
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‑256Related
Further reading & tools
Comments
The TL;DR makes it easy to share with teammates.
Hope to see more examples on Polygon.
I tried this with a canary size and it worked as expected.
Can you add guidance for BNB-specific routing?
This helped me fix my inclusion issues last week.
Would love a follow-up on simulation best practices.
Would love a video walkthrough for setup.
Any tips for tuning slippage caps on volatile pairs?
Great primer on private bundles and risks.
The checklist was super helpful—please add a section on reorgs.
Could you compare relay options in more detail?
Benchmarks vs public PGA would be amazing.
I set tighter caps and avoided a big loss—thanks!
Could you share recommended WSS providers?
Please cover bundle failure modes and retries.
Inclusion rate improved after moving to private bundles.