Introduction to Decentralized Exchanges
Decentralized Exchanges (DEXs) are one of the most popular applications of DeFi. They enable people to buy and sell cryptocurrencies on a blockchain. Similar to what we have built in previous chapters, a DEX as a full stack application consists of smart contracts, which implement its core logic, and a frontend that users can use to interact with the smart contracts to perform operations.
DEXs are a very big topic and there are lots of concepts you may need to digest before understanding the code that we’ll implement. We will mainly focus on the introduction and conceptual demonstration of a DEX and the most popular type: Automated Market Maker (AMM). After reading this chapter, you should be more confident in writing and understanding the code for the smart contracts of DEXs.
In this chapter, you will learn about the following:
- The three main types of DEXs
- The mathematics of Automated Market Makers (AMMs)
- The architecture...