---
title: "Discussion on \"How Does a Sandwich Attack Work in Crypto: The Three Trades\" | Hashnode"
description: "Discussion on \"How Does a Sandwich Attack Work in Crypto: The Three Trades\". A sandwich attack wraps your pending DEX swap between a bot’s buy and sell. The bot buys first to raise the price, your swap fills at a worse rate, and the bot sells after you for a potential profit."
url: "https://hashnode.com/posts/how-does-a-sandwich-attack-work-in-crypto-the-three-trades/6b05603c8f03a48c0e6e1ed3"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How Does a Sandwich Attack Work in Crypto: The Three Trades](https://ledgerloftfm.hashnode.dev/how-does-a-sandwich-attack-work-in-crypto-the-three-trades?utm_source=hashnode&utm_medium=feed)

A sandwich attack wraps your pending DEX swap between a bot’s buy and sell. The bot buys first to raise the price, your swap fills at a worse rate, and the bot sells after you for a potential profit.

5d ago · 6 min read · ledgerloftfm.hashnode.dev  
Read the article

## Written by

[mathi ashuertal](https://hashnode.com/@dorrk-eth)

@dorrk-eth

  
[View profile](https://hashnode.com/@dorrk-eth)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
