Uniswap V2 - Optimal One-sided Supply | DeFi

  Рет қаралды 5,854

Smart Contract Programmer

Smart Contract Programmer

Күн бұрын

Пікірлер: 35
@salem232
@salem232 3 жыл бұрын
😎 also the build up of the series is really awesome !!!! Make it so much easier to grasp from basic to more advance knowledge !!
@smartcontractprogrammer
@smartcontractprogrammer 3 жыл бұрын
What is the optimal amount to swap? 1:01 b = ? 1:43 s = ? 2:31 code 4:30 test 7:07
@domingys8436
@domingys8436 3 жыл бұрын
Thnx for the video, buddy! Have youknewabout Sinstake Finance (SIN)? From May 15 the staking game will start. SIN has 100% verified dev on Binance Smart Chain + 100% closed LP by Unicrpyt for 265 Years!!! wanna look ur review.
@димакалинин-о8г
@димакалинин-о8г 3 жыл бұрын
u have a nice voice, it's a pleasure to watch your videos. It would be even better, if u'd say smth about EvoDeFi. They're amazing!
@salem232
@salem232 3 жыл бұрын
😍 super clear video !!!! Also brought back my not so pleaseant math class memory 😂
@domingys8436
@domingys8436 3 жыл бұрын
I’ve already su BSC ribed mate Do u know something about MRJOBSFINDER? Could you review them pls?
@alexmorison4060
@alexmorison4060 3 жыл бұрын
Your videos come out too rarely… But I hope that the next one will be about CosmicSwap and $Cosmic. I'm so in love with them and I'll be glad to hear your prediction!
@guanyuwu3657
@guanyuwu3657 8 ай бұрын
I cannot understand why the reserve ratio after swap should be equal to the ratio of token that we have(i.e. (a-s)/b). I even cannot understand the meaning of (a-s)/b. Could you please make them clear?☺
@asdasd-yr7wi
@asdasd-yr7wi 3 жыл бұрын
whish there was less pump content and more educational content like this!
@dronestrikejr
@dronestrikejr 3 жыл бұрын
dude please make more vids ur channel is awesome
@elverdebet
@elverdebet 3 жыл бұрын
What will you advise to trade? Everything I hold is just dumping lmao. But I came across information about Galileo Travel NFT product but can’t decide about investing yet. Shall I buy this TRVL, Please help me.
@TheGaneshshow
@TheGaneshshow 2 жыл бұрын
Hello sir, I'm finding it difficult to understand Testing part in every video. Can you please make a video completely on Testing hardhat version? Please do it sir, dying to learn. Thank you sir.
@dronestrikejr
@dronestrikejr 3 жыл бұрын
liked and subscribed can u make some advanced smart contract videos so i can LvL up some more
@smartcontractprogrammer
@smartcontractprogrammer 3 жыл бұрын
solidity-by-example.org/ study the section on hacking
@dronestrikejr
@dronestrikejr 3 жыл бұрын
@@smartcontractprogrammer hell yea bro I’m joining your discord rn too
@testvb6417
@testvb6417 7 ай бұрын
thanks ma'
@mirianabuladze9826
@mirianabuladze9826 3 жыл бұрын
thanks for your videos. can you add video how to add LP on unisvap v2 route?
@smartcontractprogrammer
@smartcontractprogrammer 3 жыл бұрын
kzbin.info/www/bejne/bmKZnIeKg9-WftU
@mirianabuladze9826
@mirianabuladze9826 3 жыл бұрын
@@smartcontractprogrammer thanks. if you can please answer. Is REMIX enough for all this? If we need another software? thanks agein
@kuhaniresti
@kuhaniresti 3 жыл бұрын
When add liquidity goes to contract owner() isn't this a scam?
@smartcontractprogrammer
@smartcontractprogrammer 3 жыл бұрын
Keeping the examples simple. Shares should be transferred back to the caller with `transferFrom`
@TheGaneshshow
@TheGaneshshow 2 жыл бұрын
f is 0.003 %. You made an error while saying. Please pin the comment, might be helpful for others. Thank you.
@smartcontractprogrammer
@smartcontractprogrammer 2 жыл бұрын
docs.uniswap.org/protocol/V2/concepts/advanced-topics/fees
@TheGaneshshow
@TheGaneshshow 2 жыл бұрын
@@smartcontractprogrammer Thanks sir.
@Ortons171
@Ortons171 3 жыл бұрын
Author, i didnt understand why you deleted my comment, where i said that K is changing with every swap. I made an experement, where i check that. This experement is: 1.fork the mainnet 2.write the test, where instatiating UniswapV2Router02 and UniswapV2Pair contracts. 3.call function getReserves() and swapExactETHForTokens() (or swapExactTokensForTokens() (it is not nessasary)) 4.look the reserves before and after swap.
@smartcontractprogrammer
@smartcontractprogrammer 3 жыл бұрын
I didn't delete your comment. Maybe something wrong with KZbin
@Ortons171
@Ortons171 3 жыл бұрын
@@smartcontractprogrammer Ok, let it be
@smartcontractprogrammer
@smartcontractprogrammer 3 жыл бұрын
I guess K is not exactly same after swap, when trading fees are included?
@Ortons171
@Ortons171 3 жыл бұрын
@@smartcontractprogrammer yes, it is right. But i don`t catch formulas where it is calculated. If i use your formulas, it will be deffirence between expected and actual.
@никитамазепа-д7г
@никитамазепа-д7г 3 жыл бұрын
Mm, I can't agree with some of your points. What do you think about @musashifinance, btw? It's a DEFI platform with a taste of Japanese heritage and lots of profitable solutions!
@oleh1
@oleh1 3 жыл бұрын
You can just avoid using uniswap router and add liquidity in any proportion, avoiding the swap. You still need some B tokens, but it can be a very small amount of them. tokenA.transfer(pair, amountA) tokenB.transfer(pair, amountB) IUniswapV2Pair(pair).mint(msg.sender)
@Lopol2010
@Lopol2010 2 жыл бұрын
but isn't that make you instantly have impermanent loss?
@oleh1
@oleh1 2 жыл бұрын
@@Lopol2010 yes, it will. Swapping tokens and then adding liquidity also exposes you to instant impermanent loss. But adding liquidity directly to a pair avoids complex calculations and consumes less gas
@Lopol2010
@Lopol2010 2 жыл бұрын
@@oleh1 very interesting, thanks, sounds like these 2 approaches are equivalent, but I will try test them manually as my math skill too low for formal verification
@oleh1
@oleh1 2 жыл бұрын
@@Lopol2010 I am not sure that they are equivalent. I did not verify that. But judging by UniswapV2Pair code, they should be equivalent
Curve - Exchange | DeFi
5:42
Smart Contract Programmer
Рет қаралды 7 М.
The Strange Physics Principle That Shapes Reality
32:44
Veritasium
Рет қаралды 6 МЛН
快乐总是短暂的!😂 #搞笑夫妻 #爱美食爱生活 #搞笑达人
00:14
朱大帅and依美姐
Рет қаралды 9 МЛН
When Cucumbers Meet PVC Pipe The Results Are Wild! 🤭
00:44
Crafty Buddy
Рет қаралды 48 МЛН
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 63 МЛН
Uniswap V2 - How Much Tokens Can I Add to Liquidity Pool | DeFi
7:24
Smart Contract Programmer
Рет қаралды 7 М.
Constant Sum AMM Math | DeFi
14:35
Smart Contract Programmer
Рет қаралды 4,7 М.
Staking Rewards | Solidity 0.8
27:14
Smart Contract Programmer
Рет қаралды 15 М.
Curve - How to Add and Remove Liquidity | DeFi
11:15
Smart Contract Programmer
Рет қаралды 5 М.
What are AI Agents?
12:29
IBM Technology
Рет қаралды 657 М.
All Rust string types explained
22:13
Let's Get Rusty
Рет қаралды 182 М.
Uniswap V2 - Pricing | DeFi
9:23
Smart Contract Programmer
Рет қаралды 17 М.
2. Money, Ledgers & Bitcoin
1:18:14
MIT OpenCourseWare
Рет қаралды 1,8 МЛН
快乐总是短暂的!😂 #搞笑夫妻 #爱美食爱生活 #搞笑达人
00:14
朱大帅and依美姐
Рет қаралды 9 МЛН