Listen to Swaps on ALL Uniswap V3 Pools with Code (as a DeFi Developer) | EthersJS
HTML-код
- Опубликовано: 17 окт 2024
- 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...
Learn to use all of Uniswap's swap and liquidity functionality with code. bit.ly/3JkXYqL
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! 😅
you have no idea the amount of rich knowledge you give for free
plz keep up the good work
My pleasure!
@@blockmancodes yeah, your video is great, but seem no update for some time now, will update?
In which part did you talk about the alchemy as a provider? @blockmancodes
I was already starting to think that I'm stupid and couldn't figure out where to talk about this.
Hey, I wonder is there any hard limit of Ethereum on the number of contract events that we listent on?
Thanks. First time to use graph api and look forward to more tutorials on that.
Nice! It's pretty helpful
What if I want to get pools from BSC or other chains? Are those all of the pools on ETH chain?
Thanks a lot!! And how will be to listen for new pools created for the first time?
I'll add that to my todo list
can the graph api be used on other chains like base?
Thanks, this content is very helpful And how can I listen swap events for more than 6000 pools.
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
You could continually check the price and make the withdrawal from external code. But I don't think it's built into v3
awesome!! but does The Graph always stay up to date?
I've seen cases where it's not. If you need up-to-the-second data, query the pool directly
@blockmancodes
How can I fetch token details like price, market cap, liquidity from v3 SDK?
For price, use quoter
For market cap, do totalSupply * price
For liquidity, it's more difficult, check liquidity per tick on the pool contract
Can you make a tutorial on how we can make a Dex aggregator ?
We want to swap video PancakeSwap or create nodes for the same router without using SmartRouterV3
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?
how to get more than 6000 pools?
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
Added taking a look to my todo list
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
Yes. I'll eventually do more pancake swap tutorials
@@blockmancodesWaiting for me to be patient
I love you, I love you, my teacher
@@blockmancodesWaiting
Dear Sir, can you please make a tuto about uniswapv3 ticks and concentrated liquidity ?. Many thanks.
Yes I will
is this useful for PancakeSwap V3 ?
Haven't tried but its on my todo list
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.
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
Plz make a video how to fork uniswap fully
Very helpful video as usual. Thank you so much.
Glad it was helpful!
Please explain more lessons on
pancakeswap v3 oracle
Added to my todo list
Thanks for everything!
My pleasure!
I love you, I love you, I love you, I love
I also cannot read the prices of the currency contracts on the BSCSCAN network
There is no SQRTPRICEX96
Whats the address of the contract?
NIce video, can you do one on using graph traversal to find optimal arbitrage swap routes?
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
Smart
@@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
LEGEND BLOCKMAN
My pleasure
@@blockmancodes My Pressure
Do you have a tg account I'd like to connect with you
I don't. But I have email in my about page
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
Thank you, for helpful video
Glad it was helpful!
Make one on deploy Pancakeswap V3 locally.
Good idea. Added to todo list
@@blockmancodes excited!
I hope I give me your account on Telegram
I don't use telegram. Too distracting to have conversations in multiple places. But thank you for following on YT!
thank you so much
@@blockmancodesthank you so much