- DeFi Town
- Posts
- Protect Your Uniswap Trades with Flashbots RPC
Protect Your Uniswap Trades with Flashbots RPC
Avoid Sandwich Attacks and Front-Running

Are you tired of getting sandwiched or front-run while trading on Uniswap? We've got you covered! In this newsletter, we'll explore the Flashbots RPC, a solution that can help you avoid sandwich attacks and ensure your trades are executed at your desired price.
🥪 What are Sandwich Attacks?
Sandwich attacks exploit the predictable nature of blockchain transactions to front-run your trade and buy or sell the same asset at a better price. This can lead to unintended losses and affect the price of your trades.
🚀 Introducing the Flashbots RPC
The Flashbots RPC is a new type of Ethereum node that allows you to submit transactions directly to miners, bypassing the public mempool where sandwich attacks occur. This means your transactions are only visible once they're included in a block, avoiding potential attacks.
🔧 How to Use Flashbots RPC with MetaMask
Open MetaMask and click on the RPC endpoint at the top (default: "Ethereum mainnet").
Select "Custom RPC" from the list.
Add the following details:
Network Name: Flashbots Protect RPC
New RPC URL: https://rpc.flashbots.net
ChainID: 1
Currency Symbol: ETH
Save the changes.
Switch to the Flashbots Protect RPC by selecting it from the dropdown list.
⚠️ Note: Transactions sent via Flashbots Protect RPC will not be visible on Etherscan until completed. This additional privacy layer helps protect against sandwich attacks and front-running.
Conclusion
For more information, check out the official Flashbots documentation: docs.flashbots.net
Thank you for reading our newsletter! If you have any questions or feedback, please don't hesitate to reach out.