Uniswap V2 Price Oracle | DeFi

  Рет қаралды 9,539

Smart Contract Programmer

Smart Contract Programmer

Күн бұрын

Пікірлер: 25
@smartcontractprogrammer
@smartcontractprogrammer 2 жыл бұрын
0:00 - code 3:29 - constructor 5:34 - update 10:25 - consult 12:14 - testnet demo
@bradsandilands6087
@bradsandilands6087 Жыл бұрын
You're very good at explaining stuff. Your explanation of over/underflow in this situation is great
@jsckr5986
@jsckr5986 2 жыл бұрын
I am studying Uniswap. lucky to meet you.
@ethancemer8679
@ethancemer8679 2 жыл бұрын
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
@muditsarda1600 Жыл бұрын
This is one dense video! Keep making videos like this, you are helping a lot.
@computerevolve8416
@computerevolve8416 2 жыл бұрын
congratulations bro for 20k subs
@supasinliulak815
@supasinliulak815 2 жыл бұрын
great video!! could you please elaborate more on the overflows part ? I'm not quite understand why it is desired
@veliea5160
@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.
@bhok5228
@bhok5228 2 жыл бұрын
Very good video, thank you
@andreujuanc
@andreujuanc 2 жыл бұрын
Brilliant!
@user-ly9bu4tf6h
@user-ly9bu4tf6h 2 жыл бұрын
nice thank you bud
@vEr5eX
@vEr5eX 2 жыл бұрын
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?
@mateandroid
@mateandroid 2 жыл бұрын
Great content! Learned so much about UniswapV2 through this channel! Are there any plans maybe to cover UniswapV3?
@smartcontractprogrammer
@smartcontractprogrammer 2 жыл бұрын
I am learning Uni V3 spot price. Uni V3 TWAP soon
@shekhusatav
@shekhusatav 2 жыл бұрын
Can we fix the value of token against pegged token ? how ?
@criptonerds3757
@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
@smartcontractprogrammer Жыл бұрын
use external API like Coin gecko or Dune analytics
@criptonerds3757
@criptonerds3757 Жыл бұрын
@@smartcontractprogrammer coingecko I think it only shows the tokens listed on it, and exchanges listed on it. probably use external api
@JG-hq6dv
@JG-hq6dv 2 жыл бұрын
hey man great vid.could u perhaps make more similar defi related content using hadhat
@adamlevoy6573
@adamlevoy6573 2 жыл бұрын
Great vid. What would be some practical applications for this contract?
@smartcontractprogrammer
@smartcontractprogrammer 2 жыл бұрын
Need for on-chain price, but spot price can easily be manipulated. Time weighted average price is more costly to manipulate.
@adegbiteademola5329
@adegbiteademola5329 2 жыл бұрын
@@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
@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
@0xh8h
@0xh8h 2 жыл бұрын
Hi, what resolution: 1/ 2**112 means?
@smartcontractprogrammer
@smartcontractprogrammer 2 жыл бұрын
smallest step between 2 numbers is 1 / 2^112
Constant Product AMM Spot Price | DeFi
4:09
Smart Contract Programmer
Рет қаралды 10 М.
Uniswap V3 Price Oracle | DeFi
8:19
Smart Contract Programmer
Рет қаралды 12 М.
2 MAGIC SECRETS @denismagicshow @roman_magic
00:32
MasomkaMagic
Рет қаралды 36 МЛН
When u fight over the armrest
00:41
Adam W
Рет қаралды 27 МЛН
ТЫ В ДЕТСТВЕ КОГДА ВЫПАЛ ЗУБ😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 3,8 МЛН
小路飞还不知道他把路飞给擦没有了 #路飞#海贼王
00:32
路飞与唐舞桐
Рет қаралды 80 МЛН
Constant Sum Automated Market Maker | Solidity 0.8
32:16
Smart Contract Programmer
Рет қаралды 8 М.
Uniswap V2 - Pricing | DeFi
9:23
Smart Contract Programmer
Рет қаралды 17 М.
TWAP Oracle Manipulation Risks, Mudit Gupta - DeFi Security Summit 2022
13:29
DeFi Security Summit
Рет қаралды 1,1 М.
This Is Why Python Data Classes Are Awesome
22:19
ArjanCodes
Рет қаралды 814 М.
The Future of Knowledge Assistants: Jerry Liu
16:55
AI Engineer
Рет қаралды 118 М.
Oracle Manipulation | Web3 Security 101
37:12
Owen Thurm
Рет қаралды 3,4 М.
What is Uniswap? (Animated) Decentralized Exchange + UNI Token
8:19
Whiteboard Crypto
Рет қаралды 230 М.
Uniswap Grants Program: Uniswap v3 TWAP Oracles 101
25:21
ETHGlobal
Рет қаралды 1,5 М.
2 MAGIC SECRETS @denismagicshow @roman_magic
00:32
MasomkaMagic
Рет қаралды 36 МЛН