You're very good at explaining stuff. Your explanation of over/underflow in this situation is great
@jsckr59862 жыл бұрын
I am studying Uniswap. lucky to meet you.
@ethancemer86792 жыл бұрын
Awesome video as always. I have been a subscriber for about a year now and its crazy how your channel was at less than 2k subs then and now you have over 20k!
@muditsarda1600 Жыл бұрын
This is one dense video! Keep making videos like this, you are helping a lot.
@computerevolve84162 жыл бұрын
congratulations bro for 20k subs
@supasinliulak8152 жыл бұрын
great video!! could you please elaborate more on the overflows part ? I'm not quite understand why it is desired
@veliea5160 Жыл бұрын
this is my understanding. Imagine our range is 0-64 and `blockTimeStamp=50`, `blockTimestampLast=40` so the diff is10. imagine after 20 seconds, `blockTimestampLast` did not change and still 40. but `blockTimestamp` is not 50+20=70. since range is 0-64 it is 6 now. `blockTimestampLast` is still 40 so 6-40=-34 in mod 64 it is 30. initially diff was 10, we assumed `blockTimestampLast` did not change so after 20 seconds our diff should be 30 and it is 30.
@bhok52282 жыл бұрын
Very good video, thank you
@andreujuanc2 жыл бұрын
Brilliant!
@user-ly9bu4tf6h2 жыл бұрын
nice thank you bud
@vEr5eX2 жыл бұрын
Is there a reason for calling the update function twice? Wouldn’t calling it once the first time be enough to update the cumulative prices in the contract?
@mateandroid2 жыл бұрын
Great content! Learned so much about UniswapV2 through this channel! Are there any plans maybe to cover UniswapV3?
@smartcontractprogrammer2 жыл бұрын
I am learning Uni V3 spot price. Uni V3 TWAP soon
@shekhusatav2 жыл бұрын
Can we fix the value of token against pegged token ? how ?
@criptonerds3757 Жыл бұрын
Great video dear, do you know how I can get the price of my token in the past? In this case, I cloned uniswapv2, and I now have my own exchange, and I need to take the price data to a chart, so looking at the blocks, or events, is it possible to obtain the old price of the token?
@smartcontractprogrammer Жыл бұрын
use external API like Coin gecko or Dune analytics
@criptonerds3757 Жыл бұрын
@@smartcontractprogrammer coingecko I think it only shows the tokens listed on it, and exchanges listed on it. probably use external api
@JG-hq6dv2 жыл бұрын
hey man great vid.could u perhaps make more similar defi related content using hadhat
@adamlevoy65732 жыл бұрын
Great vid. What would be some practical applications for this contract?
@smartcontractprogrammer2 жыл бұрын
Need for on-chain price, but spot price can easily be manipulated. Time weighted average price is more costly to manipulate.
@adegbiteademola53292 жыл бұрын
@@smartcontractprogrammer Thank you for this video. That mean i can use this contract as a price feed oracle to create a swapper market place. Right?
@s.matthewenglish8099 Жыл бұрын
it's honestly confusing that they named in 'amountOut' because it's _not_ the amountOut, it has nothing to do with the "amountOut" it's the average price over that perriod