How to add Flashbots Protect RPC to your Metamask

Alchemist
Alchemist
Published in
4 min readOct 6, 2021
(Designed by Rit/Alchemist)

Please be aware that the Flashbots protect RPC is in public beta. On occasion your transactions may not be mined.

As of today anyone can use Flashbots for frontrunning protection by adding the Flashbots protect RPC to their wallet. Everything about your web3 experience will be the same, except your transactions will skip the public mempool where hungry sandwich bots lie. Instead your transactions will be sent directly to miners using the Flashbots Network.

Moreover, you’ll benefit from two other key features: no cost for failed transactions and priority in blocks where your transaction is included.

Instructions:

For a much simpler user experience and interface you can trade directly on the mistX DEX which offers protection from malicious bots by default. You benefit from the best prices on Uniswap and SushiSwap, no cost on failed transactions, free cancellations and instant ETH cashback on eligible trades.

Swap interface for mistX

If you’d still like to use the RPC please read the following: We’ve used Metamask in this guide, but the RPC endpoint should work for other wallets that support custom RPCs.

  1. Click your RPC endpoint at the top of your MetaMask. By default it says “Ethereum mainnet.”
  2. Click “Custom RPC” at the bottom of the list.

3. Add the following details:
Network Name: Flashbots Protect RPC
New RPC URL: https://rpc.flashbots.net
ChainID: 1
Currency Symbol: ETH

4. Scroll to the bottom and click “Save”

5. You can now select the Flashbots Protect RPC from the dropdown list whenever you want to switch. Note that if you switch away from the Flashbots Protect RPC while your transaction is pending it will send your transactions to the RPC endpoint you change to. In the case of the Ethereum mainnet this will emit your transactions to the public mempool.

6. You can now trade on any DEX using Flashbots.

Note: Your transaction will be sent privately to the miners, hence it will be publicly viewable on Etherscan only after its successful completion.

You can also watch our step-by-step video

Example on Uniswap:

Example on SushiSwap:

How to cancel a transaction

To cancel a transaction you need to hit the “cancel” button next to a transaction. If you cannot get this to work on the Flashbots Protect RPC, try switching back to the default Ethereum mainnet RPC. This extra step will be removed in future.

Note: Cancellations are not free as they are transactions that are sent to the mempool. If you want to be able to cancel for free, trade directly on mistX.io!

How it all works

  1. Trade as usual on your preferred DEX (Uniswap, Sushiswap and others), or submit any other type of transaction
  2. Once you execute the transaction it will be sent to the Flashbots Protect RPC endpoint
  3. The Flashbots Protect RPC endpoint validates your transaction and forwards it to the Flashbots Protect API
  4. Each block the Flashbots Protect API sends your transaction to the Flashbots network, where it is sent directly to miners.
  5. After your transaction is included on-chain then it will show as a success as it does usually on your DEX and Wallet.

How is using Flashbots Protect RPC different to using the mistX DEX?

When trading on the mistX.io DEX you benefit from free cancellations and cashback rewards. Using the RPC you can send any type of transaction on any site.

Do you get cashback rewards from using the Flashbots Protect RPC or the Flashbots Protect API?

No you don’t. That is only a feature of the mistX.io DEX and not the Flashbots Protect RPC.

If you’d like to learn about the Flashbots Protect API to unlock all the features of Flashbots technology please visit here.

If you have any queries please reach out to the Flashbots team on Discord.

--

--