Constant Sum AMM Math | DeFi

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 มิ.ย. 2024
  • Math for constant sum AMM (automated market maker).
    0:00 - Intro
    0:08 - What is an AMM?
    0:28 - What can you do with an AMM?
    3:23 - What is a constant sum AMM?
    5:57 - Swap - How many tokens are returned in a trade?
    8:49 - Add liquidity - How many shares to mint?
    11:40 - Remove liquidity - How many tokens to withdraw?
    Notes
    github.com/t4sk/notes
    #Solidity #SmartContract #Ethereum #スマートコントラクト
    Take a course
    www.smartcontract.engineer/
    Follow
    / programmersmart
    / discord
    t.me/smartcontractprogrammer
    smartcontractprogrammer.com
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 18

  • @smartcontractprogrammer
    @smartcontractprogrammer  2 ปีที่แล้ว +2

    0:00 - Intro
    0:08 - What is an AMM?
    0:28 - What can you do with an AMM?
    3:23 - What is a constant sum AMM?
    5:57 - Swap - How many tokens are returned in a trade?
    8:49 - Add liquidity - How many shares to mint?
    11:40 - Remove liquidity - How many tokens to withdraw?
    Notes
    github.com/t4sk/notes
    Take a course
    www.smartcontract.engineer/

  • @aperson9991
    @aperson9991 ปีที่แล้ว +3

    these videos are incredibly useful for a web3 developer, clear explanations of difficult concepts that are NOT available on any kind of website...
    keep going man, I learned a lot of stuff from your channel

  • @user-sv1vw6fo7x
    @user-sv1vw6fo7x 3 หลายเดือนก่อน

    I cant wait to learn this when i have the chance

  • @salem232
    @salem232 2 ปีที่แล้ว

    awesome as usual !! 😍

  • @marcopiccioli8691
    @marcopiccioli8691 ปีที่แล้ว

    Another great video, congrats! I am wondering if you ever made a video about Balancer constant mean formula.

    • @smartcontractprogrammer
      @smartcontractprogrammer  ปีที่แล้ว

      I think Balancer is constant product for more than 2 tokens and with weights, so math is more complex but the ideas are the same as Uniswap V2

    • @marcopiccioli8691
      @marcopiccioli8691 ปีที่แล้ว

      @@smartcontractprogrammer thanks for your reply, As far as I know, it should be something like
      (x*y*z)^(1/3) = k

  • @vermabharat
    @vermabharat 2 ปีที่แล้ว

    Can you do constant product market maker plz

  • @din7834
    @din7834 3 หลายเดือนก่อน

    On 4:09 there's an equation "X+Y=K", but the constant product is based on the multiplication, not the sum, so it's a mistake? It should be "X*Y=K", isn't?

  • @cryptoknight7256
    @cryptoknight7256 2 ปีที่แล้ว

    Can you pls address the “burning tokens makes the price go up” myth? Thanks!

  • @Johaoriginal
    @Johaoriginal 7 หลายเดือนก่อน

    Admit that 1X = 5Y and there are 500X and 7500Y in a pool constant sum AMM with K = 10000. What is the equation ? And I would like to know how to solve the equation if I add 500X in the pool and withdraw Y.
    Thx if you make new video with examples.

  • @Lopol2010
    @Lopol2010 2 ปีที่แล้ว

    lol, strange why you go from hardest math such as curve to easiest ones instead of vice-versa haha, anyway looks good

  • @jackchong0828jc
    @jackchong0828jc 2 ปีที่แล้ว

    constant k actually changes though!