Protocol 18 will introduce automated market makers (AMMs) to Stellar through deep protocol integration. The article explores the design decisions behind AMMs, including how they leverage existing path payment operations to avoid coordination problems and provide seamless liquidity routing for developers.

Protocol 18, pending validator approval, will add automated market makers to Stellar as a major protocol feature. The article discusses the design process behind this implementation, highlighting the tension between two competing goals: simplicity and deep protocol integration. Two competing proposals were published in April 2021, differing primarily in their routing mechanisms. The SDF team chose to integrate AMMs with existing path payment operations, allowing developers to access liquidity pools without changing their applications. The protocol automatically routes trades between the decentralized exchange and AMMs to find the best prices. The team selected 'best venue' execution over 'interleaved' execution to ship AMMs sooner, while leaving room for future improvements to the routing mechanism.