[ Definition ]

Sandwich attack

A sandwich attack is when a trader spots your pending swap in the queue, places an order right before it and another right after, and pockets the price difference your trade creates. It matters because it quietly taxes ordinary swaps on decentralized exchanges, especially larger trades or ones with loose slippage settings, so what looks like a fair market price often includes a hidden cut for the attacker. For example, if you try to swap 5 ETH for a token with 3% slippage allowed, a bot can buy that token first, let your trade push the price up further, then sell into your purchase, profiting from the spread while you get a worse rate than quoted. Tighter slippage limits and private transaction routes like Flashbots Protect reduce the risk.

Part of the Stack and Story crypto glossary: plain-English definitions of the terms that actually move markets, each with the deeper read one click away.

More in the glossary
Account abstractionAirdropBasis pointsBasis tradeBitcoin dominanceBridged tokenBug bountyCEXChain reorgCircuit breakerCirculating vs Fully Diluted SupplyCold storageCustodial vs non-custodialData availabilityDeFiDepegDEXDusting attackETP (exchange-traded product)FinalityFront-runningFunding rateGas feeHalvingLayer 1 (L1)Layer 2 (L2)Liquid stakingLiquidationLiquidityMarket capitalisationMarket makerMerkle treeMEV (maximal extractable value)MiCANonceNot your keys, not your coinsOn-chainOn-chain vs off-chainOpen interestOracle manipulationPerpetual futuresProof of reservesRealized vs unrealized gainsRehypothecationRestakingRollupSeed phraseSelf-custodySequencerShardingSlashingSlippageSmart contract auditSpot Bitcoin ETFSpot ETFStablecoinStop lossTestnet vs MainnetTimelockToken unlockTokenomicsTotal value locked (TVL)Total value locked (TVL)Vesting cliffWash tradingWhat is a bitcoin node?What is a block explorer?What is a blockchain oracle?What is a cold walletWhat is a crypto bridgeWhat is a crypto custodian?What is a crypto whale?What Is a DAO?What is a governance tokenWhat is a hard forkWhat is a hardware walletWhat is a hot wallet?What is a limit order?What is a liquidity pool?What is a mempoolWhat is a multisig walletWhat is a private key in crypto?What is a rug pull?What is a satoshiWhat is a smart contract?What is an altcoin?What is an order book?What is Bitcoin halvingWhat is HODL?What is impermanent loss?What is KYC crypto? KYC and AML explainedWhat is leverage trading cryptoWhat is market cap cryptoWhat is proof of stakeWhat is staking crypto?What is yield farming?Wrapped tokenZero-knowledge proof

Read any crypto situation like an analyst.

The free 5-Minute Crypto Cheat Sheet, then one calm briefing every Sunday.

Free · Independent · Unsubscribe anytime · Privacy