Uniswap V3 Development Book #

Uniswap V3 Development Book cover

Welcome to the world of decentralized finances and automated market makers! This book will be your guide in this mysterious and amusing world! Together, we’ll build one of the most interesting and important applications, which serves as a pillar of today’s decentralized finances–Uniswap V3!

This book will guide you through the development of a decentralized application, including:

  • smart-contract development (in Solidity);
  • contracts testing and deployment (using Forge and Anvil from Foundry);
  • design and mathematics of a decentralized exchange;
  • development of a front-end application for the exchange (React and MetaMask).

This book is not for complete beginners #

I expect you to be an experienced developer, who has ever programmed in any programming language. It’ll also be helpful if you know the syntax of Solidity, the main programming language of this book. If not, it’s not a big problem: we’ll learn a lot about Solidity and Ethereum Virtual Machine during our journey.

However, this book is for blockchain beginners #

If you only heard about blockchains and were interested but haven’t had a chance to dive deeper, this book is for you! Yes, for you personally! You’ll learn how to develop for blockchains (specifically, Ethereum), how blockchains work, how to program and deploy smart contracts, and how to run and test them on your computer.

Alright, let’s get started!

  1. This book is available at:
  2. This book is hosted on GitHub:
  3. All source codes are hosted in a separate repo:
  4. If you think you can help Uniswap, they have a grants program.
  5. If you’re interested in DeFi and blockchains, follow me on Twitter.

Questions? #

Each milestone has its own section in the GitHub Discussions. Don’t hesitate to ask questions about anything that’s not clear in the book!

Where to start for a complete beginner? #

This book will be easy for those who know something about constant-function market makers and Uniswap. If you’re a complete beginner in decentralized exchanges, here’s how I’d recommend starting:

  1. Read my Uniswap V1 series. It covers the very basics of Uniswap, and the code is much more simpler. If you have some experience with Solidity, skip the code since it’s very basic and Uniswap V2 does it better.
    1. Programming DeFi: Uniswap. Part 1
    2. Programming DeFi: Uniswap. Part 2
    3. Programming DeFi: Uniswap. Part 3
  2. Read my Uniswap V2 series. I don’t go too deep into the math and underlying concepts here since they’re covered in the V1 series, but the code of V2 is really worth getting familiar with–it’ll hopefully teach you a different way of thinking about smart contracts programming (it’s not how we usually write programs).
    1. Programming DeFi: Uniswap V2. Part 1
    2. Programming DeFi: Uniswap V2. Part 2
    3. Programming DeFi: Uniswap V2. Part 3
    4. Programming DeFi: Uniswap V2. Part 4

If math is an issue, consider going through Algebra 1 and Algebra 2 courses on Khan Academy. The math of Uniswap is not hard, but it requires the skill of basic algebraic manipulations.

Uniswap Grants Program #

Uniswap Foundation logo

To write this book, I received a grant from Uniswap Foundation. Without the grant, I wouldn’t probably have had enough motivation and patience to dig Uniswap into its deepest depths and to finish the book. The grant is also the main reason why the book is open-source and free for anyone. You can learn more about Uniswap Grants Program (and maybe apply!).