Decentralized exchanges play a major role in the DeFi economy, with thousands of digital assets listed and more than $600b in cumulative volume traded since August 2020. A DEX is a peer-to-peer marketplace where transactions are recorded directly on the blockchain, without any centralized control of order flow. A traditional order book is replaced by liquidity pools that are pre-funded on-chain for both assets of the trading pair Today, Uniswap V3/V4 accounts for the largest market share of v...