Experiments · Nobody Owns Money · Chapter 28

The sandwich

Theme
Try itThe sandwich
A pool on the Uniswap formula, x·y = k, and your purchase. Turn on the bot in the mempool: it buys just before you and sells right after, and you pay the difference.

Everything is computed in your browser; nothing is sent anywhere.

From the book

Nobody Owns Money · Chapter 28

The Dark Forest

Next to this experiment in the chapter
Katsuyama was fighting a few dozen high-frequency firms. The decentralized exchange spawned thousands of bots, and instead of a 350-microsecond delay it had only the rules of an auction. In 2020 a company called Flashbots appeared and proposed bringing this market out of the shadows and making the auction for a place in the block open, so that bots would at least stop clogging the network with fee wars. The auction became an industry. The ordering of transactions was now sold according to rules, and the money for it went to a few big block builders, run by the same smart guys with math degrees.

The first chapters are free →