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 used by Curve.
The following topics will be covered in this chapter:
- Exploring DEXs
- Understanding AMM
- Writing a DEX smart contract