16

Decentralized Exchange

In this chapter, you’re going to learn about decentralized exchanges (DEXs), one of the most popular kinds of applications on the blockchain. Some famous DEXs are Uniswap, Sushi, Curve, and so on. In these exchanges, people trade or swap their ERC-20 tokens. These exchanges are decentralized, meaning it’s not the same as stock trading applications, which are centralized. You’ll also learn the algorithm that these exchanges use, which is Automated Market Maker (AMM). Then, you’ll write a DEX smart contract using the AMM algorithm. This chapter focuses on DEXs that use the AMM algorithm, such as Uniswap. There are other DEXs that use different algorithms, such as order books and AMM, but with the StableSwap AMM algorithm ...

Get Hands-On Blockchain for Python Developers - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.