Learn to use all of Uniswap's swap and liquidity functionality with code. bit.ly/3JkXYqL
@kangChihLun2 жыл бұрын
Thank you for the tutorial , that is more clear than official doc!
@blockmancodes2 жыл бұрын
Glad it's helpful!
@azhar0406 Жыл бұрын
One of the best Uniswap V3 tutorial video I have ever seen. Giga Chad Bro
@blockmancodes Жыл бұрын
Thanks brother
@st4rgard3n422 жыл бұрын
You are a gentleman and a scholar ser. Thank you
@blockmancodes Жыл бұрын
Thank you ser
@blockmancodes2 жыл бұрын
What Uniswap V3 math do you want to understand next?
@veliea51602 жыл бұрын
can you please explain the reason why Uniswap v3 keeps track of square root of price. In V3 core pdf in (6.7 equation) it derives an equation from (6.6. eq) which holds square root of price but I could not understand how it derived. i tried to work on derivate to get a meaningful reason but could not figure out
@mahdikarimi84442 жыл бұрын
can you talk about concentrated liquidity and tick spacing ?
@blockmancodes2 жыл бұрын
@@veliea5160 I'll do a video on "why" uniswap uses square roots. Because Uniswap's explaination here, docs.uniswap.org/sdk/v3/guides/fetching-prices isn't very specific lol. I think your other question is about the calculation of liquidity right? It's a little complicated in V3. I'll do a video on that eventually
@blockmancodes2 жыл бұрын
@@mahdikarimi8444 I can absolutely do a video on it
@metamodern764811 ай бұрын
Hello, can you please tell why would one choose to calculate price/ratio using this Math rather than calling Quoter contract? Is it faster/cheaper to do this way? Thank in advance
@not-high-on-life9 ай бұрын
Wooo, thanks man! It all makes sense
@followclout Жыл бұрын
I'm confused. Why do the officials docs say to divide by 2^96 but you say to divide by 2^192?
@androidtechsayed2012 жыл бұрын
Best devs ever🥰
@sEYbaStIeNS2 жыл бұрын
It doesn't work for me. For example with the pool USDC / ETH 0.3% fees: 0x8ad599c3a0ff1de082011efddc58f1908eb6e6d8 sqrtPriceX96 is 1.97*10^33. And using that formula we get 6,19*10^8. Did I do something wrong ? Maybe we should somewhere include the decimals in the calculation since they are not the same for both tokens as in your example ? Thanks
@followclout Жыл бұрын
Yeah I think it has to do with different decimals. That's the one thing I'm also trying to figure out
@followclout Жыл бұрын
I got it, You have to divide your final answer by 10^-12 (which is the difference between the decimals for usdc 10^6 and ETH 10^18)
@aemde10 ай бұрын
perfect
@hodlertiny33522 жыл бұрын
Thanks for sharing. My questions is, sqrtPriceX96 doesn't consider slippage? In AMM v2, price are based on input amount which will impact pool reserve and it is easy to understand. But in v3, sqrtPriceX96 doesn't consider input amount?
@blockmancodes2 жыл бұрын
sqrtPriceX96 is literally the price ratio between the 2 tokens. If you want to accurately estimate slippage in V3 you need to take into account the liquidity at every tick
@st4rgard3n422 жыл бұрын
@@blockmancodes That's most definitely what I am trying to figure out right now. That's what brought me here - so I am going to go ahead and start pouring over your existing vids - thanks again
@hodlertiny33522 жыл бұрын
@@blockmancodes Sir, is it possible to calculate Uniswap V3 output off-chain? In Uniswap V2, with Reserve A, Reserve B, fee rate R, and input amount C, the output can be easily calculated off-chain. Wondering if it is possible in V3? Thanks ahead.