Uniswap and Sushiswap Arbitrage Code | Uniswap V2 | EthersJS | DeFi

Поделиться
HTML-код
  • Опубликовано: 7 сен 2024

Комментарии • 76

  • @blockmancodes
    @blockmancodes  Год назад +1

    Learn to use all of Uniswap's swap and liquidity functionality with code. bit.ly/3JkXYqL

  • @FixedITsc
    @FixedITsc Месяц назад

    Dude, in all honesty, thank you for taking the time to actually explain this properly. It was the first complete video I’ve watched on the subject that I didn’t feel violated by the end of. That was really well done.
    After all “if you can’t explain it to a 6 year old, you don’t know it yourself” I feel like you achieved that.

  • @vilanovaalejandro500
    @vilanovaalejandro500 Год назад +6

    Every time I look deeper into crypto trading with code you’re the only one with consistent, updated and easy to understand videos. Thank you for being on RUclips. I needed this information

    • @blockmancodes
      @blockmancodes  Год назад

      Thanks for the kind words brother!

    • @vilanovaalejandro500
      @vilanovaalejandro500 Год назад +1

      For anyone that had any errors in the video I had a mistake of using the uniswapv3 router address instead of uniswapv2. Both sushiswap and uniswapv2 have the amounts out function but not uniswapv3.

  • @Bluejagaming
    @Bluejagaming Год назад +5

    Thanks for a being real and not someone selling a course

    • @edublox4790
      @edublox4790 5 месяцев назад

      He does sell a course but its worth it

  • @user-mm6wx2wo4v
    @user-mm6wx2wo4v 2 месяца назад

    Hello. How to write code for matic usdt currency arbitrage? Do you have a code example or video? Thank you.

  • @user-cr8mk4nm6b
    @user-cr8mk4nm6b Год назад +1

    what if we need to do with some pairs where decimal is not equal.

  • @blockmancodes
    @blockmancodes  Год назад +4

    What other arbitrage related tutorials would you like to see?

  • @ojazzista
    @ojazzista 8 месяцев назад

    Doesn't the router already account for the DEX fees when we call getAmountsOut?

  • @elcinhasanov641
    @elcinhasanov641 9 месяцев назад +1

    Great tutorial! Big thanks!

  • @rezayazdanpanah9306
    @rezayazdanpanah9306 7 месяцев назад

    when uniPrice greater than we must sell to uni but in your code you sell to suchi

  • @rezayazdanpanah9306
    @rezayazdanpanah9306 7 месяцев назад

    thanks for video.i can't undrestand why you add fee to uni price and subtraction other.why you dont subtraction both?please explain to me

  • @studioschaplin8180
    @studioschaplin8180 Год назад

    Blockman Codes & shares his knowledge with all!!! Thank you!

  • @user-jh2bf4rs5v
    @user-jh2bf4rs5v 10 месяцев назад +1

    Can you tell if you take into account current gas value when calculating prices for arbitrage to make prices more precise?

  • @aandresriera7927
    @aandresriera7927 Год назад

    Great content!! you are the only one that I've found, that actually explains better, and more completely the arbitrage between crypto assets. You won a sub. Correct me if I'm wrong, I'm making a project that involves arbitrage, this formula, the one that you presented here, is not taking into account the slippage, which will affect the return right? Should be added to this formula as well, or calculated separatly?

    • @blockmancodes
      @blockmancodes  Год назад

      Thanks you! Yes, you'll want to ensure you're still profitable after slippage and gas

  • @m.sundaram2123
    @m.sundaram2123 7 месяцев назад

    Hi sir is is possible to transfer token from private network to eth?

  •  7 месяцев назад

    don't we have to consider the "impermanent loss" in this scenarios? Since we will swap from ETH to DAI in one than from DAI to ETH in the other one? Or am I thinking about it in the wrong way?

    •  7 месяцев назад

      and one more question, don't we need to calculate the other direction of the prices on the second exchange? Like: ETH/DAI on uniswap and DAI/ETH on sushiswap? since the prices are different inside the same exchange

  • @daveinvest1914
    @daveinvest1914 11 месяцев назад

    powerdul, how do one subscribe to your program ?

  • @oliverli9630
    @oliverli9630 Год назад +1

    nice

  • @nithin3476
    @nithin3476 8 месяцев назад

    what about someone excutes the sandwich attack for our transaction?

  • @jerrywang3225
    @jerrywang3225 Год назад

    Great tutorial, can you add the function for the script to monitor the spread all the time. Thanks

    • @blockmancodes
      @blockmancodes  Год назад

      Thanks. I'll keep that in mind for the next arb tutorial I make. It's just a loop that needs to be added

  • @jomatojingle5623
    @jomatojingle5623 Год назад

    Thankyou very much dude. ♥️🔥

  • @user-qw8go9gk4w
    @user-qw8go9gk4w Год назад

    Hi, congrats on your level of knowledge and thanks for sharing
    I think you could share the full code, I think many of us are beginners and can't manage,
    in this case, although I like it, at least for me it's useless
    Anyway, I subscribed, because I like how you explain

    • @blockmancodes
      @blockmancodes  Год назад +3

      I would honestly like to. But it lowers watch time a lot and then the algorithm will recommend my videos less :(

  • @user-nm7vh1hd3l
    @user-nm7vh1hd3l Год назад

    Hi, please, can you explain, how can I swap Exact tokens0 for maximum amount of tokens1 with swap() function of uniswap v2 pair contract? (I don’t need to use Router)

    • @blockmancodes
      @blockmancodes  Год назад

      I'll do a video on using swap() on the pair

  • @rockysin5932
    @rockysin5932 Год назад

    Great work 👍

  • @tafikjili6964
    @tafikjili6964 Год назад

    Great course continue we want to build a arbitrage bot between uniswap v2 and v3 and sell it i will buy it

    • @blockmancodes
      @blockmancodes  Год назад

      I'd like to do some arbitrage bot tutorials in the future

  • @ThePlankton5165
    @ThePlankton5165 Год назад

    I decided to test the entire code at AirCode. Deploying the code was a success, but how do you reveal things like the prices on the exchanges like you did at 9:36?

    • @ThePlankton5165
      @ThePlankton5165 Год назад

      OK, I see it looks like I need to change the infura URL, but after that, every time I deploy, nothing more happens, and it still says “404 page not found”. I would like to know how to fix this, pronto.

    • @ThePlankton5165
      @ThePlankton5165 Год назад

      Or maybe I just have to click the link to run the code in AirCode.
      But I get this error: {“code”:-1, “error”:”missing ) after argument list”}
      I have no clue what is wrong with my code. I cannot find a difference between my code and your code besides the infura URL.
      Can you help me? Please and thanks.

    • @ThePlankton5165
      @ThePlankton5165 10 месяцев назад

      @BlockmanCodes Are you going to answer me? It’s been over one month!

  • @shaikazaruddin45
    @shaikazaruddin45 Год назад

    Can you please do on binance chain like pancakeswap arbitrage

  • @engiSwaps
    @engiSwaps Год назад

    Hey, can you make a course on how we can build our arbitrage Bot from ground app as well MEV bot that does sandwich attacks please? I will literally be the 1st who buys it

    • @blockmancodes
      @blockmancodes  Год назад

      That's my next project ;)

    • @engiSwaps
      @engiSwaps Год назад

      @@blockmancodes you’re awesome! Literally! Is it going to be a RUclips video or a course actually? Also when will it be released approximately? I’m excited!

  • @apersaz4178
    @apersaz4178 10 месяцев назад

    Hello.
    I am watching your videos, for which I can only thank you and I have tested the code for this, but for example, on the Polygon network the two "Exchanges" via Web give a similar price (around 1810 DAI) while your program gives a very big difference (from 1731 on Uniswap to 1792 on Sushiswap). What are these differences due to and what is the way to obtain the price with the greatest precision to be able to evaluate a real arbitration option?

    • @blackotaku9630
      @blackotaku9630 9 месяцев назад

      this uses a function that calls for the market conditions at the current time of txn. it changes from time to time from the pool activity.

  • @SuperDividenz
    @SuperDividenz Год назад

    can this be deployed on different exchanges and chains?

  • @ohhu6098
    @ohhu6098 Год назад

    How can we find out if tokens use the same contract?

    • @blockmancodes
      @blockmancodes  Год назад

      Can you clarify what you mean with an example?

    • @ohhu6098
      @ohhu6098 Год назад

      I think I got confused with the dex router addresses.. the real thing I need an answer to is when using other coins other than that used in this example.. (weth/dai) what would I need to change in order to make it weth/(something else). I heard you mention having the same decimal places helps so I'd aim to find that.. do I just change the dai contract address?
      Thanks in advance ❤

  • @michaelmekonnenasres1312
    @michaelmekonnenasres1312 Год назад

    good

  • @ikesafemath
    @ikesafemath Год назад

    Hello Blockman pls what would it cost me to learn flash loan with arbitrage from u

    • @blockmancodes
      @blockmancodes  Год назад

      Thanks for the question. I don't have time to personally mentor, but I'm working on a flashloan course

    • @ikesafemath
      @ikesafemath Год назад

      @@blockmancodes ok i look forward to be part of it.thank u

  • @anyasikem8834
    @anyasikem8834 Год назад

    nice bro pls can you make the code for coins with different decimals?

    • @blockmancodes
      @blockmancodes  Год назад

      Thanks for watching! I'll include tokens with different decimals in upcoming arbitrage tutorials

    • @anyasikem8834
      @anyasikem8834 Год назад

      @@blockmancodes tanks bro

  • @tafikjili6964
    @tafikjili6964 Год назад

    please give us github link

    • @blockmancodes
      @blockmancodes  Год назад +4

      I honestly would like to provide code. But it lowers watch time a lot, and then the algorithm won't recommend my tutorials as much

  • @craigkanyemba
    @craigkanyemba Год назад

    I have been following your work, for the past 3 months or so. thanks again. If you don't mind, please add your invite to Discord.

    • @blockmancodes
      @blockmancodes  Год назад +1

      Thanks for following! Appreciate it!
      I used to have a public discord but it was too much work to answer questions about 80+ videos. Now I only have it for my course

    • @vilanovaalejandro500
      @vilanovaalejandro500 Год назад

      @@blockmancodes what’s on your course?

  • @rezayazdanpanah9306
    @rezayazdanpanah9306 7 месяцев назад

    when uniPrice greater than we must sell to uni but in your code you sell to suchi