By the end of this you will know what happens to your trade in the moment it sits in public, who the invisible players reading it are, and how to stop being the easy prey at the table.
You go to swap one token for another. The interface quotes you a price. You confirm. It goes through, marked success. But when you check what you actually received, it is less than the quote promised. Nothing errored. Nothing reverted. The trade simply landed worse than you were shown.
This is not a bug, and it is not a scam in the sense of the last few checkpoints. It is a game being played on top of your transaction, by players you never saw. Someone earned money from the exact trade you just made. To understand how, we go back to a room you already walked through.
When you followed a transaction through the post office, it sat in a public waiting room before it was sealed into a batch. That room has a name you learned then: the mempool. And we told you to remember one thing about it, because a later checkpoint would need it. This is that checkpoint.
The mempool is public. While your swap waits to be sealed, anyone watching can read it: what you are trading, how much, and the price you will accept. Picture a poker table where your cards are turned face up. You can still play. But the professionals across the table can see your whole hand before they act.
Here is the simplest version of the game. A watcher sees your pending trade in the public room. They know your trade, once sealed, will move the price a little. So they copy the idea and rush their own version in just before yours.
How do they jump the line? With postage. Remember that a seat in the next batch goes to whoever pays the most gas. The watcher attaches a higher fee, so their trade gets picked up first, ahead of yours, even though yours was sitting there already. Acting on the knowledge of a pending trade by paying to get in front of it is called front-running. The name is literal: they run in front.
Front-running has a sharper, two-sided cousin, and it is the thing that quietly cost you in the opening scene. The watcher does not just go ahead of you once. They wrap your trade on both sides. First they buy right before you, nudging the price against you. Your trade then executes at that nudged, worse price. Then they sell right after you, pocketing the gap they created.
Your trade is the filling between two of theirs. The slippage you accepted, the small price movement you were willing to tolerate, was not waste, it was their profit, harvested from your transaction. This buy-before, sell-after move has a name that describes the shape exactly: a sandwich.
It is natural to imagine a hunched figure watching your specific wallet, waiting to pounce. That picture is comforting because it makes the threat small and personal. It is also wrong.
Before we reveal who is really across the table, commit to a guess. Who, or what, is reading the public waiting room and placing these trades?