YOUR KEYS. YOUR CAPITAL.

EXPLORE

OverviewFind walletLiquidity poolsTokenNew pool radarWatchlist

YOUR CAPITAL

Wallet profileTransactionsAutomationSwap

ECOSYSTEM

Network statusDocumentationGuidesArticlesDevelopersSettings
BANIPOOL/Articles

Search pools

Paste or type a pool address, pool ID, token address, or token symbol. All networks are searched at once.

A token address shows pools that use that token.

Create new pool

Connect wallet

Choose a wallet on this device or connect your phone wallet with a QR code.

Detected wallets

No browser wallet detected. Use WalletConnect for a wallet on your phone.

Signing in to view your portfolio does not authorize transactions.

← All articles · Baca dalam Bahasa Indonesia

What Is a Sandwich Attack? How to Avoid It on Ethereum, BNB & Solana

November 11, 2026

Quick answer

A sandwich attack is an MEV bot attack that places a buy right before your swap and a sell right after it, so you buy at a worse price and the bot pockets the difference. It happens on networks with a public mempool or a watchable transaction flow (Ethereum, BNB Chain, Solana); you avoid it with tight slippage and by sending transactions privately through Flashbots Protect, MEV Guard or Jito bundles.

What Is a Sandwich Attack? How to Avoid It on Ethereum, BNB & Solana

A sandwich attack is an MEV bot sandwiching your swap. How it works, which networks are most exposed, and how to avoid it: slippage, Flashbots Protect, MEV Guard and Jito.

What Is a Sandwich Attack? How to Avoid It on Ethereum, BNB & Solana

A sandwich attack is an MEV bot attack that "sandwiches" your swap: the bot buys right before your swap so the price rises, then sells right after and pockets the difference. You still receive tokens, but at the worst price your slippage allows. This guide explains how a sandwich attack works, which networks are most exposed, and how to avoid it — including private RPCs for Ethereum and BNB Chain and Jito for Solana, both available on BaniPool.

What is a sandwich attack: private mempool status per network on BaniPool

How a sandwich attack works

  1. You send a swap of 10 ETH → token X with 3% slippage.
  2. The transaction waits in the public mempool — a bot sees it.
  3. The bot buys token X with higher gas (front-run) so it executes first; X's price rises.
  4. Your swap executes at a worse price — still within 3% slippage.
  5. The bot sells token X right after you (back-run) and takes the profit.

The looser your slippage and the thinner the pool, the more a bot can extract.

Which networks are exposed?

NetworkPublic mempool?Sandwich riskProtection on BaniPool
EthereumYesHighPrivate RPC: Flashbots Protect, MEV Blocker
BNB Smart ChainYesVery highPrivate RPC: PancakeSwap MEV Guard, BlockRazor
SolanaNo, but visible to leadersHigh for small tokensJito (bundle / bundleOnly)
Polygon, AvalancheYesMediumTight slippage (no public private RPC yet)
Base, Arbitrum, OP, Robinhood ChainNo (sequencer)LowNot needed
ArcLimited validator setLowTight slippage

How to avoid sandwich attacks

1. Use tight slippage

0.5–1% for liquid pairs. Slippage above 5% on BaniPool requires Expert Mode.

2. Install a private RPC (Ethereum & BNB Chain)

On EVM, your wallet broadcasts the transaction. A private RPC forwards it straight to block builders without the public mempool:

  • Ethereum: Flashbots Protect https://rpc.flashbots.net/fast, MEV Blocker https://rpc.mevblocker.io
  • BNB Chain: PancakeSwap MEV Guard https://bscrpc.pancakeswap.finance, BlockRazor https://bsc.blockrazor.xyz

On BaniPool: open ⚙ in a transaction dialog → Private mempool (RPC) → Add to wallet. If your wallet refuses (MetaMask for Ethereum Mainnet), copy the URL and add it manually: Settings → Networks → choose the network → add RPC → make it the default. All are free.

3. Use Jito on Solana

Turn on Private mempool (Jito) in ⚙ — details in Solana private mempool.

4. Use liquid pools and split large trades

Small price impact = little room for bot profit.

5. Let the keeper work privately

BaniPool's automated actions (rebalance, compound) on Ethereum and BNB Chain are automatically sent through private RPCs, in parallel to all endpoints, with a public RPC fallback if all fail.

Limits of private RPCs

  • They hide transactions before they land; afterwards they are public.
  • The receiving builder still sees the transaction — you trust the RPC provider.
  • Inclusion can take a few more blocks.
  • Do not switch RPCs in your wallet before a transaction confirms; the wallet may resend it through a public RPC.

FAQ

How do I know if I was sandwiched?

Open your transaction on a block explorer: if swaps from the same address on the same pool sit right before and after yours, you were very likely sandwiched.

Is low slippage alone enough?

It limits the loss, but swaps can fail when the market moves. Sensible slippage + a private RPC is most effective.

Do private RPCs cost money?

No. Flashbots Protect, MEV Blocker, PancakeSwap MEV Guard and BlockRazor are free; you only pay normal gas.

Related articles

What Is a Liquidity Pool? How It Works, Rewards & Risks (2026)

What Is a Liquidity Pool? How It Works, Rewards & Risks (2026)

A liquidity pool is a pair of tokens locked in a smart contract that powers swaps on a DEX. Learn how it works, how LPs earn fees, the risks, and real APR data.

BaniPool: Multichain DeFi Liquidity Pool Dashboard (Non-Custodial)

BaniPool: Multichain DeFi Liquidity Pool Dashboard (Non-Custodial)

Meet BaniPool: explore liquidity pools on 10 networks, add liquidity, create pools, swap, use a private mempool, and track LP positions — without giving up custody.

Impermanent Loss Calculator & Liquidity Pool Simulator (No Wallet)

Calculate impermanent loss for full-range and concentrated liquidity (Uniswap v3, Orca): a table per price change, the effect of range width, and a free LP simulator without a wallet.