---
title: "Discussion on \"The Worst Sandwich: How to Lose 90% in One Swap\" | Hashnode"
description: "Discussion on \"The Worst Sandwich: How to Lose 90% in One Swap\". A short cautionary tale about implicit risk in DeFi and Ethereum, featuring Uniswap."
url: "https://hashnode.com/posts/the-worst-sandwich-how-to-lose-90-in-one-swap/62572265e58c4ac41a675aa8"
---

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

Discussion

# [The Worst Sandwich: How to Lose 90% in One Swap](https://blog.developerdao.com/the-worst-sandwich-how-to-lose-90-in-one-swap?utm_source=hashnode&utm_medium=feed)

A short cautionary tale about implicit risk in DeFi and Ethereum, featuring Uniswap.

Apr 13, 2022 · 4 min read · blog.developerdao.com  
Updated Jun 23, 2023  
Read the article

-   [#ethereum](https://hashnode.com/tag/ethereum)
-   [#business-and-finance](https://hashnode.com/tag/business-and-finance)

## Written by

[Colin Forward](https://hashnode.com/@Colin4ward)

@Colin4ward

  
[View profile](https://hashnode.com/@Colin4ward)

Trying to be less goal oriented

Developer DAO #2652 Managing partnerships for the DAO and publishing our weekly Newsletter, "Probably Nothing"

## Responses 1

Markdown supported · ⌘↵ to post

[Jeremy](https://hashnode.com/@isenhaard)

[Oct 17, 2022](https://hashnode.com/posts/the-worst-sandwich-how-to-lose-90-in-one-swap/62572265e58c4ac41a675aa8/comment/634d5cdeb8d8d67d6ff20fa3)

Thanks for that hint. I wasn't aware of that, too.

I've never used a DEX so far, only CEXes. On CEXes, there's the limit order, which ensures that you'll trade at a certain maximum price. Like "buy this token, but not if it costs more than $1.1", giving a simple example. On the other hand, there's also the "market order", where you trade no matter which price movements will happen. But usually it's not a too good idea to choose this. Because then such "bad surprises" might happen there, too.

So isn't there something like a limit order on DEXes? I'm a web3 dev, but still a ton of learning to do. Dunno how DEXes work in detail. But couldn't you e.g. code it like to revert a transaction if the result was not hitting some limit order criteria? I mean there are even things like flash loans, where you can trade and get millions, but then at the end through keeping it within the same transaction, everything will revert at the end if the loan is not paid back. So I'll kind of "naively" assume there could be a way to code a limit order, too ... well, the gas costs will be gone then. But at least you can be sure not losing 90%.
