Orderbooks

Uniswap has quietly revolutionized DeFi by allowing trading without order books. But the more remarkable thing is that Automated Market Making is necessary. AMM is a system where there are no limit orders, or even bids or offers; in an order book, you can decide the price, size, and direction you want to trade.

There are lots of disadvantages to AMM. You can’t provide liquidity unless you provide both sides; you can’t choose to only provide at a particular price; you can’t provide at a price other than the current market price, and you can’t select the size to provide there without providing way more behind it.

There’s a solution to this–it’s what the rest of finance does. But DeFi doesn’t have order books, by and large, because the ETH network is too slow and expensive to support them. Matching bids and offers with each other involve a bunch of operations.