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 - วิทยาศาสตร์และเทคโนโลยี
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/
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
I cant wait to learn this when i have the chance
awesome as usual !! 😍
Another great video, congrats! I am wondering if you ever made a video about Balancer constant mean formula.
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
@@smartcontractprogrammer thanks for your reply, As far as I know, it should be something like
(x*y*z)^(1/3) = k
Can you do constant product market maker plz
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?
It's correct. This video is about constant sum
Can you pls address the “burning tokens makes the price go up” myth? Thanks!
LUNA / UST
@@smartcontractprogrammer th-cam.com/video/sSRX63-h0oE/w-d-xo.html
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.
lol, strange why you go from hardest math such as curve to easiest ones instead of vice-versa haha, anyway looks good
constant k actually changes though!
Not during a swap
@@smartcontractprogrammer but after a swap, it affects the second swap right?