Listen to Swaps on ALL Uniswap V3 Pools with Code (as a DeFi Developer) | EthersJS

  Рет қаралды 3,621

Blockman Codes

Blockman Codes

Күн бұрын

Get my free EthersJS cheatsheet to master Web3!
👉 blockman-codes...
------------------------------------------
Courses:
👉 Learn all swap and liquidity functionality with code on Uniswap V3 with examples: bit.ly/3JkXYqL
------------------------------------------
Have you ever wanted to listen to swaps on all Uniswap V3 pools?
In this video we'll programmatically find the addresses of all pools on Uniswap V3, and then listen for swap on each of them.
We'll do this with ethersJS.
------------
Code: gist.github.co...

Пікірлер: 68
@blockmancodes
@blockmancodes Жыл бұрын
Learn to use all of Uniswap's swap and liquidity functionality with code. bit.ly/3JkXYqL
@tohruoikawa1713
@tohruoikawa1713 Жыл бұрын
you have no idea the amount of rich knowledge you give for free plz keep up the good work
@blockmancodes
@blockmancodes Жыл бұрын
My pleasure!
@davidxiao-ml2fr
@davidxiao-ml2fr 9 ай бұрын
@@blockmancodes yeah, your video is great, but seem no update for some time now, will update?
@jerrywang3225
@jerrywang3225 Жыл бұрын
Thanks. First time to use graph api and look forward to more tutorials on that.
@blockmancodes
@blockmancodes Жыл бұрын
Nice! It's pretty helpful
@NamVo-mf1ns
@NamVo-mf1ns 7 ай бұрын
Hey, I wonder is there any hard limit of Ethereum on the number of contract events that we listent on?
@sumanyasahoo9533
@sumanyasahoo9533 Жыл бұрын
In which part did you talk about the alchemy as a provider? @blockmancodes
@rostam_jabbaroff
@rostam_jabbaroff Жыл бұрын
I was already starting to think that I'm stupid and couldn't figure out where to talk about this.
@jessejacob8256
@jessejacob8256 10 ай бұрын
can the graph api be used on other chains like base?
@ShoterOTP
@ShoterOTP Жыл бұрын
What if I want to get pools from BSC or other chains? Are those all of the pools on ETH chain?
@СТАКАН-о5х
@СТАКАН-о5х Жыл бұрын
how to get more than 6000 pools?
@ivoleitao2883
@ivoleitao2883 Жыл бұрын
Great work and great tutorial! Thank you so much. Would you please give a hint on how you could increase the number of pools? I had a go with passing an incrementing variable on the query but did not work. I'm completely stuck! 😅
@unaiiglesias9901
@unaiiglesias9901 Жыл бұрын
Thanks a lot!! And how will be to listen for new pools created for the first time?
@blockmancodes
@blockmancodes Жыл бұрын
I'll add that to my todo list
@oliverli9630
@oliverli9630 Жыл бұрын
awesome!! but does The Graph always stay up to date?
@blockmancodes
@blockmancodes Жыл бұрын
I've seen cases where it's not. If you need up-to-the-second data, query the pool directly
@oliverli9630
@oliverli9630 Жыл бұрын
@blockmancodes
@tonkihonks3430
@tonkihonks3430 Жыл бұрын
How do we, Can we do a Emergency Withdraw on Uniswap V3 interacting with their contract on Etherscan? I know it’s possible on Pancake writing to their masterchef contract
@blockmancodes
@blockmancodes Жыл бұрын
You could continually check the price and make the withdrawal from external code. But I don't think it's built into v3
@adelsaef8713
@adelsaef8713 Жыл бұрын
Please explain more lessons on pancakeswap v3 oracle
@blockmancodes
@blockmancodes Жыл бұрын
Added to my todo list
@shivanshyadav6740
@shivanshyadav6740 Жыл бұрын
How can I fetch token details like price, market cap, liquidity from v3 SDK?
@blockmancodes
@blockmancodes Жыл бұрын
For price, use quoter For market cap, do totalSupply * price For liquidity, it's more difficult, check liquidity per tick on the pool contract
@usdtuntiltheswap
@usdtuntiltheswap Жыл бұрын
We want to swap video PancakeSwap or create nodes for the same router without using SmartRouterV3
@blockmancodes
@blockmancodes Жыл бұрын
I think I have a pancake swap video already. What do you mean "create nodes for the same router without using SmartRouterV3"? Can you give an example?
@rs.ravi_sharma
@rs.ravi_sharma Жыл бұрын
Thanks, this content is very helpful And how can I listen swap events for more than 6000 pools.
@BransTiong
@BransTiong Жыл бұрын
Can you make a tutorial on how we can make a Dex aggregator ?
@ahmedsaid50
@ahmedsaid50 Жыл бұрын
Very helpful video as usual. Thank you so much.
@blockmancodes
@blockmancodes Жыл бұрын
Glad it was helpful!
@NOT_TON_Fan
@NOT_TON_Fan Жыл бұрын
Thanks for everything!
@blockmancodes
@blockmancodes Жыл бұрын
My pleasure!
@mohammad3703
@mohammad3703 Жыл бұрын
Please, sir, my teacher, to do additional videos on Pancakeswap, how to control the slip in the barefoot, how did the prices take from Oracle, and how the gas was set. Please, you are the only light that changed my life
@blockmancodes
@blockmancodes Жыл бұрын
Yes. I'll eventually do more pancake swap tutorials
@mohammad3703
@mohammad3703 Жыл бұрын
​@@blockmancodesWaiting for me to be patient I love you, I love you, my teacher
@adelsaef8713
@adelsaef8713 Жыл бұрын
​@@blockmancodesWaiting
@camus6525
@camus6525 Жыл бұрын
is this useful for PancakeSwap V3 ?
@blockmancodes
@blockmancodes Жыл бұрын
Haven't tried but its on my todo list
@NOT_TON_Fan
@NOT_TON_Fan Жыл бұрын
Make one on deploy Pancakeswap V3 locally.
@blockmancodes
@blockmancodes Жыл бұрын
Good idea. Added to todo list
@NOT_TON_Fan
@NOT_TON_Fan Жыл бұрын
@@blockmancodes excited!
@androidtechsayed201
@androidtechsayed201 Жыл бұрын
Plz make a video how to fork uniswap fully
@Ray88G
@Ray88G Жыл бұрын
Can you have a look in to pulsechain! It's a much faster Etherium fork with way cheaper fees ..! Plsx swap is a fork of uniswap V3
@blockmancodes
@blockmancodes Жыл бұрын
Added taking a look to my todo list
@adammr8523
@adammr8523 Жыл бұрын
Dear Sir, can you please make a tuto about uniswapv3 ticks and concentrated liquidity ?. Many thanks.
@blockmancodes
@blockmancodes Жыл бұрын
Yes I will
@MorganLee1997
@MorganLee1997 Жыл бұрын
LEGEND BLOCKMAN
@blockmancodes
@blockmancodes Жыл бұрын
My pleasure
@MorganLee1997
@MorganLee1997 Жыл бұрын
@@blockmancodes My Pressure
@usdtuntiltheswap
@usdtuntiltheswap Жыл бұрын
I also cannot read the prices of the currency contracts on the BSCSCAN network There is no SQRTPRICEX96
@blockmancodes
@blockmancodes Жыл бұрын
Whats the address of the contract?
@thetechnogeek6336
@thetechnogeek6336 Жыл бұрын
Do you have a tg account I'd like to connect with you
@blockmancodes
@blockmancodes Жыл бұрын
I don't. But I have email in my about page
@Snitzel123123
@Snitzel123123 Жыл бұрын
NIce video, can you do one on using graph traversal to find optimal arbitrage swap routes?
@pan-galactic-gargleblaster
@pan-galactic-gargleblaster Жыл бұрын
Most of us don't even use algo's for routes, there's certainly no need to. It's much easier to take the assumption that for any given token, the numeraire of the pair (base token) will be one of only 6 tokens [WETH, WBTC, USDC, DAI, USDT, stETH]. So lets say I want to swap from PEPE to AAVE. There isn't going to be a PEPE-AAVE pool, however, with absolute certainty, there will be a PEPE-WETH and an AAVE-WETH, making the path [PEPE, WETH, AAVE]. 99% of the time that will be the most liquid path, and therefore have the least price impact, and thus the least slippage, and therefore the "optimal" path. If you want to be 100% sure, you can check for each of the 6 base numeraires and return the one with the last slippage as your "optimal" path. What you might actually be asking, is "What is the optimal path, when taking into account multiple markets?" The answer to that my friend, is to do the above^ but for each market, each side of the trade, and each numereraire token. Then organize the results in an array, and filter them from least to most slippage. Take the chunk of the path that returns more than the original swap and you have a multi market optimal route for arbitrage. If it doesnt return more than the original swap, then there is no arb
@blockmancodes
@blockmancodes Жыл бұрын
Smart
@AnhTuan-uu7vh
@AnhTuan-uu7vh Жыл бұрын
@@pan-galactic-gargleblaster how to have a frameset just add the element you want to swap or replace the pair so they can work. i don't know the code i only hunt 1-2$ i really want a framework because bots are very fast
@pan-galactic-gargleblaster
@pan-galactic-gargleblaster Жыл бұрын
We learned that graph is too slow for MEV (Guessing that's the reason you're here). Ditch caching and db's entirely. Hold pools in ram where it takes a fraction of one ms to read. Even Redis will be 10x slower reads than just instantiating 10,000 pools as consts.
@pan-galactic-gargleblaster
@pan-galactic-gargleblaster Жыл бұрын
also, you can use keccak hashed event topics to listen for swaps in the mempool. Any tx's that happen on the router, simulate, look for the hashed event topic "sync()" in it's logs, and then if it exists, decode the sync() logs and you have the reserves to update the individual pool you instantiated previously. Since you're doing this inside the mempool, you end up with the future state of the pool before it gets mined. lots of fun activities with that knowledge
@Perun42
@Perun42 Жыл бұрын
Thank you, for helpful video
@blockmancodes
@blockmancodes Жыл бұрын
Glad it was helpful!
@hamadalmarzooqi-r4n
@hamadalmarzooqi-r4n Жыл бұрын
My friend, I want to communicate with you so that you can help me with something I want to program, for example, put the currency address and put the percentage in the profit and the percentage in the loss. If I arrive, he sells. Can you do this programming for me in return for money
@usdtuntiltheswap
@usdtuntiltheswap Жыл бұрын
I love you, I love you, I love you, I love
@mohammad3703
@mohammad3703 Жыл бұрын
I hope I give me your account on Telegram
@blockmancodes
@blockmancodes Жыл бұрын
I don't use telegram. Too distracting to have conversations in multiple places. But thank you for following on YT!
@mohammad3703
@mohammad3703 Жыл бұрын
thank you so much
@mohammad3703
@mohammad3703 Жыл бұрын
​@@blockmancodesthank you so much
Swap Tokens with Universal Router (as a DeFi Developer) | Uniswap V3
8:09
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
Swap on Pancake Swap V3 with Code (as a DeFi Developer) | EthersJS
8:15
25 nooby Python habits you need to ditch
9:12
mCoding
Рет қаралды 1,8 МЛН
UNISWAP V3 - New Era Of AMMs? Architecture Explained
16:49
Finematics
Рет қаралды 179 М.
Earn Protocol Fees on Uniswap V3 (with code) | DeFi
8:41
Blockman Codes
Рет қаралды 2,7 М.
Uniswap V3 Explained - Concentrated Liquidity, NFT LP Tokens, Licensing…
11:44
Reading events from a contract on the Blockchain
14:20
HashLips Academy
Рет қаралды 11 М.
Full Uniswap v3 Passive Income Guide - DeFi Concentrated Liquidity Pools
14:16
Jake Call | DeFi Passive Income
Рет қаралды 6 М.
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19