Constant Sum AMM Math | DeFi

  Рет қаралды 4,641

Smart Contract Programmer

Smart Contract Programmer

Күн бұрын

Пікірлер: 19
@smartcontractprogrammer
@smartcontractprogrammer 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 2 жыл бұрын
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
@MrCoreyTexas
@MrCoreyTexas 2 ай бұрын
One thing that may catch you off guard is that in the equation X+Y=K, K can actually change, but the relation still has to hold. So initially the liquidity pool will contain 0 A Tokens and 0 B Tokens, so K=0+0=0. Later on there could be 100 A tokens and 100 B tokens, so K=100+100=200. Since it's called "K" you might associate that in your head with "unchanging / immutable constant" but it does change as tokens go in and out, but every time that happens the relation must hold.
@user-sv1vw6fo7x
@user-sv1vw6fo7x 7 ай бұрын
I cant wait to learn this when i have the chance
@salem232
@salem232 2 жыл бұрын
awesome as usual !! 😍
@marcopiccioli8691
@marcopiccioli8691 2 жыл бұрын
Another great video, congrats! I am wondering if you ever made a video about Balancer constant mean formula.
@smartcontractprogrammer
@smartcontractprogrammer 2 жыл бұрын
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 2 жыл бұрын
@@smartcontractprogrammer thanks for your reply, As far as I know, it should be something like (x*y*z)^(1/3) = k
@din7834
@din7834 7 ай бұрын
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?
@smartcontractprogrammer
@smartcontractprogrammer 7 ай бұрын
It's correct. This video is about constant sum
@Johaoriginal
@Johaoriginal 11 ай бұрын
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.
@vermabharat
@vermabharat 2 жыл бұрын
Can you do constant product market maker plz
@cryptoknight7256
@cryptoknight7256 2 жыл бұрын
Can you pls address the “burning tokens makes the price go up” myth? Thanks!
@smartcontractprogrammer
@smartcontractprogrammer 2 жыл бұрын
LUNA / UST
@cryptoknight7256
@cryptoknight7256 2 жыл бұрын
@@smartcontractprogrammer kzbin.info/www/bejne/qYS1iWlpYs1jpac
@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!
@smartcontractprogrammer
@smartcontractprogrammer 2 жыл бұрын
Not during a swap
@jackchong0828jc
@jackchong0828jc 2 жыл бұрын
@@smartcontractprogrammer but after a swap, it affects the second swap right?
Constant Sum Automated Market Maker | Solidity 0.8
32:16
Smart Contract Programmer
Рет қаралды 8 М.
Constant Product AMM Math | DeFi
25:40
Smart Contract Programmer
Рет қаралды 12 М.
The CUTEST flower girl on YouTube (2019-2024)
00:10
Hungry FAM
Рет қаралды 46 МЛН
АЗАРТНИК 4 |СЕЗОН 1 Серия
40:47
Inter Production
Рет қаралды 1,3 МЛН
Bike vs Super Bike Fast Challenge
00:30
Russo
Рет қаралды 23 МЛН
What is Impermanent Loss in Crypto? (Animated + Examples)
8:17
Whiteboard Crypto
Рет қаралды 254 М.
Time Weighted Average Price Math | DeFi
7:32
Smart Contract Programmer
Рет қаралды 7 М.
Rust and RAII Memory Management - Computerphile
24:22
Computerphile
Рет қаралды 227 М.
What is an Automated Market Maker? (Liquidity Pool Algorithm)
10:25
Whiteboard Crypto
Рет қаралды 388 М.
Staking Rewards - Math, Examples and Algorithm | DeFi
43:06
Smart Contract Programmer
Рет қаралды 7 М.
Think Fast, Talk Smart: Communication Techniques
58:20
Stanford Graduate School of Business
Рет қаралды 40 МЛН
Constant Product Automated Market Maker | Solidity 0.8
30:01
Smart Contract Programmer
Рет қаралды 9 М.
A Hackers' Guide to Language Models
1:31:13
Jeremy Howard
Рет қаралды 524 М.
AI Agents Explained: How This Changes Everything
10:35
Bot Nirvana
Рет қаралды 27 М.
The CUTEST flower girl on YouTube (2019-2024)
00:10
Hungry FAM
Рет қаралды 46 МЛН