Learn how to setup Flashbots RPC and to never lose Ethereum Gas for pending or stuck transactions. Flashbots RPC allows regular Ethereum users to easily submit their transactions to the Flashbots RPC by using a custom RPC endpoint in their MetaMask wallet. Everything should be the same for Ethereum users, except transactions are sent to Flashbots, and then directly to Ethereum miners, instead of the public mempool where all the bots shenanigans happening that causes ETH transactions to get stuck in pending and waste your ETH gas. Ethereum MEMpool is where all transaction temporary sits when you submitted via MetaMask or other wallets. Then miners will pick the transaction with greatest gas fees to confirm it in the ETH blockchain. Until transaction is confirmed by the miners it is just a pending transaction. Front running is when bots see your pending transaction (more specifically liquidity pair swap) sitting in queue and drive put prices by doing the buy and selling with higher gas fee than you turn around sell or buy to you at a profit (arbitrage). In a normal transaction there is no bots to front run you (no arbitrage trades) and does not drive up your gas prices. Using Flashbot RPC it protects against Frontrunning where your transaction will not be seen by hungry sandwich bots in the public mempool. You will not get failed transactions: your transaction will only be mined if it doesn't include any reverts, so you don't pay for failed transactions. Note: your transaction could be unqueued, emitted to the mempool, and then included on-chain. Flashbot gives Priority in blocks: transactions sent via Flashbots are mined at the top of blocks, giving them priority.
Use Flashbot along with Ethgastation.io's base fee in my case it is 111 Gwei an priority fee of 2 Gwei for safe included in the next mining block on Ethereum without ever losing ETH as gas when transactions is stuck on pending where you run out of gas.
Flashbot RPC settings on Metamask
To add Flashbots Protect RPC endpoint follow these steps:
Enter your MetaMask and click on your RPC endpoint at the top of your MetaMask. By default it says “Ethereum mainnet.”
Click “Custom RPC”
Add https://rpc.flashbots.net with a chainID of 1 and currency of ETH.
Scroll to the bottom and click “Save”
Network Name: Flashbots RPC
New RPC URL: https://rpc.flashbots.net
Chain ID: 1
Currency Symbol (optional):ETH
Key Tips on Using Flashbot RPC
You can find the status of your transaction on Etherscan. Etherscan has a nice interface for viewing the status of your transaction from our status API.
We will try to resubmit your transaction for 25 blocks after which point it is considered “expired” and will be dropped. One ETH block time is around 15 seconds. 15 time 25 = 375 seconds or little over 1 minute. You have better chance of getting your transaction approved during this time with lower gas fees. Worst case, if your transaction is not accepted by miner it will cancel without losing ETH gas.
Transactions under 42,000 gas, such as simple ether transfers, are rejected by the Flashbots relay. As a result, we will forward these to the public mempool instead.
Transactions that perform simple actions - such as token approvals or transfers - will be sent to the public mempool as these do not need frontrunning protection.
There is a risk that your transactions are included in uncled blocks and then emitted to the public mempool.
Your transactions can be emitted to the public mempool if you switch RPC endpoints from Flashbots Protect RPC to another RPC while your transactions are pending on MetaMask wallet.
Fixing Stuck Transactions or Fixing Nonce Errors on Metamask
In the case that your transaction is stuck in a "pending" state or you have an extremely high nonce, you will need to 'reset' your MetaMask account. That is why you want to back up all your accounts private keys besides the main wallet's seed phrase. This will cause it to update the nonce and transaction history from the network. Don't worry, your funds and keys are safe during this process.
Follow these steps:
Click the account icon on the top-right corner of MetaMask.
Scroll down and click Reset Account.
I love using Flashbots RPC to skip EThereum MEMpool and directly submit my transaction to miners to include on ETH blockchain. I save considerable money in wasted gas. MEV stands for "Miner Extractable Value" or "Maximal Extractable Value." It is the profits that can be made by extracting value from Ethereum users by reordering, inserting or censoring transactions within blocks being produced. Bots exploit this for arbitrage trades that cost average user higher gas fees and lost gas fee.
If you find this Flashbot RPC Ethereum interesting, please hit the like and subscribe buttons to show your appreciation to this little author. Comment below if you need to discuss other topics or other topic that you find very interesting. I am always looking for other interesting projects to cover.
Do not forget to tip me! (it does not cost you anything!)