Understanding Uniswap Automated Market Maker Theory

uniswap amm teori n.w
1 / 19
Embed
Share

Dive into the theory of Uniswap's Automated Market Maker (AMM) model, exploring the concept of Constant Product AMM and how it influences trading two fungible tokens. Learn about the algorithm, market reserves, fees, and the impact on price stability in decentralized exchanges.

  • Uniswap
  • Automated Market Maker
  • AMM
  • Constant Product
  • Decentralized Exchange

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Uniswap AMM Teori ! Do . Dr. VeriDelisi

  2. Order Book This is actual price !

  3. Order Book

  4. The Constant Product AMM This is an algorithm for trading two fungible tokens, and . Let x be the liquidity pool reserves of and y and the reserves of . The market has reserves x > 0 and y > 0 constant product x * y = L

  5. The Constant Product AMM The market has reserves x > 0 and y > 0 constant product x * y = L Consider the case where one desires to sell x units of in exchange for y units of . When the fee is 0,

  6. The Constant Product AMM Consider the case where one desires to sell x units of in exchange for y units of . When the fee is 0, The name constant product market comes from the fact that any trade x to y must change the reserves in such a way that the product of x and y remains equal to the constant L .

  7. The Constant Product AMM https://github.com/runtimeverification/verified-smart-contracts/blob/master/uniswap/x-y-k.pdf

  8. The Constant Product AMM https://github.com/runtimeverification/verified-smart-contracts/blob/master/uniswap/x-y-k.pdf

  9. The Constant Product AMM Fee===%0.3 0.997 (x+r x)(y y)=x * y https://github.com/runtimeverification/verified-smart-contracts/blob/master/uniswap/x-y-k.pdf

  10. The Price https://github.com/runtimeverification/verified-smart-contracts/blob/master/uniswap/x-y-k.pdf

  11. The Price https://github.com/runtimeverification/verified-smart-contracts/blob/master/uniswap/x-y-k.pdf

  12. DAI-ETH Pair https://etherscan.io/tx/0xe069b584e7e71a8390872b9b996fab2397a1b93e92e35cfa9e529be9db66adab/#even tlog

  13. DAI-ETH Pair https://etherscan.io/tx/0xe069b584e7e71a8390872b9b996fab2397a1b93e92e35cfa9e529be9db66adab/#even tlog

  14. DAI-ETH Pair https://etherscan.io/tx/0xe069b584e7e71a8390872b9b996fab2397a1b93e92e35cfa9e529be9db66adab/#even tlog

  15. DAI-ETH Pair uint amount0In = balance0 > _reserve0 - amount0Out ? balance0 - (_reserve0 - amount0Out) : 0; True https://etherscan.io/tx/0xe069b584e7e71a8390872b9b996fab2397a1b93e92e35cfa9e529be9db66adab/#even tlog

  16. DAI-ETH Pair uint amount0In = balance0 > _reserve0 - amount0Out ? balance0 - (_reserve0 - amount0Out) : 0; Reserve0 :8.773.536 Balance0 :8.774.143 Amount0In:607 True https://etherscan.io/tx/0xe069b584e7e71a8390872b9b996fab2397a1b93e92e35cfa9e529be9db66adab/#even tlog

  17. Amount0In:607 DAI-ETH Pair Amount1In:0 Fee uint balance0Adjusted = balance0.mul(1000).sub(amount0In.mul(3)); uint balance1Adjusted = balance1.mul(1000).sub(amount1In.mul(3)); https://etherscan.io/tx/0xe069b584e7e71a8390872b9b996fab2397a1b93e92e35cfa9e529be9db66adab/#even tlog

  18. Amount0In:607 DAI-ETH Pair Amount1In:0 require(balance0Adjusted.mul(balance1Adjusted) >= uint(_reserve0).mul(_reserve1).mul(1000**2), 'UniswapV2: K'); https://etherscan.io/tx/0xe069b584e7e71a8390872b9b996fab2397a1b93e92e35cfa9e529be9db66adab/#even tlog

  19. DAI-ETH Pair https://etherscan.io/tx/0xe069b584e7e71a8390872b9b996fab2397a1b93e92e35cfa9e529be9db66adab/#even tlog

Related


More Related Content