Created
June 14, 2022 18:59
-
-
Save frankolson/47a9606b2e6b95cc436d45ea9869c6bf to your computer and use it in GitHub Desktop.
Constant product market maker expansion for LW3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\usepackage[utf8]{inputenc} | |
\usepackage{amsmath} | |
\begin{document} | |
\begin{align*} | |
x y& = k\\ | |
(x + \Delta x) (y - \Delta y)& = k\\ | |
(x + \Delta x) (y - \Delta y)& = x y | |
\end{align*} | |
Flip it, then: | |
\begin{align*} | |
x y& = (x + \Delta x) (y - \Delta y)\\ | |
x y& = y(x + \Delta x) - \Delta y(x + \Delta x)\\ | |
x y& = x y + y \Delta x - \Delta y x - \Delta y \Delta x\\ | |
x y - x y& = y \Delta x - \Delta y x - \Delta y \Delta x\\ | |
0& = y \Delta x - \Delta y x - \Delta y \Delta x\\ | |
\Delta y x& = y \Delta x - \Delta y \Delta x\\ | |
\Delta y x + \Delta y \Delta x& = y \Delta x\\ | |
\Delta y (x + \Delta x)& = y \Delta x\\ | |
\Delta y& = \frac{y \Delta x}{(x + \Delta x)}\\ | |
\end{align*} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment